What I wanted to learn, and why it interested me: I plan to make a star object that glows based on the user's hand movement for booth. I was interested to learn the technical aspect before actually making the physical product.
What I wanted to learn, and why it interested me: I plan to make a star object that glows based on the user's hand movement for booth. I was interested to learn the technical aspect before actually making the physical product.
Final outcome: I was able to connect a proximity sensor to the LED strip and based on how close the users hand movement is to the sensor. It changes opacity + color based on how close or far away you are.
Images of final creative/exploratory output
[Final image or video. Your image caption goes here. Remember to add alt text if needed.]
[Final image or video. Your image caption goes here. Remember to add alt text if needed.]
Process images from development towards creative/exploratory output
[Process image or video. Your image caption goes here. Remember to add alt text if needed.]
[Process image or video. Your image caption goes here. Remember to add alt text if needed.]
Process and reflection:
The code itself was not too difficult to write because it was just mapping values to another. I was having a lot of issues with the wiring and hardware because I kept getting unlucky and used broken LED strips. I had to test out if it was working before soldering or connecting the wires to my main board. I did not realize that the LED strip could not handle 9V and I accidentally fried a LED strip and that is why it was not working. I had Cody double check all my soldering and wiring and it looked fine. I was using the test code to test out the hardware before the software. In class, you helped me get my LED strip to work. I realized I could only use up to 5V for my LED strip or it will fry it. Overall, the project was much doable in the timeframe we have. Hardware is the more difficult part for me compared to the software.
Technical details
[Electrical schematic. Add a brief caption for clarity; this could be as simple as "Electrical schematic" but you can also use the space to describe anything that would be useful for your reader, e.g. "The 12V power came from a LiPo battery, not drawn."]
/*
include <Adafruit_NeoPixel.h>
const int LED_DATA_PIN = 2;
const int NUM_LEDS = 60;
int brightnessVal;
const int irPin = A0;
Adafruit_NeoPixel leds(NUM_LEDS, LED_DATA_PIN, NEO_GRB + NEO_KHZ800);
void setup() {
Serial.begin(9600);
leds.begin();
leds.clear();
leds.show();
}
void loop() {
int irValue = analogRead(irPin);
Serial.print("Raw: ");
Serial.println(irValue);
brightnessVal = map(irValue, 0, 1023, 0, 255);
leds.setBrightness(brightnessVal);
int colorVal;
colorVal = map(brightnessVal,0,255,0,255);
for (int i = 0; i < NUM_LEDS; i++) {
leds.setPixelColor(i, leds.Color(255, colorVal, colorVal));
}
leds.show();
}