acrylic art project started, and projects moved to individual folders

This commit is contained in:
shark
2018-11-14 18:58:58 -06:00
parent a9b9236b00
commit e6832551b0
5 changed files with 1104 additions and 0 deletions

View File

@ -0,0 +1,21 @@
int light = 0;
void setup() {
}
void loop() {
int ss = 30; // sample size for light sensor
int average = 0;
for (int x = 0; x < ss; x++) {
average += analogRead(light);
delay(1);
}
average /= ss;
String bitIn = "";
for(int x = 0; x <9; x++) {
bitIn += average >> x;
}
int a = bitIn.substring(0, 3).toInt();
int b = bitIn.substring(3, 6).toInt();
int c = bitIn.substring(6, 9).toInt();
// set LED strips to c, b, a (in order RGB)
}