Created
June 29, 2016 17:31
-
-
Save TURBULENTE/3d0dd2db03f7405466cc23848372374c to your computer and use it in GitHub Desktop.
Data reading using ATtiny 45
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 mySerial(0,2); //rx,tx (set 2 pins as rx,tx) | |
byte sensorPin = 3; | |
void setup() { | |
mySerial.begin(9600); | |
pinMode(sensorPin, INPUT); | |
} | |
void loop() { | |
int buttonstate= analogRead(sensorPin); | |
mySerial.println(buttonstate); | |
delay(100); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment