main.ino 909 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * This is the Arduino code for an:
  3. * Infrared Obstacle Sensor and displaying the time on 6 digital display and serial monitor.
  4. * Uses preprogrammed distance and converting it into mph.
  5. ***Still needs to count and store laps for average #of laps once button press
  6. ***Still needs to use 2 digit separate display the lap count for the above laps once button press
  7. IR Sensor Wiring:
  8. Brown: 5V DC
  9. Blue: GNG
  10. Black: Signal, to PIN 2
  11. Arduino pins to the Large Digit Driver IN
  12. Arduino pin for SPEED DISPLAY
  13. 6 -> CLK (GREEN)
  14. 5 -> LAT (BLUE)
  15. 7 -> SER on the IN side (YELLOW)
  16. 5V -> 5V (ORANGE)
  17. Power Arduino with 12V and connect to Vin -> 12V (RED)
  18. GND -> GND (PURPLE)
  19. 9 -> Push Button
  20. START Input
  21. Arduino pin for LAP DISPLAY
  22. 11 -> CLK (GREEN)
  23. 10 -> LAT (BLUE)
  24. 12 -> SER on the IN side (YELLOW)
  25. 5V -> 5V (ORANGE)
  26. Power Arduino with 12V and connect to Vin -> 12V (RED)
  27. GND -> GND (PURPLE)
  28. */