IFD:Interaktive Elektronik 2012/5. Meeting

From Medien Wiki
Potentiometer A0 Serial Steckplatine.png


Step 1: Read a sensor value or potentiometer value

run this to receive singles bytes of a sensor value. Receive the bytes using processing, puredata or other software.


int analogValue; 
 
void setup () {
  Serial.begin(9600);
}
 
void loop () {
  analogValue = analogRead(A0)/4;
  Serial.write((char)analogValue); // char is a byte
  delay(100);
}

Step 2: Read multiple sensor values

Problems + Solutions - discussion in class. Homework: 1. Get Arduino running with one or more sensors and write a small test sketch in processing (or a program in your favourite language) to receive the two values.

2. Build a sensor of conductive material and experiment with it. Find an application using it. Document your Experiments in drawings, videos, photos.