4-30-15

today’s goals:

1. finish setting up your red/yellow/green stoplight with code.  Click here for breadboard setup and code.

2. write a blog post that shows a picture of your breadboard setup and your commented code.  What does commented code mean?  After each line type a // and a SHORT explanation of what is happening in that light of code.

3. once you have your stoplight working move on to part 2: adding the walk/don’t walk signal.  Click here for the breadboard setup and code.

Milstead’s group 4-28-15

today-

1. Complete and show me the BLINKING light on the Arduino and the blinking light on the breadboard.  Scroll down to yesterday’s agenda for links and details.

2. Once I have checked you off for blinking lights you may move on to setting up your stop light.  Click here for details, breadboard setup and code.  Remember, you have to comment your OWN code to tell us what is happening.

3. Finish the day with a blog post that has:
-a photo of your connected breadboard and Arduino
-your commented code copy and pasted into the blog post

Milstead’s group 4-27-15

Welcome back to 127…

today’s goal: Arduino & breadboard refresher by setting up a circuit and making the LED blink on the Arduino and breadboard

the plan:

1. each of you should pickup
-one Arduino
-one breadboard
-one cable
-one envelope

2. Write your first and last name clearly on the envelope.  At the end of class put the Arduino, breadboard and cable in the envelope.

3. breadboard refresher
ledpositivenegative

4. blink the LED on the Arduino – follow the link

https://learn.adafruit.com/adafruit-arduino-lesson-1-blink/the-l-led

5. blink an LED on the breadboard – you will need one resistor, one LED and two jumper wires. Follow the link
https://learn.adafruit.com/adafruit-arduino-lesson-2-leds/blinking-the-led

6. Did you get the blinking to work?  Great.  Now add a second LED to the breadboard and modify your code to get both lights blinking.

Milstead’s 4-23-15

Today is our last day for breadboarding and Arduino.  On Monday you will go to Varvil and his group will come to 127.  You will have a great time working in the shop fabricating the stoplights that will connect to your breadboards.

Before the end of the day today you should have a breadboard with:

-working red yellow green lights
-a button that starts the sequence of light change
-a walk/don’t walk sign

Click here for the lowdown on the code and breadboard setup for the above.

Got all that working?  Then do these fun-filled Arduino activities:
-the color changing SINGLE LED – and this link to program custom colors
mix a photoresistor (ask me for one) and the Piezo buzzer for light controlled tones (this will be noisy and I will regret it)

Milstead’s group 4-21-15

Today your goal is to add in the walk/don’t walk lights.

You will have to do TWO things.

1. modify your breadboard.
2. modify your code.

updated breadboard
dontwalkimage dontwalkimage2

The incomplete code is available below.  Why is it incomplete?  Because the code below only controls the WALK light that comes on when the light is green.  YOU have to add in the DON’T WALK signal code.  Take a look at the code and the commented section that gives an important clue.

Here’s the INCOMPLETE CODE:

void setup() {
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
pinMode(11, OUTPUT);
pinMode(9, OUTPUT); //walk signal
pinMode(10,OUTPUT); //don’t walk signal
pinMode(2, INPUT);

}

void loop() {
if(digitalRead(2) == HIGH){

digitalWrite(11, LOW);
digitalWrite(12, HIGH);
digitalWrite(9,LOW);
delay(1000);
digitalWrite(12, LOW);
digitalWrite(13, HIGH);
digitalWrite(9,LOW);
delay(3000);
digitalWrite(13,LOW);
digitalWrite(11,HIGH);
digitalWrite(9,HIGH);
} else{
digitalWrite(11, HIGH);
digitalWrite(9, HIGH);
delay(100);
}

}

Milstead’s group 4-7-15

today:

1. review your work from yesterday – get caught up, including uploading video

2. the Stoplight Field Trip

3. Next up – incorporating a switch and taking control.

Your mission is to setup the board and Arduino to match the photos below.  Then copy/paste the code into Arduino.  Compile and upload.  Troubleshoot.

Then take the the code and comment each line to tell us what is happening. Comment like this:

//this tells the yellow light to turn on

The breadboard/Arduino controller setup

arduinoswitch1 arduinoswitch2

and the code:

void setup() {
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
pinMode(11, OUTPUT);
pinMode(2, INPUT);

}

void loop() {
if(digitalRead(2) == HIGH){

digitalWrite(11, LOW);
digitalWrite(12, HIGH);
delay(1000);
digitalWrite(12, LOW);
digitalWrite(13, HIGH);
delay(3000);
digitalWrite(13,LOW);
digitalWrite(11,HIGH);
} else{
digitalWrite(11, HIGH);
delay(100);
}

}

4-7-15 Milstead’s group

Well this isn’t what I had planned.  Long story short, my fifth grader got a concussion at Walker Creek early this morning.  Kaiser, CT scan and diagnosis.  Here we are.

Please support each other, stay appropriate, one at a time to the bathroom and follow today’s plan.  Treat the sub with respect.  I want a glowing report when I get back.  Thanks.

FOR YOU today, progress towards the stoplight.

Part I

We will save our field trip for Thursday.  In the meantime, complete this simple form about the inputs and outputs of the humble stoplight.  Click here for the form.  This is a grade assignment.

Part II

You are going to have to step up and work through this tutorial.  I would much rather be there with you but…

Here’s the really good tutorial: http://www.makeuseof.com/tag/arduino-traffic-light-controller/

Get through at least part 1 of the tutorial which will provide you with success if the three lights blink one after the other automatically.  If you have success dig into part 2 of the tutorial

Before you dig in here’s some useful info:

>you will be responsible for a blog post about your work today.  This is a graded assignment. Your blog post must include:

  • your OWN code pasted into the blog post
  • a picture of your breadboard and your Arduino wired up
  • BONUS: video of your lights working

1. grab your Arduino envelope and write your name on the envelope.

2. you will need some items (listed on the tutorial) to make this work.  LEDs, resistors, jumper wires and buttons are in the clear bin on the center table.  If the bin is NOT there then please go into the office and bring it out.  Grab what you need and put it in the envelope when you are done.

LEDs not the right colors?  That’s ok – just get three of them.

3. resistors: you need to make sure that you use a 10 ohm resistor that looks like this:
10K_resistorThe colors are brown-black-orange.

Milstead’s group

today

1. Arduino and breadboards are assigned: you will each receive a numbered Arduino and breadboard.  YOU are responsible for the condition and care of your equipment.  At the end of class return your Arduino and breadboard to your numbered envelope.  Include any loose parts as well.

Write your name under the # on your Arduino storage container.

2. Clean up all other material and return it to the proper containers at the end of class.  We all leave when the classroom is clean (but not before the bell).

3. Pick a black USB cable and put it in your envelope.

4. Log in.  Search for and start Arduino.

5. Connect your board to the computer using the black cable.  USB ports are on the back of the computers.