10-30-151Setup #1 – read the levels from a potentiometer. Setup #2 – control the brightness of an LED with a potentiometer – NOTE – use a breadboard to setup the circuit instead of building it directly on the Arduino. Setup #3 – control the movement of a servo motor with a potentiometer

Monday – go to the Engineering Room

today-

  1. if I haven’t checked you off the list, please show me:
    1. stoplight code with walk/don’t walk light
    2. breadboard with switch and five LEDs wired
  2. after I have checked off your code email your stoplight program to yourself as an attachment.  You will need your stoplight program to run the real stoplight that you make with Mr. Varvil.  Make sure that you do this before the end of the class.
  3. done with the above?  Then move on to advancing your skills with a new component: the potentiometer.
    1. Setup #1 – read the levels from a potentiometer.Setup #2 – control the brightness of an LED with a potentiometer – NOTE – use a breadboard to setup the circuit instead of building it directly on the Arduino.

      Setup #3 – control the movement of a servo motor with a potentiometer

  4. at 2:30 you will remove all of the components from your breadboard and put them in the labeled cup on the middle table.
  5. Monday – go to the engineering room.

10-28-15

today- our main goal is troubleshooting.  I want each of you to have success with your circuit that includes the three stoplight LEDs as well as WALK/DON’T WALK lights.

IF your circuit is working then move on to this activity.  DO NOT DISASSEMBLE YOUR CIRCUIT.  It should work as is.

  1. follow this diagram as a starter to build a circuit with five connected LEDs.
  2. use the Blink sample code as a starter to get the five LEDs blinking in sequence, one after the other.
  3. save this sketch (program) as BlinkFive.
  4. Now we we will modify the sketch to make it easier to follow for other humans.  To do this, we will assign a clear value for each pin like this:Screen Shot 2015-10-27 at 1.10.54 PM
  5. now it is MUCH easier to create an LED sequence because you can name the color you want instead of having to remember what color is in pin11.

LIGHT THE BEAT – take ten seconds of your favorite music track.  Create a program where the LEDs blink to the beat of the music.  Show me your work when you have the beats and lights mixed.

Part 2 – triggering the sequence:

  1. add a button to your existing circuit – like this: redyellowgreenbtn_bbgoodScreen Shot 2015-10-23 at 12.54.48 PM
  2. now we will use that button to trigger your lighting sequence.
  3. What do you have to add to void setup so that the Arduino recognizes a button?
  4. Here’s how – note that there are TWO new lines added – an if statement and an else statement:Screen Shot 2015-10-27 at 1.30.31 PM

NOW replace your button with a different INPUT.  Ask me for a momentary switch.

Use your new skills and try the LED light fader.

DONE? Ask me for a potentiometer.  Then click here.

10-26-15

today-

  1. troubleshooting – let’s get your button working to trigger the traffic light.  Possible solutions:
    1. is the positive (long) leg getting power for any dark LEDs?  Another way to tell is that the FLAT side of the LED is the negative and should be connected to ground.
    2. is the button seated (pushed in)?
    3. is the button connected to pin 2?
    4. check your resistors – all of the LED resistors should be 220 – look at the bands on the resistor.  They will be in a red-red-brown-gold pattern.  
  2. once your button is lit add a WALK/DON’T WALK signal for the pedestrian.
  3. once the WALK/DON’T walk works go to your project website and answer these questions:
      1. what have you learned about using Arduino?
      2. what have you learned about building a circuit?
      3. what do you want to learn next about Arduino?

10-23-15

today – The Stoplight

We will wire up a button as part of your breadboard.

Ingredients:

breadboard

arduino

3 blue resistors

1 10k resistor (brown black orange stripes)

button

jumper wires

red, yellow, green LEDs

When you are done it should look like this:

redyellowgreenbtn_bbgood

click the image to zoom in.

Pay close attention to the resistors coming off of the button.  One of them is a 10k resistor – take a look at the picture for details.
Screen Shot 2015-10-23 at 12.54.48 PM

Now for the code – we will do this together on the big screen.  Early finisher?  Then look at your blink code – what do you need to type in the void setup part of your code?

Test the circuit and troubleshoot

Challenge
1. how can you add two more LEDs for a walk/don’t walk signal?

Update your project website:

  1. what have you learned about using Arduino?
  2. what have you learned about building a circuit?
  3. what do you want to learn next about Arduino?

10-21-15

Want to review last week’s opening presentation?  Click here.

Find your breadboard and Arduino on the middle table.

  1. Connect to your computer and run the Blink sketch.  If it doesn’t work then start by:

checking your USB connections

making sure that you are using the right port – click on Tools, Port and select one of the two bottom ports on the drop-down menu.
Screen Shot 2015-10-16 at 10.51.47 AM

2. wiring LEDs and resistors on the breadboard:

