let's say i have a potentiomtre and im using it to turn a couple of led's on and off i but the code i want is something like this if some could help. so if possible the code could be like if the value is greater than 100 but less than 200 turn the led on but if its lower than 100 or higher than 200 turn led off pls help i have been using arduino for about a month now and i not exactly the best coder out there but i just need help on this bit of code so thanks.

11 years ago*

Comment has been collapsed.

11 years ago
Permalink

Comment has been collapsed.

I've not used or coded for arduinos but that's a pretty simple if statement so something like this could work
If( POTvalue > 100 && POTvalue < 200){ -code that makes the LED turn on- }

11 years ago
Permalink

Comment has been collapsed.

thanks

11 years ago
Permalink

Comment has been collapsed.

Closed 11 years ago by chris3199.