We are a working on creating a program where a button input sends data over the internet via Pachube which is received by another Arduino to control a servo.
We have gotten this successfully working using Processing and Servo Firmata in Arduino (i.e. my button push on my Arduino controls my teammates servo attached to his Arduino). Unfortunately, as we need to both send and recieve data from the same Arduino (send button push data and recieve data to control servo), we need to use the Standard Firmata.
This however doesn't successfully control the servo causing it to buzz and not respond to the recieved data.We have experimented trying to adapt the Firmata codes and using just a simpler code for trouble shooting problems as below. When the following code is run on Processing with Servo Firmata it works beautifully but when run with Standard Firmata, it has the same issue and buzzes / doesn't respond properly.
import processing.serial.*;
import cc.arduino.*;
Arduino arduino;
int servoPin = 10; // Control pin for servo motor
void setup(){
size (180, 50);
arduino = new Arduino(this, Arduino.list()[0]);
arduino.pinMode(servoPin, Arduino.OUTPUT);
// note - we are setting a digital pin to output
}
void draw(){
arduino.analogWrite(servoPin, mouseX); // the servo moves to the horizontal location of the mouse
}
If anyone has done anything similar or can think of a solution, any help would be much appreciated from this sleep deprived, caffeine driven group of uni students.