Details
In this assignment, you’ll create a set of small builds. This set of builds will
introduce you to the world of Arduino and help you become more familiar with
the process of building a circuit, writing a script to drive it, and documenting it.
Each build utilizes a single sensor or actuator, digital or analog, and will help
you to become more familiar with these various inputs and outputs.
The five builds (further detailed below):
- Light sensor.
- Magnetic sensor.
- LEDs.
- Motor.
- Wildcard.
For each build, you need to:
- Build the circuit on the breadboard
- Write the script to operate it
- Document the results
Build 1: Light Sensor
Analog input
Connect the photo cell light sensor (CdS photoresistor) to your Arduino. Have
your sketch continuously print out the light level it detects on the serial monitor
at 5 second intervals.
Build 2: Magnetic Sensor
Digital input
Connect the Hall Eect sensor (magnetic detector) to your Arduino. Have your
sketch continuously print out the presence/absence of a magnetic field when it
is detected.
Build 3: LEDs
Digital output
Create a circuit with 3 LEDs connected to your Arduino independently,
including current-limiting resistors for each (220Ωx‘). Write a sketch that
flashes the LEDs in an interesting sequence (a simulated traic light, e.g.). Use
the serial monitor output to indicate what is happening at each step.
Build 4: Motor
Analog output
Create a circuit with the vibration motor connected to
your Arduino. Attach something to the motor and make it “wiggle,” or do
something interesting. Use the serial monitor output to indicate what is
happening at each step.
Build 5: Wildcard
Your choice
Create one more build using any of the above components, or anything else you find in your kit. Experiment! Some
possibilities are: a potentiometer for analog input, PWM fading with LEDs, use the temp sensor,
tilt ball switch (the "poor man's motion detector"), a sound buzzer, etc.
Use the serial monitor to show what is going on.
Helpful Hints
One goal of this assignment is for you to practice finding resources for help in solving problems in physical
computing. I have purposely not given you a lot of details on these.
A good hint is to start with the Adafruit site for each component. Look for tutorials and examples. If you follow most
of them through, even if you don’t understand all of the concepts, you should start learning how to learn about this
stuff.
For instance, for Build 1, start with the product page for the light sensor (adafruit.com/products/161).
That will lead you to the tutorial, a lot of which is background theory, but after a few pages, you will see some wiring
diagrams and sample code. Use this as a starting point, but be sure to include the acknowledgement in your sketch file.
Ask for help on the Piazza course page or on Slack!
Submission
Submit your assignment in your IoT Github repo, in the A1 folder by the due date, midnight (Pacific Time).
Your report should have the following components for each build, in this order:
- Title and short description (1-2 sentences).
- Report on problems, successes, surprises, learnings (1 paragraph).
- Diagram of the build (preferably graphic, such as a Fritzing diagram, but hand sketch is fine).
- Sketch of the the circuit schematic.
- Photo of the build.
- Sketch code, formatted. (How to paste formatted Arduino sketches)
Please include acknowledgements in the code if you didn’t write it all.
- Sample of the serial monitor output.
Please begin each build on a new page. Combine into a single PDF document.
Grading
1 point for each report component for each build.