Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- IPEA N14
- EXPO 2023
- */
- void setup(){
- pinMode( 7, OUTPUT );
- pinMode( A0, INPUT);
- //Serial.begin( 9600 ); //for debug
- }
- void loop(){
- int value = analogRead( A0 );
- //Serial.println( value ); //for debug
- if( value > 500 ){
- digitalWrite( 7, LOW );
- }
- else {
- digitalWrite( 7, HIGH );
- }
- delay( 5000 );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement