How to Make (almost) Anything 2023 | Week 12.1: Interface & Application Programming

Home

Assignment: Group Project -- Compare as many tool options as possible; Individual Project -- Write an application that interfaces a user with an input &/or output device that you made.

Individual assignment: Write user interface application

Description: Processing was used in tandem with an Arduino program to create a graphical interface for light sensor value from the phototransistor in Input Devices Week 9.1

Primary files:
  1. Phototransistor input device PCB schematic and design; referenced in Week9.1 (KiCad)
  2. Phototransistor sensor value detection program (Ardunio IDE; reference source: Arduino Education)
  3. Particle graphical interface with phototransistor (Processing; reference source: Arduino Education (example 4))
  4. Sphere graphical interface with phototransistor (Processing; reference source: Arduino Education (example 1))
Procedure:
  1. Using the phototransistor circuit from Week9.1, modify the Arduino program associated with reading the sensor values by creating a normalized range for Processing
  2. Download the Processing platform from Processing.org
  3. Create two new sketch referencing the code from Arduino Education (I referenced example 1 & 4; ensure you reference the correct port for your device that you utilize for the Xiao RP2040 and update pin references accordingly)
  4. Validate the phototransitor is reporting the expected values by running the Arduino program
  5. Close the Arduino program and run the Processing sketches independently (note: Processing will be unable to interact with the Xiao RP2040 if Arduino is still running in tandem)
  6. Validate the Procesing sketch interactions by shining a light at the phototransistor and note the response
Key learnings:
  1. Processing is a fun graphical tool for data visualization -- This was my first time engaging with Processing, and I was impressed by the graphical interaction it provides a user to visualize data in a more unexpected way (as seen in the pixel example)
Input device PCB design in KiCad - PCB
Phototransistor input device PCB design in KiCad, referenced in Week 9.1



Sensor output
Phototransistor light sensor output in response to changing light



Particles interface
Particle graphical interface that moves the particles in response to the phototransistor light sensor values



Sphere interface
Sphere graphical interface that moves the light reflecting off the sphere and corresponding shadows in response to the phototransistor light sensor values