No commit activity in last 3 years
No release in over 3 years
A Ruby implementation of Adafruit's Python library for the Adafruit PCA9685 16-Channel PWM Servo Driver for use with the Raspberry Pi.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.0
~> 3.1.0

Runtime

~> 0.4.0
 Project Readme

Adafruit Servo Driver

CodeClimate

Description

A Ruby implementation of Adafruit's Python library for the Adafruit PCA9685 16-Channel PWM Servo Driver for use with the Raspberry Pi.

Installation

gem install adafruit-servo-driver

Usage/Example

require 'adafruit-servo-driver'

pwm = PWM.new(0x40, true)
pwm.set_pwm_freq(50)

channel = 0

3.times do
  pwm.set_pwm(channel, 0, 212)
  sleep(0.5)
  pwm.set_pwm(channel, 0, 412)
  sleep(0.5)
end

Relevant Links:

Product Page: http://www.adafruit.com/products/815

Original Adafruit Python Adafruit_PWM_Servo_Driver Library: https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/tree/master/Adafruit_PWM_Servo_Driver

Tutorial: Adafruit 16 Channel Servo Driver with Raspberry Pi http://learn.adafruit.com/adafruit-16-channel-servo-driver-with-raspberry-pi

Inspiration for usage example: http://www.raspberrypi.org/phpBB3/viewtopic.php?t=32826