Hi everyone,
I am completely new with Arduino, and I am feeling a bit overwhelmed, so I would like some guidance.
I am trying to use a Ripmax SB09 Servo (see here for the exact product) with my Arduino Uno R4 Minima coupled with a Grove - Arduino starter kit.
More specifically, my (simplified) project would be to use the SB09 that should be both a potentiometer and a servo in one like follows:
- the user set the SB09 to a certain angle (directly with their own hands),
- the user both a button (I understand that part),
- the SB09 go to another given position depending on the set angle.
Rince and repeat.
My problem is I have absolutely no idea how to do that, from the linking of the SB09 to the board to what software to write to make it work. I suspect that I would need to use an analogue port, but can the same port be used for both INPUT and OUTPUT? And similarly software-wise? Since the SB09 is not "plug-and-play" compatible with the Arduino, how to I make it work? I suspect that both the <Servo.h>
library and the standard use of pinMode(potentiometer, INPUT);
in the software cannot be enough if the component is both.
Could you kindly share with me some insights? Thank you in advance.
As a start, I have successfully followed a few tutorial project with the kit, so you may not need to mention the preliminary step of learning how to do the most elementary tasks with the board.