RED GREEN

From UCLA IEEE OPS
Jump to: navigation, search

Due Date

All checkpoints are due by Thursday, February 19th, 2019.

About the Project

In this project, we'll simulate a car passing through multiple intersections! At each one, there will either a red light or a green light. If you stop at the red light, and go at the green light, you'll rack up your score! But if your car doesn't follow the light's directions, you'll crash!


Instead of pressing the gas or break on a car pedal, you'll be pressing one of two buttons connected to your "car", which will be an Arduino Nano microcontroller! It will be connected using the Tx/Rx pins to another Arduino Nano, which we'll call the "stoplight"! By transfering data between the two microcontrollers, you'll be able to implement this fully functional game!


Slides: https://docs.google.com/presentation/d/1rrN00ArGcvYZtoUyNKVbAfyTpojcZMyMT8e8WgsoAGw/edit?usp=sharing

Spec: https://docs.google.com/document/d/13slBLQs2BY_iT14ATSTbU2cS24-o6Rr2cax8ZwKbHgo/edit?usp=sharing

Arduino Nano Pinout: Arduino Nano

Schematic

Uh oh! You're not given a schematic this time, so you've got to make your own!

Tips

  • For checkpoint 1, you'll need two sketches and two computers for it to work, since you're sending a character from one Arduino to another, and the receiving one will need to print the character out on the serial monitor of your computer once it has accomplished that
  • Make sure to disconnect the TX and RX pins when uploading code
  • GND is a reference voltage, so you need to connect the GND pins from both Arduinos together, to get the same reference voltage!

Video

If you're interested in learning more about MCU's for our upcoming capstone, take a look at this video courtesy of former OPS lead Kyle Liang!