Application and Possible contributions to PyBBIO

Hi Guys!

I had put up a post here over a month ago looking at possible projects to work on this GSoC, and after a bit of searching I found Alexander Hiam’s PyBBIO library [I’m good with Python, CPython bindings, arduino and also have worked with Beaglebone Black before. Most importantly, I LOVE all of them]

I already had a Beaglebone Black, so I tried out the library, went through the source code and understood how it worked. I contacted Alexander asking him about contributing to the PyBBIO library. We interacted continuously over the past one month, I understood the longtime and short time goals of the project. Also he guided me with the technicalities of Kernel 3.8, discussing how the libraries should be implemented now that there are device tree overlays. He also has agreed to mentor me for a small project I want to take up before GSoC (It’s for a course I’ve taken up at college, project will double up as a contribution to the repository). As of now I have contributed in terms of fritzing designs and wiki updates (by testing the library on various OS’s). Also I have been reading lots of articles for Linux on ARM and kernel 3.8.

As per our discussions the key things I will be looking at is :

  1. Porting library to kernel 3.8
  2. Adding I2C and SPI modules +( PWM on kernel 3.8 )
  3. Cpython optimizations for current modules
  4. Developing libraries that are available in the Arduino. Basically making BBB compatible with different pieces of hardware, at a python API level.
  5. Fritzing schematics for users.

I want to know what else I can add to make this project more handy for hardware hackers? What different features would you community members like to see in PyBBIO, I’d like to know!! Jason Kridner, I would love to hear your views on this.

Both me and Alexander are really looking forward to work on this project for GSoC (we also started off early to make sure this will be a good project).

Regards,
Deepak Karki
[https://github.com/deepakkarki]

Hi Guys!

I had put up a post here<Google Groups>over a month ago looking at possible projects to work on this GSoC, and
after a bit of searching I found Alexander Hiam's PyBBIO library [I'm good
with Python, CPython bindings, arduino and also have worked with Beaglebone
Black before. Most importantly, I LOVE all of them]

I already had a Beaglebone Black, so I tried out the library, went through
the source code and understood how it worked. I contacted Alexander asking
him about contributing to the PyBBIO library. We interacted continuously
over the past one month, I understood the longtime and short time goals of
the project. Also he guided me with the technicalities of Kernel 3.8,
discussing how the libraries should be implemented now that there are
device tree overlays. He also has agreed to mentor me for a small project I
want to take up before GSoC (It's for a course I've taken up at college,
project will double up as a contribution to the repository). As of now I
have contributed in terms of fritzing designs and wiki updates (by testing
the library on various OS's). Also I have been reading lots of articles for
Linux on ARM and kernel 3.8.

As per our discussions the key things I will be looking at is :

1. Porting library to kernel 3.8

Done already: GitHub - adafruit/adafruit-beaglebone-io-python: Adafruit's BeagleBone IO Python Library

2. Adding I2C and SPI modules +( PWM on kernel 3.8 )

I2C and PWM are already done.

I2C:

PWM:

SPI seems to still be a gap.

3. Cpython optimizations for current modules

What does that mean?

4. Developing libraries that are available in the Arduino. Basically
making BBB compatible with different pieces of hardware, at a python API
level.

Can you take a good look at the currently library (
GitHub - adafruit/adafruit-beaglebone-io-python: Adafruit's BeagleBone IO Python Library) and give a more
detailed analysis of what functions/modules need to be implemented? There
are also a ton of libraries already out there that might have suitable
licenses (eg., GitHub - lthiery/SPI-Py: Hardware SPI as a C Extension for Python).

5. Fritzing schematics for users.

Be sure to enumerate out what interfaces you plan on drawing up for your
proposal. Publishing the end product on the Adafruit learning center should
be good.

I want to know what else I can add to make this project more handy for
hardware hackers?

Maybe you can check with the current authors to get their opinions on what
they'd love to see added?

What different features would you community members like to see in PyBBIO,
I'd like to know!! Jason Kridner, I would love to hear your views on
this.

I'd like to see the PRU support cleanly integrated.
I'd like to see contributions to the out-of-box image so that people's
first experience is without issues.
I'd like to see examples that show the capabilities to build real systems,
randomly like CNC machines and Tweet-based vending machines --- just
something that uses CPU performance and features of a high-level operating
system so it is clear why they are useful.

Both me and Alexander are really looking forward to work on this project
for GSoC (we also started off early to make sure this will be a good
project).

Great! Glad you are making early connections as that is very important.

Thanks for the reply Jason!

I did a bit of searching and also talked to my mentor. The project I’m looking at is PyBBIO (the one that is put up in the ideas list). It currently is more user friendly and supports more libraries (other than I2C and SPI) than Adafruits modules.

PyBBIO is an arduino style python library for IO control on the beaglebone black, blending in the ease of python with the familiarity of arduino.
It currently supports high speed GPIO (via mmap), PWM, ADC, interrupt handling and also UART at its core. The project also aims to provide the standard Arduino API - for Servos, XBee radio, EEPROM, SD card, stepper motors, Ethernet/WiFi Shield, Liquid crystal (Hitachi HD44780) etc.
Another exiting feature is the “BBIO server” – think of it as a microframework to rapid prototype browser or mobile based webapps. Brilliant for home automation, remote monitring projects etc.

After your feed back, doing bit of research and talking with my mentor, I figured out that I can define the current goals of the project as follows :

  • Give arduino like SPI and I2C interface [basically just add wrappers using already existing projects - should not take much time]

  • Integrate PRU functionality into the library

  • Firmware for the PRU, so that the library can communicate with PyBBIO code in real time

  • Asynchronous Programming techniques (triggers, timers etc.)

  • Development of arduino type libraries and examples along with fritzing schematics. - this will help with IoT

  • Integrating of all this with off the shelf images

I propose this project because as of now the the IO libraries for Python on the BBB is scattered! This is a good opportunity to integrate various sources and to add fresh quality code! And I think python is a good language to accomplish this is because it is easier for new comers to adapt, especially if they come from an arduino background.
RFC! please :smiley:

Regards,
Deepak