Support for Adafruit HATs - Servos, DC Motors, and Stepper Motors

407 views
Skip to first unread message

Eric Eliason

unread,
May 12, 2016, 12:45:07 PM5/12/16
to Pi4J
I have completed a Java package in support of the Adafruit HAT devices that support DC Motors, Stepper Motors, and Servos. These HATS are fairly popular among robotics enthusiasts because the PWM control is independent of a Raspberry Pi.  Descriptions are found here:

I've tried to make these classes compatible with the pi4j architecture and I'd like to include them in a future pi4j distribution if you are agreeable.
I can submit these to a github repository but need to know how you'd like me to do that. 

Cheers and Best Regards...  Eric Eliason

Attached you will find the java files I'd like to contribute:

Example programs that show how to use the Adafruit HAT package:
====================================================

AdafruitDcMotorHatExample.java 

AdafruitServoHatExample.java

AdafruitStepperMotorHatExample.java


Here's the package contents:

============================

AdafruitDcMotor.java

AdafruitHat.java

AdafruitMotorHat.java

AdafruitServo.java

AdafruitServoHat.java

AdafruitStepperMotor.java

StepperMode.java



 


AdafruitDcMotorHatExample.java
AdafruitServoHatExample.java
AdafruitStepperMotorHatExample.java
AdafruitDcMotor.java
AdafruitHat.java
AdafruitMotorHat.java
AdafruitServo.java
AdafruitServoHat.java
StepperMode.java

Eric Eliason

unread,
May 18, 2016, 10:01:28 AM5/18/16
to Pi4J
Oops....  I see that I did not include the StepperMode.java enum class in my original post.  
StepperMode.java

Eric Eliason

unread,
May 18, 2016, 11:13:36 AM5/18/16
to Pi4J
And here's the AdafruitStepperMotor.java class


On Thursday, May 12, 2016 at 9:45:07 AM UTC-7, Eric Eliason wrote:
AdafruitStepperMotor.java

Mathijs Affourtit

unread,
Dec 8, 2016, 9:05:56 PM12/8/16
to Pi4J
This is great, would love to find out if there are any further updates on this. I'm using the same HAT to operate DC motors and will be trying these out.
Thanks,
Mat
Reply all
Reply to author
Forward
0 new messages