Sunday, July 21, 2013

Real-Time Plotting; Arduino Code

Finally got all the python code worked out for this mini-project; here's what's driving the board:
/*
* data-logging-proto.sch
* +3.3V -> LDR -> A0 -> 10k R -> GND
*/
void setup(){
  Serial.begin(9600);
}

void loop(){
  if(Serial.available() >0){
    int value = analogRead(A0);
    Serial.println(value);
    delay(125);
  }
}

No comments:

Post a Comment