Paper Prototype, BOM, Timeline, User Map & Attaching the Neopixels to Potentiometers - Final Project Step 2
This week our goals were to build our paper prototype and learn more about how the neopixels work.
Building the paper prototype was a very helpful exercise because it required us to think through the dimensions of our project. We decided on 2’x2’ for the light wall/division between viewer and user. We decided on this by sitting at either end of the type of table we plan to build our piece on and then measured out what would be enough visual obstruction. We then imagined what size control panel would fit two of our hands well, we decided on 12'“x6'“. We looked through button/knob/slider options and picked the ones that we felt would feel the best under our fingers, would be the most intuitive to use and would be the cleanest to assemble on our board. We found measurements for these and cut them out of paper and included them on our control panel. Finally, we thought about how many neopixels we would want on our wall and decided on a 15 by 15 grid (neopixels 1.25” apart from eachother) — we drew them onto our paper prototype.
Making the Paper Prototype:
Components:
We also made our BOM, Timeline and User Map. The BOM is complete except for the type of wood we want to use, we will choose that next week and the Timeline is complete except for the exact dates when we will be building all of our components, we will decide this next week after we have our in-class playtest.
BOM, Timeline & User Map:
Attaching the Neopixels to Potentiometers:
We were able to hook up the neopiexels to the potentiometer. We mapped the potentiometer to from 0-1023 to 0-255 and then placed the mapped potentiometer into either the R, G, B, or brightness values. We added 3 more potentiometers so that we could manipulate the R, G, B, or brightness values individually and/or simultaneously.
Arduino Code:
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#define LED_PIN 6
#define LED_COUNT 11
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
void setup() {
#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)
clock_prescale_set(clock_div_1);
#endif
strip.begin();
// strip.show();
}
void loop() {
int potentiometerR = analogRead(A2);
int potentiometerBright = analogRead(A3);
int potentiometerG = analogRead(A4);
int potentiometerB = analogRead(A5);
int mappedPotR = map(potentiometerR, 0, 1023, 0, 255);
int mappedPotG = map(potentiometerG, 0, 1023, 0, 255);
int mappedPotB = map(potentiometerB, 0, 1023, 0, 255);
int mappedPotBright = map(potentiometerBright, 0, 1023, 0, 255);
Serial.print(mappedPotR);
Serial.print(",");
Serial.print(mappedPotG);
Serial.print(",");
Serial.print(mappedPotB);
Serial.print(",");
Serial.println(mappedPotBright);
//delay(1);
for (int i = 0; i <= 11; i++){
strip.setPixelColor(i, mappedPotR, mappedPotG, mappedPotB);
}
strip.setBrightness(mappedPotBright);
strip.show();
}