247
edits
No edit summary |
No edit summary |
||
Line 48: | Line 48: | ||
01. Initialize five sensors, receive data values from Arduino, and send them to Max. | 01. Initialize five sensors, receive data values from Arduino, and send them to Max. | ||
int val[6];//array.5 light sensors total | |||
void setup() { | |||
Serial.begin(9600); //Serial Communication set up | |||
} | |||
void loop() { | void loop() { | ||
for(int i = 0; i < | for(int i = 0; i < 6; i++){ | ||
val[i] = | val[i] = analogRead(i); | ||
Serial.print(val[i]); | Serial.print(val[i]); | ||
Serial.print(" "); | Serial.print(" "); | ||
} | } | ||
Serial.println(); | Serial.println(); | ||
delay(10); | delay(10); | ||
for(int i = 0; i < 6; i++){ | |||
val[i] = analogRead(i); | |||
Serial.print(val[i]); | |||
Serial.print(" "); | |||
} | |||
Serial.println(); | |||
delay(10); | |||
} | |||
edits