Go Down

Topic: Use Johnny-five with Adafruit_TiCoServo & ConfigurableFirmata (Read 697 times) previous topic - next topic


Hello, My project involves a thermometer and servos connected to my arduino mega 2560. Every time the temperature event fires (every 5 seconds), the servo would click slightly. I finally found this explanation today:

"Arduino's Servo library on AVR uses interrupts; if interrupts are disabled for any amount of time, the servos will twitch.
1-Wire protocol (used by DS18B20) needs to disable interrupts for the protocol to work. Therefore, servos glitch. (https://arduino.stackexchange.com/questions/49421/arduino-reading-ds18b20-interferes-with-servo/49422#49422)"

So, now i'm trying to get Adafruit_TiCoServo working with configurablefirmata/johnny-five/node.js. I changed all references of "#include <Servo.h>" to "#include <Adafruit_TiCoServo.h>" and "Servo myservo;" to "Adafruit_TiCoServo myservo;" throughout the configurablefirmata application code. It's compiling and uploading fine, but now when I call it from node.js (using johnny-five), the servo isn't moving at all. It worked fine when I was using servo.h. I'm not getting any errors.

Are there references I need to change in johnny-five as well to get this working? Any help is appreciated!


Go Up