Homework 11

Due: 2023/11/29 by 1PM

Programming (12 points)

Password Machine

This week, we are going to use our Arduinos to create a physical-computing password machine.

Kind of like the electronic door lock example we saw in class, this will be a machine that keeps track of user inputs and signals success if a correct pre-determined sequence of inputs is entered, or failure if an incorrect sequence of inputs is entered.

There are many ways to do this using the analog and digital input functions from the Arduino:

  • Use buttons or switches along with digitalRead() to detect a specific sequence of button presses
  • Use buttons or switches along with digitalRead() to detect a specific combination of buttons that have to be pressed at the same time
  • Use a combination of digitalRead() and analogRead() to detect specific combinations or sequences of buttons presses and potentiometer positions
  • Use some wires or copper tape to turn everyday objects into switches

Requirements:

  • Use at least 3 physical components for inputs (buttons, switches, potentiometers, photoresistors, bananas)
  • At least one of the components has to be something other than a switch or button
  • Use 1 output component to signal success: a green, white or blue LED, for example
  • Use a different output component to signal a failure: a yellow, orange or red LED, for example
  • Your password should be secure, so... use at least 3 steps in your sequence

Considerations:

As an example, a correct password sequence using a potentiometer and 2 buttons could be:

  • Turn potentiometer all the way to the left
  • Press button 1
  • Turn potentiometer all the way to the right
  • Press button 0
  • Turn potentiometer to the middle
  • Press button 1
  • Press button 0

This password sequence has 7 steps and is more than what’s expected for this assignment.

It’s easier to use fixed-length sequences. What this means is that the system only reports if a sequence is correct after a fixed number of steps has been taken, then it reports success or failure and resets.

In the case of the example above, it would wait until there are 4 button presses and only then turn on either a red or green light.

If using a photoresitor or the capacitance sensing library, keep in mind that it’s really hard to program these to work over long periods of time and under any and all conditions. Changes in the room lighting will affect how a photoresistor works. We just have to make sure we calibrate them right before making the video.

Submission and Grading:

There’s no template to clone for this one. We’ll just start a project named HW11 through the Arduino IDE and then push its folder to our GitHub account (like in this video).

Include a README with:

  • Drawing of the Finite State Machine for your password.
  • Description of your logic and the correct steps necessary for a successful sequence.
  • A schematic drawing of your circuit.

Use Brightspace to submit a link to your repository and a video of your project working. The video should show a correct sequence of steps and an incorrect sequence. You can upload the file to Brightspace or host it somewhere else and submit a link.

The following guide will be used for grading:

Task Points
README file with circuit diagram 2 points
FSM diagram 2 points
Follow assignment instructions 2 points
Implementation 2 points
Thoughtfulness 2 points
Craft 2 points

Implementation: work shows evidence of understanding programming concepts and you are fully using them to express your ideas.

Thoughtfulness: project demonstrates your personality and it’s not a straightforward re-implementation of someone else’s idea.

Craft: code and results show care and consideration for presentation and professionalism, and work doesn’t look like it was rushed.

Read & Respond (5 points)

What is media archaeology?

Keep this question in mind while you read and write a 200-word response to the following:

1. Code and Clay, Data and Dirt by Shannon Mattern
Introduction and Chapter 1 (pdf pages vii - xii, xxxv - xl, 1 - 5)

The sections to read are:

  • Introduction ETHER/ORE (pg vii)
  • Building Hudson Yards (pg vii)
  • Our Materials of Investigation (pg xxxv)
  • Waves and Wires CITIES OF ELECTRIC SOUND (pg 1)

As always, your response should be personal, meaning that you should be expressing your views and opinions about the text and not just summarizing it. You can use the following rubric to guide your response:

  • Short summary: in one or two phrases, what is the book about?
  • Memorable quote: Is there a phrase that stands out?
  • Did you learn something new? What?
  • What do you agree or disagree with? Why?
  • Did the text remind you of any other texts we’ve read so far?
  • How is the text related to programming?
  • Was there anything in the text that surprised you? What? Why?

Please submit your response via Brightspace.

Alternatively, you may create a reading.md file in your HW11 repo and write your response in markdown. Just make sure to submit a link to the file using Brightspace.

Grading for the readings will be assigned following these considerations:

Response Grade
Only summarized the reading 2 points
Answered some of the prompts, but I can’t tell whether
you actually read the text, or what you thought
3 points
Answered enough prompts to express opinions 5 points

Project (5 points)

Description:

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.

Dates, milestones, submissions

The project will be due on December 20th, 2023. 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.

Milestone 1 (due: 2023/11/29)
Project ideas and diagrams (5 points)

Think about experiments and ideas that you might like to explore. Draw and sketch some possibilities on paper/tablet. Start a repository 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.

Milestone 2 (due: 2023/12/06)
Project Proposal, planning and organizing (10 points)

This will be the milestone where you further develop the idea and create a plan for its development.

Milestone 3 (due: 2023/12/13)
Working Prototype and Pseudo-code (10 points)

For this milestone everyone will bring something to share with the class.

Milestone 4 (due: 2023/12/20)
In class demo and presentation (20 points)

This will include a short presentation and demo during class, final code review and a final writeup.