Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int SensorinPinni = A0;
- int SensorinArvo = 0;
- void setup(){
- Serial.begin(9600);
- pinMode(2, OUTPUT);
- }
- void loop(){
- SensorinPinni= analogRead(SensorinPinni);
- Serial.println(SensorinPinni);
- delay(500);
- if (SensorinPinni <300) {
- digitalWrite(2,HIGH);
- }
- else if (SensorinPinni >300)
- {
- digitalWrite(2,LOW);
- }
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement