Support for Breakout Garden?

12 views
Skip to first unread message

Mikkel Roald-Arbøl

unread,
Oct 30, 2020, 10:18:53 AM10/30/20
to autopilot-users
Hi again,
Yet another question... I am using the Breakout Garden from Pimoroni (https://shop.pimoroni.com/products/breakout-garden-hat-i2c-spi) to control an optical flow sensor (https://shop.pimoroni.com/products/pmw3901-optical-flow-sensor-breakout) for reading trackball movement. The ease of using the breakout garden is super appealing to me, as it allows me to plug-and-play sensors without worrying about wiring at all. Furthermore, they have written dedicated dedicated libraries for all their different sensors, making interaction easier. 
The question is whether it's easy to bridge to be used inside Autopilot? Would it require a lot of work, would it clash with pigpio, or should it be relatively straightforward? I'd be happy to contribute with bridging this if I can. :-)
Thanks!

jlsaun...@gmail.com

unread,
Oct 30, 2020, 2:40:37 PM10/30/20
to autopilot-users
Yes -- should be possible with a bit of doing :)

Here is an example of a class that uses an external library (actually another pimoroni library!): https://github.com/wehr-lab/autopilot/blob/01543a9708d4bf06c74dc6af6fc7e8917331fc98/autopilot/hardware/i2c.py#L315

That class inherits from the Camera metaclass (as it is basically a temperature camera) and thus a lot of the class is just overriding the necessary methods of the metaclass (eg. you change the FPS of that camera in a different way than you do with opencv, but you still can control it like cam.fps = 10).

Essentially the process would be
I don't have time to take a look *right* now, but if you tell me a bit more what the board does/how you want to use it i can advise on how to do that :)
Reply all
Reply to author
Forward
0 new messages