Rosaliew
Published © Apache-2.0

Direction Indicators for Bikes

Riding bike is a little dangerous. With the direction indicators for a bike, cars know if you want to turn right or left. Make biking safe!

IntermediateFull instructions provided8,601
Direction Indicators for Bikes

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
With USB cable
×1
LED (generic)
LED (generic)
×10
Breadboard (generic)
Breadboard (generic)
170 tie point
×4
Jumper wires (generic)
Jumper wires (generic)
You need lots, I think more than 40 wires
×40
Push Button
×2
Small plastic box
×3
Power bank
×1

Hand tools and fabrication machines

Drill

Story

Read more

Schematics

Wiring Diagram

Code

Code Direction Indicators for bikes

Arduino
const int button1 = 2;
const int button = 3;

void setup() {
  // put your setup code here, to run once:
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
pinMode(button, INPUT_PULLUP);
pinMode(button1, INPUT_PULLUP);
}

void loop() {
  // put your main code here, to run repeatedly:
if (digitalRead(button1) == HIGH) {
  digitalWrite(12, LOW);
}
if (digitalRead(button1) == LOW) {
  digitalWrite(12, HIGH);
}
if (digitalRead(button) == HIGH) {
  digitalWrite(13, LOW);
}
if (digitalRead(button) == LOW) {
  digitalWrite(13, HIGH);
}
}

Credits

Rosaliew

Rosaliew

2 projects • 6 followers

Comments