Go Down

Topic: Controlling a Servo Motor from SuperCollider (Read 1 time) previous topic - next topic


Jul 21, 2010, 11:24 pm Last Edit: Jul 21, 2010, 11:37 pm by tcihan Reason: 1
Hello all,

I got a little stuck here. I'm using SMS library to send data to Arduino board, and everything seems to be working well except that there's this weird issue: I'm trying to send data from SuperCollider to control a servo using this code in SC:

Code: [Select]

p = ArduinoSMS("/dev/tty.usbserial-A1000ecP", 115200);
fork {
     180.do {|i|
           p.send($w, $d, 8, i);

This is supposed to rotate the Servo from position 0 to 180, whereas it only rotates it a 90 degree, and after a second or so rotates it back to 0 again! Is there a specific type of data that needs to be send to digital output of Arduino, something different than the simple integer SC sends? If there's any of you ever tried Arduino with SC, could you help me please?

Thank you for your time.



Using a normal sketch on the Arduino, are you able to make the servo rotate 180 degrees?

Perhaps the problem is not with the software, but with the hardware. Not all servos are able to rotate 180 degrees.
The art of getting good answers lies in asking good questions.

Go Up