Chakra Vase Prototype
Light object prototyping: testing, failing, learning, correcting, and one day making it work!
![]() |
| Chakra Questionnare using Java-script for the check boxes. http://192.168.13.98 |
Here you see the questionnaire. It is sending the information in the form of 1 and 0, according to the check boxes, sending 1 if it is checked, and 0 if it is not. Sending = [0000000]. What is missing, is a good way for Arduino to read and interpret these numbers as the values for the pixels in my Adafruit Neopixel strip.
What I want it to do, is to light up the led number ( pixel number = i) and light it up by 5 percent if the box in the questionnaire has been checked (checked box = 1) (unchecked box = 0)
So far, this is what I have got:
Here is a screen shot with monitor of the code that is running in the film above, and the sketch for Arduino:
#include <Adafruit_NeoPixel.h>
#define PIN 13
// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)
// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2) Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, PIN, NEO_GRB + NEO_KHZ800);
//?what does 60 stand for?
//i = ? int i = 0;
//char val[7];
//String content;
void setup() { Serial.begin(9600); strip.begin();
strip.show(); // Initialize all pixels to 'off'
}
void loop() {
//if receiving data from raspberry, read string
// data received as alternative (of seven) checked = 1 else/not = 0
//val = {"0","1","1","0","0","0","0"};
//char val[] = {'0001110'};
//test manually input numbers
int val[7] = {0, 0, 0, 1, 1, 1, 0};
// if (Serial.available()) {
//four loop
for (int i = 0; i < 7; i++) { val[i] = Serial.read();
if (val[i] == - 1) {
// write code to augment LED brightness for val[i] by five percent
strip.setPixelColor(i, 180, 0, 255); strip.show();
} else {
strip.setPixelColor(i, 0, 0, 0); strip.show();
}
Serial.println(i);
Serial.println(val[i]); delay(500);
}
}
//set colors for (val[i] R, G, B)
//strip.setPixelColor(0, 180, 0, 255);
//strip.setPixelColor(1, 82, 0, 188);
//strip.setPixelColor(2, 0, 0, 255);
//strip.setPixelColor(3, 153, 221, 128);
//strip.setPixelColor(4, 255, 230, 0);
//strip.setPixelColor(5, 255, 109, 0);
//strip.setPixelColor(6, 255, 0, 37);
The plan is to make it light up with only the three brightest leds when you have completed the survey, and on screen you will see your test results and what it actually means.



