Arduino Workshop

  1. Email address
  2. Code from the workshop, screen capture
  3. Code from the workshop, in text form
  4. Link to the software download and installation guide
  5. Settings for using the Uno in the Arduino IDE.
  6. Copy of the lesson plan

1. My email address is paul.mirel at gmail.

2. Below is a screen shot of the completed code. The code, for copy and paste, follows.

MICA Arduino workshop code

MICA Arduino workshop code

3.

/* begin code */
int const OUTPUT_PIN = 13;
int const INPUT_PIN = 7;
int WAIT_MS = 500;

void setup() {
pinMode(OUTPUT_PIN, OUTPUT);
pinMode(INPUT_PIN, INPUT_PULLUP);
}

void loop() {
if (digitalRead(INPUT_PIN) == HIGH){
digitalWrite(OUTPUT_PIN, HIGH);
}
delay(WAIT_MS);
digitalWrite(OUTPUT_PIN, LOW);
delay(WAIT_MS);
}

/* end code */

4. ==> Link to Arduino Software download and installation guide. 

5. For the Blink Example on the Uno, select:

Tools, Board, Uno

and

Tools, Serial Port, /dev/tty.usbmodemXXXX

6. Lesson Plan Copy

1. Why Electronics? (10 min)

How do you interact with the world?

How do you know anything at all about what is going on around you? (Senses)

How do you act on the world? (Outputs)

Your artwork can do these things too.

Choice: Determinism or Interactivity.

Determinism requires no inputs. Timing —> Output

Interactivity: Input —> Processing —> Output

Electronics are purpose-built both for Determinism and for Interactivity.

Demo: Bindu Dress

2. How do electronics work? (30 min)

What are some things that conduct electricity?

conductors

What are some things that don’t conduct electricity?

insulators

Why? Matter is made of atoms. Some electrons are free to move.

Batteries shove electrons from one end to the other, leaving one end missing some electrons (positive) and the other end with a surplus of electrons (negative).

If you can arrange for the electrons to get from the negative side back to the positive side, you can make them do tricks on the way. Any of the outputs.

Here’s what we’re going to make the electrons do:

Come out of the battery (get pushed out).

Go through a conductor.

Go through a resistor to control the rate of flow.

Go through an LED to make some light.

Let them back into the battery.

This is a circuit. Make it, using alligator test leads.

Some work and some don’t. Why not? Polarity of the LED.

Let’s put the resistor on the other side. It also works. The electrons back up in it, and the crowd can only flow so fast.

Now you have a way to test batteries for polarity and voltage.

You’ve also invented the switch for turning it on and off.

3. Wouldn’t it be nice to have one of those? (30 min)

Let’s make a sturdier version. Solder and heat shrink.

How to strip wire.

How to make a splice.

How to solder a splice.

How to work with heat shrink.

Do it. Copy the circuit on the board, using the layout on the board.

4. Arduino what? (45 min)

Input —> Processing and Control —> Output

The Arduino is purpose built to be easy to use for both Determinism and Interactivity.

Let’s get one working.

Connect the Uno Arduino to your computer with a USB cable. Nothing happens, probably. Or maybe it blinks at you.

Go to the link on the Workshop Resources/ Arduino Workshop page. Follow the instructions there.

In the IDE: Tools, Board, Uno and Tools, Serial Port, /dev/tty.usbmodem

That’ll make it blink = Determinism. No matter what you do (except unplugging it) it’ll keep blinking.

Let’s mess with it.

Change the blinking times (milliseconds).

Change the output pin, say, to 8. Use your tester to show. Output!!

Let’s clean it up:

nicer variable name: output_pin

int const for output_pin

int wait for delay value, could be changed later

Let’s add input:

Select input pin, set software pullup.

pinMode(input_pin, INPUT_PULLUP);

Let’s make it do something interactive:

Decide behavior, code it in.

if(condition){

do this

}

else{

do this other thing

}

5. If there’s extra time, make the Uno run on standalone power with power pins and battery pack.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>