/* * 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); } }
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:
Thursday, June 13, 2013
Serial interface Test Code
Here's the source code I used to test out my serial interface programs:
int LED_Pin = 13; // Hello World for use with serial comms testing. void setup(){ Serial.begin(9600); } void loop(){ Serial.print("Hello World\n"); delay(1000); Serial.print("Goodbye World\n"); delay(1000); }
Friday, April 5, 2013
LED Test
int LED_Pin = 13; void setup(){ pinMode (LED_Pin, OUTPUT); } void loop(){ digitalWrite(LED_Pin, HIGH); delay(1000); digitalWrite(LED_Pin, LOW); delay(1000); }
Subscribe to:
Posts (Atom)