So I am using a 360-degree servo motor for my project. Based on the Internet and this forum, writing a value of between 0 and about 90 should rotate it in one direction, and a value of 90 and 180 will rotate it in the other direction.
However, when I tried the code below, it just rotated in the same direction. Does anybody know the reason behind this? Thanks in advance.
That seems to be a standard RC servo rather than a 360 degree, continuous rotation "servo" that you say you are using. Is that your actual servo or does it just have the same name ?
Well, I bought it from Taobao and the description is all Chinese...
Maybe it is a cheap knock-off version of the original one
But that is indeed a 360 degree continuous rotation motor
(I should not use the word "servo")
I powered it using the 3.3V pin on the ESP32 microcontrollers
The manual of the product said it can be powered as low as 3V and up to 8V
If the voltage is not enough, will it change the logic of the rotation?
That does not sound like a very good idea. Are you sure that the "servo" is not taking too much current and causing the processor to reset ? Add some print statements to the sketch showing what it is writing to the "servo"