My project is about blinking or switching an led with Ir proximity sensor, button and potentiometer for adjusting the brightness of an led.
I made this project for understanding the serial communication.
The effective distance measuring range for this proximity sensor is 10-80cm. If an object is closer than the shortest distance, it reports a significantly higher analog output and is inconsistent with expected in-range results. For example, when an object is 1 cm away from the sensor, it reports an analogRead() value of 322. However, when the object is 5 cm away, the output is 655.for adjusting led's brightness I added one more button and by pressing only you can adjust the brightness.
It works by Serial communication....when you send 'ir', the Ir sensor is enabled, when you send '!ir', the Ir sensor is disabled. like the same way when you send 'bt' or '!bt' the button is enables or disabled respectively and the pot also send 'pot' or '!pot' the potentiometer is enabled or disabled respectively.
When button or the sensor or the potentiometer is enabled it shows 'ir enabled' or 'bt enabled' in the Serial monitor and when any of these are disabled it shows 'ir disabled' or 'bt disabled'.
Comments
Please log in or sign up to comment.