You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From Arduino ISP, flash the Examples/Firmata/StandardFirmataWifi sketch to the board.
Attach a servo to pin 15.
Using node.js with 'firmata' and 'etherport-client' libs installed :
varFirmata=require("firmata").Board;varEtherPortClient=require("etherport-client").EtherPortClient;varboard=newFirmata(newEtherPortClient({host: "<ip of board>",port: 3030}));board.on("ready",function(){this.pinMode(15,this.MODES.SERVO);this.servoWrite(15,90);});
Servo should move to middle position, but it doesn't.
Adding #define MAX_SERVOS 1
to Servo.h and recompiling and flashing StandardFirmataWifi.ino works.
I would make this change and submit a PR but I don't know how to determine the maximum servos supported by this board?
Thanks.
The text was updated successfully, but these errors were encountered:
Basic Infos
Platform
Settings in IDE
Problem Description
libraries/Servo/src/Servo.h should define MAX_SERVOS with the maximum number of servos the board can control.
The standard Arduino Servo library defines this here - https://github.com/arduino-libraries/Servo/blob/2e973f62ed4a3807d228a95eb241dd5c673767d2/src/Servo.h#L88
The firmata library uses this define to test for servo capability - https://github.com/firmata/arduino/blob/0b5236938ea8a9fd5ff8a50c503549276dd5e855/examples/StandardFirmataWiFi/StandardFirmataWiFi.ino#L170
Without this defined, the firmata library doesn't allow any servo control.
MCVE Sketch
From Arduino ISP, flash the Examples/Firmata/StandardFirmataWifi sketch to the board.
Attach a servo to pin 15.
Using node.js with 'firmata' and 'etherport-client' libs installed :
Servo should move to middle position, but it doesn't.
Adding
#define MAX_SERVOS 1
to Servo.h and recompiling and flashing StandardFirmataWifi.ino works.
I would make this change and submit a PR but I don't know how to determine the maximum servos supported by this board?
Thanks.
The text was updated successfully, but these errors were encountered: