GSoC 2014

rseetham edited this page Jul 9, 2014 · 3 revisions

This is a blog/tracker for my project during GSOC 2014. The goal is to develop the PyBBIO library for the Beaglebone Black.

Week 0

The first blog post is going to be about what I did during the Community Bonding Period. Well, I bonded. I had Skype chats with my mentors every week and it was great!

So I made a Intro video

So during this period I got started with what I said I'd do first - optimisation. I added a C extension that does for sysfs entries to r/w into files. This was being done in Python before. But doing it in C is faster. This is because python makes big objects for handling files which makes it slower to process.

We talked about the different hardware I will be using and ordered stuff accordingly.

Issues I encountered

There weren't any issues as such except for that I didn't know Python very well. So I learnt Python during this period. Also I went through the library and figured out what each part does and how it all comes together.

Since I haven't been updating it periodically, I figured I'd just do a summary of each element that I've worked with until now and then maybe keep updating the sections.


A Rotary Encoder driver was pushed into the new kernel release so we decided to write a library for the encoder (although this wasn't a part of the proposal). The beaglebone black supports has 3 eQEP drivers. I didn't have the hardware so Alex and Steve tested them. eQEP1 conflicts with the HDMI pins and there was an error. We were only able to get the eQEP2b to work.

The problems encountered here was the eQEP1 not working and an issue with the device tree that Alex fixed.


There's this great SPI python bindings code by Volker Thoms that I've used to write the SPI library. The main SPI library was fairly easy and I finished it pretty quickly. The example was what took so long. Its almost done as of today. But this really taught me about hardware sensors and all the problems one can have. The solution to getting it done quickly though is

  • check with an oscilloscope. That really makes life simple while debugging.
  • Read the data sheet at least 2 times thoroughly.
  • Read the data sheet before you buy the sensor so you know what you're getting into. Mine was super fancy and complicated (too many options).
  • try and buy it in a breadboard compatible form unless explicitly needed.

I had quite a few issues with the sensor, starting from needing to solder the IC to a breakout board. Then I kept complicating the code because I didn't read the data sheet well enough. And there's still an issue where its detecting an interrupt at the beginning that has to be fixed. But I'll be able to do the rest of the hardware examples quickly based on this experience.(It was fun though, overall!)


This is a peculiar one. So I've kind of tried using v4l2-python, openCV and gstreamer. I still haven't figured it out completely but until now. What works:

  • gstreamer pipeline below only works for the Logitech C920. It streams video to HTML. gst-launch-0.10 v4l2src ! 'video/x-raw-yuv,width=640,height=480,framerate=30/1' ! theoraenc ! queue ! oggmux ! tcpserversink host=tcpclientsink host= port=5000 sync-method=2
  • openCV works for both the cameras we've tried. So openCV records the video, next is streaming it to HTTP which I'll update when I figure it out.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.