Tell us about yourself!
hi ... i'm so interested in your project. can i modify the code to replace each GREEN in the code with RED. this way I shall get all the patterns in RED instead of GREEN... right? if so, any other modification i can work on ??? thanks in advance
Tic Tac Toe Game With Ardui...View Instructable »
Subtitles on TVView Instructable »
Fading RGBView Instructable »
Hi there,Thanks for your question.The waves go out of the sensor and reaches the target then get reflected back to the sensor again. So the distance from the sensor to the target shall be half the distance of the waves journey. You shall find your answer here:https://www.modmypi.com/blog/hc-sr04-ultrasonic-ra...The code is explained step by step.Darwish :)
Sorry. I forget to say that the number 2 means we need the distcnce to be scaled down to 2 decimal places.
HC-SR04 Ultrasonic Sensor with Raspberry Pi 2
Tools and Supplies
Raspberry Pi Class
HC-SR04 Ultrasonic Sensor w...View Instructable »