In this assignment we are going to experiment a little bit more with the Arduino’s output capabilities.
There’s no template to clone for this one. You’ll just start a project named HW11 through the Arduino IDE and then push its folder to your GitHub account (like in this video).
Use Brightspace to submit a link to your repository and a video of your project working. The video should be 15 to 30 seconds long and you can upload the file to Brightspace or host it somewhere else and submit a link.
Include the following in your README file:
This assignment will be graded on a scale from 0 to 10, taking the following criteria into account:
README.md
file with information about the lights and a drawing of the circuit.Well… sort of.
This week, we are going to use our Arduinos to create a physical, light-based, time-keeping device.
This is similar to HW05, but different.
Since the Arduino resets every time it’s shut off, and we don’t have it connected to the internet yet, it isn’t capable of knowing exactly what time it is. Because of this, there are no functions for getting the current hour, minute or second, just millis()
, which tells us how many milliseconds have elapsed since the Arduino board began running the current program.
In this assignment we are going to use millis()
to calculate the number of seconds that have elapsed since our program began running, and display that using LEDs. Since we will have a finite number of LEDs to do this, we will use “clock” seconds, meaning, numbers between 0 and 59, not 0 to infinity.
There are many ways to do this using the analog and digital output functions from the Arduino:
analogWrite()
function.analogWrite()
is NOT a requirement, but expands the palette of possibilities.The first challenge is to figure out a way to turn millis()
into wall seconds.
Every time the loop()
function runs it should use millis()
to calculate values for the 6 LEDs.
millis()
returns a number that grows from 0 to infinity, while the number of seconds is a number that cycles from 0 to 59 and then back to 0 again. Sounds like a modulus operation.
Remember that 1 second is equal to 1000 milliseconds.
These videos with week 11 content should help.
Each LED will need its own resistor. Anything between 100Ω and 200Ω is a good value.
Resistors and LEDs can be connected directly to the Arduino, without having to use wires. The lab has cables and wire-strippers to make more jumper cables.
The long lines on our breadboards can be used to distribute ground or 3V throughout the board.
Our final project is an opportunity to combine everything that we’ve learned so far to create a piece of work that showcases not only our technical knowledge, but also our design skills, and ability to think critically while making connections between our readings and our practice.
For the final project we are going to design an interactive system of our choice.
This is really open and there are many options here. The project can be an artistic piece, a video-game, something more narrative and media based, or even a prototype for a product. It just has to be interactive.
For full credit projects should have a physical-computing aspect, and an audio or visual aspect, so this means using both an Arduino for input or output, together with a p5js sketch. Projects also have to have custom functions, arrays, objects or classes, for()
loops and if()
statements, and demonstrate forethought and planning. At the same time, we’re expected to go beyond the basic concepts of programming, so use of external libraries is extremely encouraged.
The project will be due on December 16th, 2024. You have four weeks to work on it, but there are weekly milestones that have to be submitted for grading. You should not wait until the last week to start programming. You should start programming and experimenting with ideas as soon as you have an idea that you are happy with.
Think about experiments and ideas that you might like to explore. Draw and sketch some possibilities on paper/tablet. Start a repository called FinalProject
and write about your ideas on a README.md
file. You should submit at least 3 ideas. The ideas don’t have to be detailed. Just a paragraph and an image/diagram for each. We’ll go over these together and pick one that is balanced in terms of being feasible, engaging and challenging.
Feel free to use ChatGPT to get some ideas, just make sure to give it credit in your writeup.
The image/diagram you submit for each idea should show how you plan to split your project between the Arduino and p5js. Which will handle inputs? Outputs? These don’t have to be exclusive: you can have inputs and outputs on both parts of your system.
Please submit the link to your project repository via Brightspace.
This will be the milestone where you further develop the idea and create a plan for its development.
For this milestone everyone will bring something to share with the class.
This will include a short presentation and demo during class, final code review and a final writeup.