Week 6: Untoolkit (Inputs)

Because of the corona virus the school was closed. Kim and I diveded tasks We continued at home.

Stap 1: Sluit je switch aan met een LED (geen code)

I've written my notes during the class discussion in here, but they are gone now...

Thanks a lot to Kaz for sending me these codes.

Don´t know yet how to rhyme this to the youtube videoclip

https://docs.google.com/document/d/1eXvXrDZ94IPIKxUatRcuwv3Q8BOb3c3OaKpkV3vgDZw/edit#heading=h.cwl4u0cc14wv probably need to use these codes instead, don´t know yet which one

Code according to Kaz (shoutout)

//ARDUINO CODE FOR ANALOG SENSOR int sensorValue = 0;

void setup() { Serial.begin(9600); //needs to match processing baudrate }

void loop() { Serial.println(analogRead(A0)); // for debugging only sensorValue = analogRead(A0); // store value in sensorValue //Serial.println(map(sensorValue, 0,1023,0,255)); // map to processing range delay(50); }

Baud rate can be found in setup: Serial.begin(9600);

Minimum value (waarde) by sensor: 65

Maximum value by sensor: 1.000

Code for mapping

//ARDUINO CODE FOR ANALOG SENSOR int sensorValue = 0;

void setup() { Serial.begin(9600); //needs to match processing baudrate }

void loop() { //Serial.println(analogRead(A0)); // for debugging only sensorValue = analogRead(A0); // store value in sensorValue Serial.println(map(sensorValue, 0,1023,0,255)); // map to processing range delay(50); }

code given by Loes

Stap 3: Sluit dan je eigen sensor aan

Minimum value: 210

Maximum value: 240

Minimum value: Maximum value:

Doesn't seem to change much, eventhough the light reacts as aspected

Stap 4: Capacitive sensing & "smoothing" (gemiddelde waarden)

Last updated