Arduino stoplight breadboard circuit
click for full size image

Follow this diagram and wire in red, yellow and green LEDs.  Pay close attention to the pins:

red to pin 13
yellow to pin 12
green to pin 11

You will more wires and two more resistors.  One 220 resistor and one 10K resistor.

3. and now – the code…

>look at the Blink sketch – if this line makes the red light (pin 13) blink

Arduino blink pin 13then how could you make yellow light (pin 12) blink at the same time?
now add the green light (pin 11) into the sketch and make it blink with red and yellow.  SAVE THIS SKETCH as lightsblink

how can you get the links to blink one after the other: red then yellow then green?SAVE THIS SKETCH as linkssequence.

4. add more LEDS – add more LEDS, resistors and wires to your circuit.  Can you get the new LEDs to light up?

5. adding a button (input)

follow this diagram to add a button to your breadboard.  You will need to add two resistors, three wires and a button.

>does your sequence code still work?

click for full size version
click for full size version

10-15-16

All Arduino today

  1. Search for Arduino on your computer and open the application.
  2. Connect your Arduino to your computer using USB
  3. Using the Arduino app, click on File, Examples, Basic and choose the sketch named BlinkScreen Shot 2015-10-16 at 10.46.04 AM
  4. Click on the arrowScreen Shot 2015-10-16 at 10.51.09 AM at the top of the Arduino sketch to send Blink to your Arduino board.
  5. IF you get an error message like the one below you have to choose a different connection from the drop-down menu. Screen Shot 2015-10-16 at 10.51.47 AM
  6. IF you connect to your Arduino then see if the small LED light blinks on the board.
  7. Once you are connected and have a blinking light, it’s time to change the code.  Change the delay(1000) value – that’s the number – to a different value.  Screen Shot 2015-10-16 at 10.54.53 AMWhat happens if you make the value larger or smaller?  What if you copy/paste the portion of code that starts with digitalWrite over and over?  How does the blinking change?

Once everyone has a connection with their board we will

-connect an LED to pin 13
-connect the breadboard to your Arduino
-add a resistor and LED to your breadboard
-make it BLINK
-add more LEDs and control them

10-9-15

MONDAY – go to Varvil’s room.  We will be showcasing your 3d prints and the marble mazes.

today – it’s all in to complete your designs by the end of the period.

What is due today?
>submit final shell design

Each of you should submit a final, finished design for your windup motor shell.  Click here for project details. The design must be no larger than 70mm by 70mm by 70mm.

>answer prompts 1-3 on your project website
Click here for questions 1-3

To submit your final design follow these steps:

1. in the design view click on Design.

2. choose Properties from the menu.

3. rename your design to something that makes sense.

4. change the Visibility from Private to Public.

When you are done click here to submit your design.

10-7-15

Today- continue work on the Re-engineered Toy.  We only have today and Friday to work.

goals-

  1. Test fit of your 3d printed shell.
    • if it’s a good fit then begin designing the final, creative shell.  Show me your shell before you begin designing.
    • if there are fit issues then redesign your shell QUICKLY.  The sooner you redo the design the sooner we can print the second version.
  2. Your final design must fit within a box that is no larger than 70mm high by 70mm deep by 70mm long.  Your design will not be printed if it exceeds these measurements and you will lose points.
  3. Submit your final design for a print to be ready by Friday.

On Monday we will all meet in the Engineering Room.

10-5-15

TODAY before you get work on your designs:

  1. Send me the web address of your project website.  This is a graded assignment.  Click here to send me the web address.
  2. Complete the class survey.  This will help Mr. Varvil and I to better teacher the course and work with you.

Reengineered Toy Project – project details here

  1. Test fit your shell.
  2. No shell submitted yet?  That is due by the end of class.  You must submit a shell design TODAY.
  3. Begin work on your final design.  Read project for more details.
    1. Your final design must fit within a box that is no larger than 70mm high by 70mm deep by 70mm long.  Your design will not be printed if it exceeds these measurements.

By the end of Wednesday – submit completed shell with interesting design.  This gives you an opportunity to revise your design as needed.

Friday is the last day to submit a final shell design.

Shells printed:

Ryan
Nat
Issac
Unknown creator

Shells received but not printed:
Emma – motor design in – now turn it into a shell.
Cooper – private.
Alex – resize and then we can print.
Ollie – shell needs a hole.

10-2-15

goals by end of class:

  1. submit final ring designs
  2. submit final notebook clip designs
  3. progress on wind-up toy project
    1. choose a partner, choose your toy for redesign
    2. complete measurements – recorded on paper with a partner
    3. create project page on website
      1. post image of measurements onto project page
    4. create basic shell and submit the shell for printing – put your initials on the shell so we can tell that it is YOURS’.
  4. IF you finish 1-3 you may begin work on the final design of your shell.  Be aware that the shell design may change after printing.