AlI things are working good
but the main problem is when I move the app slider 0-180 degrees the servo moves only 0-90 degrees
can anyone help me with that!!
Thanks in advance.
Regards,
Abhijeet
@techboystoys please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```
I am using V1 and V2 virtual pins to control two sliders for two servos
The min value is 0 and the max is 180
I am adding delay for smooth motion of servos
So it goes beyond the 90° now?
Delete the delays and try again, if that won’t work try to write a fixed 180 value to V1 and see if that works.
Also try with slider setting “send on release”.
I got the solution
the main problem is in esp8266 servo.h library
So I changed MIN_PULSE_WIDTH 1000 to 500 and MAX_PULSE_WIDTH 2000 to 2500
Now my servo move freely
Thanks to PeteKnight and bazzio for your precious time
best,
Abhijeet
I have come up with the same problem with my servo only moving through 90degrees. I have attempted to adjust the Pulse widths as described by Abhijeet but it still doesnt appear to be working. I am using a nodeMCU ESP8266 with Blynk 2.0.
Datastreams - I have tried a few different settings but with no joy, they are currently set as integer, min = 0 and max = 180.
Not sure if I have updated the settings correctly or if anyone has any other ideas?
And then the output from the console window is as follows…
C:\Users\dh526\AppData\Local\Temp\.arduinoIDE-unsaved2023111-1980-1e6e1yb.mr0zl\sketch_feb11d\sketch_feb11d.ino:12: warning: "DEFAULT_MIN_PULSE_WIDTH" redefined
12 | #define DEFAULT_MIN_PULSE_WIDTH 500
|
In file included from C:\Users\dh526\AppData\Local\Temp\.arduinoIDE-unsaved2023111-1980-1e6e1yb.mr0zl\sketch_feb11d\sketch_feb11d.ino:9:
C:\Users\dh526\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\Servo\src/Servo.h:54: note: this is the location of the previous definition
54 | #define DEFAULT_MIN_PULSE_WIDTH 1000 // uncalibrated default, the shortest duty cycle sent to a servo
|
C:\Users\dh526\AppData\Local\Temp\.arduinoIDE-unsaved2023111-1980-1e6e1yb.mr0zl\sketch_feb11d\sketch_feb11d.ino:13: warning: "DEFAULT_MAX_PULSE_WIDTH" redefined
13 | #define DEFAULT_MAX_PULSE_WIDTH 2500
|
In file included from C:\Users\dh526\AppData\Local\Temp\.arduinoIDE-unsaved2023111-1980-1e6e1yb.mr0zl\sketch_feb11d\sketch_feb11d.ino:9:
C:\Users\dh526\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.1\libraries\Servo\src/Servo.h:55: note: this is the location of the previous definition
55 | #define DEFAULT_MAX_PULSE_WIDTH 2000 // uncalibrated default, the longest duty cycle sent to a servo
|
. Variables and constants in RAM (global, static), used 29984 / 80192 bytes (37%)
║ SEGMENT BYTES DESCRIPTION
╠══ DATA 1564 initialized variables
╠══ RODATA 2492 constants
╚══ BSS 25928 zeroed variables
. Instruction RAM (IRAM_ATTR, ICACHE_RAM_ATTR), used 61247 / 65536 bytes (93%)
║ SEGMENT BYTES DESCRIPTION
╠══ ICACHE 32768 reserved space for flash instruction cache
╚══ IRAM 28479 code in IRAM
. Code in flash (default, ICACHE_FLASH_ATTR), used 252308 / 1048576 bytes (24%)
║ SEGMENT BYTES DESCRIPTION
╚══ IROM 252308 code in flash
esptool.py v3.0
Serial port COM5
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: b4:e6:2d:49:55:a7
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 288992 bytes to 211629...
Writing at 0x00000000... (7 %)
Writing at 0x00004000... (15 %)
Writing at 0x00008000... (23 %)
Writing at 0x0000c000... (30 %)
Writing at 0x00010000... (38 %)
Writing at 0x00014000... (46 %)
Writing at 0x00018000... (53 %)
Writing at 0x0001c000... (61 %)
Writing at 0x00020000... (69 %)
Writing at 0x00024000... (76 %)
Writing at 0x00028000... (84 %)
Writing at 0x0002c000... (92 %)
Writing at 0x00030000... (100 %)
Wrote 288992 bytes (211629 compressed) at 0x00000000 in 18.7 seconds (effective 123.3 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...