Objectives | Components | Summary | Details | Submission | Grading

Assignment 1

DUE: May 16, 2018

Objectives

Components

Summary

The purpose of this assignment is to focus on the basics of Arduino hardware and software coding, the use of breadboards, and the serial monitor for information display.

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): For each build, you need to:

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 E€ect 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 tra€ic 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. A‚ttach 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 stu€ff.

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 after 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:
  1. Title and short description (1-2 sentences).
  2. Report on problems, successes, surprises, learnings (1 paragraph).
  3. Diagram of the build (preferably graphic, such as a Fritzing diagram, but hand sketch is fine).
  4. Sketch of the the circuit schematic.
  5. Photo of the build.
  6. Sketch code, formatted. (How to paste formatted Arduino sketches)
    Please include acknowledgements in the code if you didn’t write it all.
  7. 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.
Build 1 7 pts
Build 2 7 pts
Build 3 7 pts
Build 4 7 pts
Build 5 7 pts
Total 35 pts