Distance Sensor and OLED

Introduction

Brief presentation of your project:

  • The project consists of creating a device that calculates the distance between the sensor and the object next to it.
  • First i have thought of the car's sensor, and then i thought i could do a small version with the concept but the difference is that my device will display the distance only.
  • It is useful to detect the hand gestures for example in phone devices, or in cars to detect a dangerous collision, and many examples…

General description

With this project, we will be able to read the distance calculated using the code and the sensor, between the sensor and the object in the front, from the oled.

Hardware Design

Here's all about the hardware design:

  • Arduino UNO
  • Ultrasonic Sensor Module - HC-SR04 distance detector
  • OLED Display 128×64 - 0.96” SPI
  • Breadboard 830 points MB-102
  • 10 x fire jumper

Software Design

Description of the application code (firmware):

  • For OLED I used the libraries : SPI, Wire, Adafruit, Adafruit ssd1306
  • For sensor : Make a pulse for HC trigger, the HC will do a pulse burst / PulseIn() to detect the length of the step high / #ifdef for only compiling the parts that we need
  • algorithms and structures that you plan to implement : define the sensor system / setup function to initialise the trig and echo pin and initialize the SPI oled with the pins and address / if to calculate distance for the parts that we need / display function
  • implemented sources and functions :

Rezultate Obţinute

The distance was displayed on the OLED

Conclusion

The results obtained : The distance calculated and displayed in the oled

Download

Not the best project, but I tried to do my best ! ^_^

ardui.zip

video.zip

Bibliografie/Resurse

The example (OLED SPI 128×64) in arduino helped me alot.

Some youtube videos were also helpful, inlcuding the labs.

https://www.arduino.cc/ The documentation section.

Export to PDF

pm/prj2022/avaduva/mesurement_of_water_s_temperature.txt · Last modified: 2022/05/27 02:06 by liza.batache
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0