Created
May 29, 2015 07:47
-
-
Save monpetit/9549e4e32ab910fdaa7d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
SoftwareSerial Serial(2, 1); // RX, TX | |
const int analog_pin = A3; | |
int value; | |
void setup() | |
{ | |
Serial.begin(9600); | |
analogReference(DEFAULT); | |
} | |
void loop() | |
{ | |
value = analogRead(analog_pin); | |
Serial.print("analog value = "); | |
Serial.println(value); | |
delay(1000 - (millis() % 1000)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment