zugaldia / android-robocar

Build your own robocar, remote-controlled or autonomous, with Android Things.
BSD 2-Clause "Simplified" License
94 stars 21 forks source link

Refactored AdafruitMotorHat and AdafruitPwm constructors to allow stacking of other hats #45

Closed RacZo closed 7 years ago

RacZo commented 7 years ago

Refactored constructor methods of AdafruitPwm and AdafruitMotorHat classes so they can receive the i2c device name and i2c slave device address instead of having them hardcoded.

With the changes I'm commiting and a new driver I've written (inspired by Antonio's Motor Hat driver), I was able to stack the Adafruit 16-Channel PWM Servo Hat that I'm using to control the pan/tilt bracket's servos my camera module is mounted on, on top of the Adafruit DC and Stepper Motor HAT.

zugaldia commented 7 years ago

@RacZo This is great, particularly now that we're working on https://github.com/zugaldia/android-robocar/pull/40 (though I haven't been able to make it work yet). I'll review it soon!

alexmcroberts commented 7 years ago

@hsalameh it's white space changes – if you append "?w=1" to the files URL, e.g. https://github.com/zugaldia/android-robocar/pull/45/files?w=1 you'll see that the number of lines decreases by 300