punkplod23 / CodeClubArduino

Arduino Lesson plans
MIT License
4 stars 2 forks source link

Is the LED lesson a bit too complex? #4

Open brennanpincardiff opened 7 years ago

brennanpincardiff commented 7 years ago

Hi Gareth, I wonder if this is a bit too complex for a one hour lesson. There is a lot to learn in terms of putting together the circuit and the programming. My first attempt with LEDs from the Arduino had just one LED (the Blink lesson) and then I built it up to three. When I showed Blink to Roisin, she wanted to change the LED and change the frequency of the lights. I let her do this, of course. Learning how to put stuff into the breadboard takes a bit of practice. I guess this can all be evaluated this afternoon. Just my thoughts... Best wishes, Paul P.S. here is my simple sketch...

/*
 Traffic lights code. Adapted from Blink
 */

// name the pins that we've connected to our LED
int red = 14;
int yel = 10;
int grn = 9;

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pins as an output.
  pinMode(red, OUTPUT); 
  pinMode(yel, OUTPUT);
  pinMode(grn, OUTPUT);  
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(red, HIGH);   // turns red LED on (HIGH is the voltage level)
  digitalWrite(yel, LOW);
  digitalWrite(grn, LOW);  
  delay(2000);               // wait for two second

  digitalWrite(yel, HIGH);    // turn the yellow LED on by making the voltage HIGH
  delay(500);               // wait for half second

  digitalWrite(red, LOW);   // turn the red LED off (LOW is the voltage level)
  digitalWrite(yel, LOW);
  digitalWrite(grn, HIGH);
  delay(2000);               // wait for two second

  digitalWrite(yel, HIGH );    // turn the LED on by making the voltage HIGH
  digitalWrite(grn, LOW);
  delay(250);

}
brennanpincardiff commented 7 years ago

Just so that we remember, I think there was a really good vibe on the Arduino lesson. Our learners really enjoyed it and my daughter shared it with my six year old the day after. The Blink script worked well. The learners enjoyed changing the LED, changing the times for the blinking and assembling the circuits. Also different resistors giving different amounts of light worked well to teach them about a basic concept. Each having an Arduino, breadboard, assembling their own circuits seemed to inspire them. The physical side of this moves them beyond code in a practical way. Great work from the whole team.