Hi there, I am a beginner and am trying to control a servo using an FSR, however i don't know the code nor how to build it.
P.S is there any way to code it so that one FSR will make it go CW and making it go CCW.
Thanks!
Hi there, I am a beginner and am trying to control a servo using an FSR, however i don't know the code nor how to build it.
P.S is there any way to code it so that one FSR will make it go CW and making it go CCW.
Thanks!
Start with the servo example, but always use a separate power supply for the servo (a 4 AA battery pack works well). Be sure to connect the servo power supply ground to the Arduino ground.
Once you understand how the servo is controlled, find some example code and wiring suggestions for the FSR, and learn how that works. Then it will be easy to put the two together.
What's an FSR? It's OK, I found out - Force Sensitive Resistor.
OldSteve:
What's an FSR?It's OK, I found out - Force Sensitive Resistor.
Thanks. I was wondering the same thing.
skumar309:
is there any way to code it so that one FSR will make it go CW and making it go CCW.
If I understand what you're asking, yes.
The example servo\knob will take you most of the way there.
I'm pretty sure you use the FSR as one half of a voltage divider. The output of the divider is read with an analog input very much like the servo\knob example reads the voltage from the voltage divider created by the pot.
Expect the FSR to have poor resolution output which may prove poor for servo control.