Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
fergalcoulter
fergalcoulter's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
FirmataStandard with Servos on a Mega
[2 Replies]
13-Mar-2012 11:15 AM
Forum:
Integration and Hardware
Hi Guys,
I'm having trouble attaching servos to Arduino when using the FirmataStandard library.
I'm trying to declare the pin mode for 2 and 3 to be servos :
import processing.serial.*;
import cc.arduino.*;
Arduino arduino;
int aPin=0, s1=2,s2=3;
int data;
void setup() {
size(512, 200);
arduino = new Arduino(this, Arduino.list()[2], 57600);
arduino.pinMode(aPin, Arduino.INPUT);
arduino.pinMode(s1, Arduino.SERVO);
arduino.pinMode(s2, Arduino.SERVO);
}
but that only seems to treat them as PWM - constant buzzing and 600mA current draw constantly.
I have Firmata 2.2 installed, and when using the Firmata Test.exe program, my servos behave themselves properly.
Where abouts should I be declaring the pinMode, as i'm obviously doing something wrong!
Thanks in advance!
Fergal
«Prev
Next »
Moderate user : fergalcoulter
Forum