GOAL: To practice mapping different ranges of values.

OBJECTIVE: To create a simple game using multiple analog inputs and outputs

INQUIRY:

  • How are analog sensors different from digital sensors?
  • What is the numeric input range of analog sensors?
  • What does PWM stand for?  What is its numeric output range?
  • How can we map or scale between these value ranges?
  • Can we express a mood with a single pixel?
  • How can we create meaningful mappings and sensor selections?

MATERIALS:

  • Circuit Playground Express

CODE: To complete this assignment your code must include variables,  Arduino core functions, value range mapping, and analog I/O. With your partner, come up with a game that can use the analog inputs as controls and the neopixels as feedback.  The game can be simple but must show some thought; sketch out ideas and discuss concepts in the first week of this assignment.  Your project should:

  • Use at least 2 different inputs chosen from: accelerometer X, accelerometer Y, accelerometer Z, light sensor, sound sensor.
  • Use neopixels as output.
  • Use the map() function to scale the input value range to the output value range.  I33t status: use complex mapping rather than 1:1 mapping.
  • Include comments through breaking your code into sections and explaining what you are doing,  including your names at the top of the sketch.  Additionally, at the top of your code include a comment that explains how the game is played and what the goal or win condition is.