Week 8: Arduino Programming

Overview of Activity

Today, we did a little bit of review on last week's Arduino meeting and then worked on making new colors with our LEDs!

Programming Skills

  • pinMode(pin #, OUTPUT or INPUT): tells the Arduino which pin is active and whether or not they send out voltage. You need to set pin mode of the pin you are using so that the Arduino knows you're using it for output or input

  • analogWrite(pin #, 0-255): tells the Arduino how much voltage to send from a specific pin on a scale of 0-255 (0 sets it to 0V, 255 sets it to 5V)

  • digitalWrite(pin #, HIGH or LOW): HIGH sets the pin to 5V, LOW sets the pin to 0V

  • Semicolons go after every statement like pinMode(); analogWrite(); and digitalWrite();

  • Remember to not touch your mouth when working with electronics, and wash your hands after you work with them to avoid getting lead poisoning

*See Presentation Slides 13-17 for full content*

Programming different colors

Members went beyond the colors of red, green, and blue, and created other colors (such as purple and yellow) by adding and programming additional wires to connect to the LED light. Look on the left for different colors the programmers made!

The Presentation

10/21 Programmer Activity

Questions?

If you have any questions, feel free to go to our discord server and ask us in the #programming channel. You can also show us your success in the #general-photo channel.