I have a doubt and i need help! I have a standard motor and i want it to read signals from a device(via arduino) which jumps from values 0 to 100, i.e. it can be 23 one sec and the other 44.
What i am trying to do, is to make the motor move when the signal is between 70 to 100. I tried map function like:
val= map(val, 70,100,0,180); //val is the signal coming which ranges from 0 to 100, but i want to only have the motor respond when its between 70 to 100.
delay(1000); //i want a delay between each position.
Here, the motor moves 180 but remains there until the next value change. Can i have a way where it moves constantly between 0 to 180, as the value increases from 70 to 100.
Also, i want to know a way where it moves clockwise when the signal increases and goes anticlockwise when the signal decreases.