Sensor Reading + Display (Arduino + Processing)
Brief
Create a simple signle-channel controller that would allow you to change one parameter in a Processing program by applying a value received from ESP32 via serial communication. You can use any sensor to generate that value - except a potentiometer.
Design description
I created a bus and a wall in Processing software. There is a number that is the distance between the bus and the wall. For the hardware part, I planed to use distance sensor to represent the distance between the bus and the wall. When my hand close to the sensor, the bus will close to the wall.
Physical components
-Ultrasonic Module HC-SR04 Distance Sensor
-Arduino Uno REV3
-USB cable
-Breadboard wires M-F
Problems
- When I connect the Ultrasonic Distance Sensor to the ESP32, it doesn't work.
- Processing can not connect with the Arduino
Improvements
- Change ESP32 to Arduino UNO because Ultrasonic Distance Sensor only supported by 5V.
- The serial port name is wrong, so I use Terminal to determine serial port names in Mac OS X.
Display
Coding part