Homework 13

Due: 2024/12/09 - 5PM

Programming (10 points)

Intro:

In this assignment we are going to experiment connecting our Arduino to a p5.js sketch.


Getting Started and Submitting:

You can start by cloning our HW13 template into a repository called HW13. This has example code for sending data from the Arduino to the p5.js sketch using JSON strings. You can use a different strategy, this code is here mostly as a placeholder and example.

If you decide to use JSON strings, you’ll have to install version 6.21.5 of the ArduinoJson library by Benoit Blanchon via the Arduino IDE.

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:

  • Description of the Arduino logic and circuit.
  • A schematic drawing of your circuit.
  • OPTIONAL: A drawing of the Finite State Machine for your system.

Evaluation

This assignment will be graded on a scale from 0 to 10, taking the following criteria into account:

  • README: repository includes a README.md file with information about the circuit and a drawing of the circuit.
  • Compliance: work follows the requirements specified in the assignment description.
  • 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.

HW13

Add an Arduino

Pick a previous assignment and add a physical computing component to it.

Maybe one of the first assignments we did could benefit from a potentiometer or a button. Maybe the Sol LeWitt sketch from HW04B, or some aspects of HW03A or HW03B could be parametrized to read an input from the Arduino.

You don’t have to modify a very complex sketch; try one of the earlier homeworks. You don’t have to add multiple inputs, but try to use 2 to get some practice with serial communication of multiple values.

The physical input should change something significant about the sketch, not just the background color.

Project (10 points)

Review:

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 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.

Before starting work on Milestone 03, your repository should have a README.md file with the following information from Milestone 02:

  • System diagram
  • FSM diagram
  • Circuit diagram
  • Description of any external data or library that you are planning to use
  • Description of any sensor, output component or mechanism that you are planning on using or building
  • Reference images, texts and projects
  • Plan for user testing
  • Short discussion of why your project is relevant:
    • how is it related to our readings?
    • how does it connected to society?
    • why is it important to you?

This Milestone: Working Prototype and Pseudocode

For this week’s milestone you will further develop your project by working on its code and circuit.

Your code doesn’t have to be final, but all the major pieces should be in place, with pseudcode where appropriate, and it should be easy to see how you will finish it in the next week.

By this milestone your repository should have:

  • A healthy amount of Arduino and p5.js code
  • Code for communication between Arduino and p5.js
  • Pseudocode or outline of any functions, classes or logic that is yet to be implemented
  • Updated circuit diagram, system diagram and FSM diagram

Next Milestones

Milestone 4 (due: 2024/12/16)
In class demo and presentation (30 points)

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