khoih-prog / esp8266_isr_servo Goto Github PK
View Code? Open in Web Editor NEWThis library enables you to use 1 Hardware Timer on an ESP8266-based board to control up to 16 servo motors.
License: MIT License
This library enables you to use 1 Hardware Timer on an ESP8266-based board to control up to 16 servo motors.
License: MIT License
thanks you for this library.
ISR_Servo.setPosition() is not available after calling analogWrite()
when i calling analogWrite(12,128)
servo is not available.
void setup()
{
Serial.begin(115200);
while (!Serial);
delay(200);
Serial.println(ESP8266_ISR_SERVO_VERSION);
servoIndex1 = ISR_Servo.setupServo(14, MIN_MICROS, MAX_MICROS);
ISR_Servo.setPosition(servoIndex1, 0);
//servo is not available after this code
analogWrite(12,128);
}
void loop()
{
int position;
delay(2000);
if ( ( servoIndex1 != -1) )
{
for (position = 0; position <= 180; position++)
{
ISR_Servo.setPosition(servoIndex1, position);
delay(5 /*15*/);
}
delay(2000);
for (position = 180; position >= 0; position--)
{
ISR_Servo.setPosition(servoIndex1, position);
delay(5 /*15*/);
}
}
}
D7 and D8 not defined in ESP8266_ISR_MultiServos.ino
Attempt to Verify the .ino file in Arduion IDE
No errors
C:\Users\media\AppData\Local\Temp\.arduinoIDE-unsaved2022611-10312-15pdb1.j1r1l\sketch_jul11b\sketch_jul11b.ino: In function 'void setup()':
C:\Users\media\AppData\Local\Temp\.arduinoIDE-unsaved2022611-10312-15pdb1.j1r1l\sketch_jul11b\sketch_jul11b.ino:98:38: error: 'D8' was not declared in this scope; did you mean 's8'?
98 | servoIndex1 = ISR_Servo.setupServo(D8, MIN_MICROS, MAX_MICROS);
| ^~
| s8
C:\Users\media\AppData\Local\Temp\.arduinoIDE-unsaved2022611-10312-15pdb1.j1r1l\sketch_jul11b\sketch_jul11b.ino:99:38: error: 'D7' was not declared in this scope
99 | servoIndex2 = ISR_Servo.setupServo(D7, MIN_MICROS, MAX_MICROS);
| ^~
exit status 1
Compilation error: 'D8' was not declared in this scope; did you mean 's8'?
A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.
After adding the following, the code verifies OK:
int D8;
int D7;
ESP8266
,ESP32
or STM32
Core Version (e.g. ESP8266 core v2.7.4, ESP32 v1.0.5 or STM32 v1.9.0)uname -a
### Additional context
Add any other context about the problem here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.