Beginner Robotics

Aside from the small workshop in grade 9, I have never encountered Arduino before and this is my first time working with it. Luckily the set I was given came with a manual that taught me the parts, and gave me different projects to do.

I decided to work on this digital hourglass project.

The first step was to connect power and ground to the breadboard

Next was to add the resistors needed

Next we connect the rest of the wires that would create a circut through the led lights and resistors.

Then the led lights.

However, at this point I realized I was using the wrong resistors. I had to search online to match the right 220ohm resistors. This then resulted in a torturing process of removing all of the resistors and replacing them.

The last part was to add a tilt switch as an addiontal function of turning off the timer.

After finishing the physical project, we move into the digital space of coding the arduino block. The manual provided a nice line by line direction of what the code’s purpose. Here’s the general flow.

  1. Setup
    • Set inputs and outputs to run the circut
  2. Loop Begins
    • Store currentTime = millis()
  3. (Decision)
    • Measure using the built in timer to tell if the time interval is up
    • Yes → Proceed to turn on the next LED
    • No → Skip to Step 6
  4. Turn on Current LED
    • Reset the time interval
  5. Read Switch State
    • Tell if the switch is getting tilted
  6. (Decision)
    • If tilting then urn off all LEDs
      • Reset everything else
    • If not then Continue

Here’s the code in action.


Comments

One response to “Beginner Robotics”

  1. mcrompton Avatar
    mcrompton

    This is a good succinct post, Joshua. You’ve documented your walk through of the tutorial that you did and I am convinced that you have a basic exposure to working with arduinos. I would encourage you to continue to play with this tool and try to come up with your own projects to get to a deeper understanding of what they can do.

Leave a Reply

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