Pages: [1]   Go Down
Author Topic: Controlling a Servo Motor from SuperCollider  (Read 531 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
p = ArduinoSMS("/dev/tty.usbserial-A1000ecP", 115200);
(
fork {
      180.do {|i|
            p.send($w, $d, 8, i);
            0.01.wait;
      }
}
)

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.

Best,
Taylan
« Last Edit: July 21, 2010, 04:37:17 pm by tcihan » Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 610
Posts: 49071
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: