Hello. I apologise in advance for my inexperience but this is my first attempt at servo control with the NodeMCU V2. Right at the start I hit a problem that I don't understand. With simple code I want to control the servo with a potentiometer, but the servo only moves around 90 degrees (roughly from 45 to 135). The same thing happens when I upload the "Swap" example from the Servo.h library.
I don't understand what I've done wrong, the current is rather not missing, the grounds are common, I've connected the potentiometer to 5V as well as 3.3V, and I've also controlled the servo via a transistor and connected it to different pins, I've copied examples and schematics from the internet.... still the same. On the serial monitor the values from the potentiometer show me 13-1024, which is rather ok. The cat variable also operates between 2 and 180.
I also connected the MG90 servo and it behaved identically.
After plugging everything into an Arduino Uno and uploading the same code, everything works as expected so it's more of a NodeMCU thing.
I was wondering if maybe it's the Servo.h library that works badly with the ESP8266 but in all the examples I've found people are using it successfully. I installed older versions of Servo.h but that didn't help either.
I am using a NodeMCU V2, an MG995 servo and a 10k potentiometer.
I have included a link to the video and a screen shot of the code below:
https://www.youtube.com/watch?v=UPR1Ny_D6Fo
.
I don't understand what I've done wrong, the current is rather not missing, the grounds are common, I've connected the potentiometer to 5V as well as 3.3V, and I've also controlled the servo via a transistor and connected it to different pins, I've copied examples and schematics from the internet.... still the same. On the serial monitor the values from the potentiometer show me 13-1024, which is rather ok. The cat variable also operates between 2 and 180.
I also connected the MG90 servo and it behaved identically.
After plugging everything into an Arduino Uno and uploading the same code, everything works as expected so it's more of a NodeMCU thing.
I was wondering if maybe it's the Servo.h library that works badly with the ESP8266 but in all the examples I've found people are using it successfully. I installed older versions of Servo.h but that didn't help either.
I am using a NodeMCU V2, an MG995 servo and a 10k potentiometer.
I have included a link to the video and a screen shot of the code below:
https://www.youtube.com/watch?v=UPR1Ny_D6Fo
