In this illustration we will going to wire the Digispark ATTiny Development Board with HC-SR04 Ultrasonic range detector, as our output we will going to use an RGB LED when the objects is near or closer to the sensor the RGB LED will going to switch on and if it is out of range the blue will light on. In the example below we can used a dedicated 5v power to supply 5v to our Digispark ATTiny Board.
Required Components
1x Digispark ATTiny Board
1x HCSR04 Ultrasonic Range Detector
1x RGB LED
1x Jumper Wire
1x Solder less Bread Board
Wiring Diagram
Arduino Sketch
Didispark ATTiny85 with Ultrasonic HC SR04 Sensor
Great, simple and illustrative project! I almost missed the resistors, and they are not listed in the parts list. I expect something like 100ohm will work.
I was looking for something simple to try with my ATtiny and HC-SR04 and this is it!
Thanks!
D
why ground of LED connect to VCC, not to ground?