Controlling a Servo Motor
#3
(07-13-2017, 01:14 PM)casmiguefl Wrote: I'm finding it impossible to work with GPIO and wanted to connect a small servo motor to the Pine64 in order to control it.

In this particular case I want to set 2 particular degrees depending on a variable.
With an Arduino, this is basic: Servo.attach(#controlpin); Servo.write(#angle);

Any tutorials around on how to do it here?

For the servos, no, I don't think so. Most of the documentation is for simple GPIO stuff like on/off toggling and I/O expansion. Whilst it should be possible drive the servos from the pine64 using soft pwm (based on the ideas from this posts code), I don't know how successful you will be, as SBCs are not that good for accurate timing signals... You are much better off using a dedicated IC (i.e. a ATTny85 programmed to work in conjunction with the pine64, which can provide the necessary accurate PWM signals for the servo, or an Arduino Pro Mini). But if you want to give a go to see what the pine64 can do anyway, that's great too! Wink
  Reply


Messages In This Thread
Controlling a Servo Motor - by casmiguefl - 07-13-2017, 01:14 PM
RE: Controlling a Servo Motor - by Luke - 07-13-2017, 02:36 PM
RE: Controlling a Servo Motor - by pfeerick - 07-13-2017, 10:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Information Howto: Controlling Pine64 GPIO via the filesystem (sysfs) on linux pfeerick 4 12,817 01-24-2019, 03:36 AM
Last Post: Fifth
  Active Cooling 5v brushless fan with Motor Speed Controller soft PWM MarkHaysHarris777 14 24,738 06-26-2017, 03:16 PM
Last Post: ishwest
  Active Cooling soft PWM follow-on fan motor speed controller driver MarkHaysHarris777 3 7,374 09-02-2016, 11:46 PM
Last Post: MarkHaysHarris777

Forum Jump:


Users browsing this thread: 2 Guest(s)