Do not lose this link!

Everything you will ever need for the Rasperry Pi Camera in one place!!


Simple Raspberry Pi Shutdown wires

Pi with shutdown wires
Pi with shutdown wires

via Simple Raspberry Pi Shutdown Button.

Finally, I can turn off my Pi even after I turned off my laptop. As I always SSH in, I have to remember to shutdown the Pi before leaving, which is not always the case.  Simple 5 minute tutorial, and problem solved!
I didn’t solder anything onto my Pi. I simply used female to male wires, as I want to keep my case closed.

RGB Led and Raspberry Pi GPIO

Yesterday we had a little Coffee and Code with PyLadies Montreal.  I was asked to bring a couple of Pis and “something to play with”.  I brought mini breadboards and RGB leds.

After a brief explanation of the GPIO, the ladies started coding. We did get some result, but not the real thing. So before I forget how it works (cause I forget all the time now, sigh..) here’s the documentation on controlling an RGB led with the Pi’s GPIO.

First, the end result!

See? it does work!

Next, a schematic. I’m using a common anode RGB led.

Connecting an RGB led to GPIO
Connecting an RGB led to GPIO

Note that the anode is *not* the first leg, but rather the second leg. Grrr. Also, we’re not connecting the 5V to the anode as we did yesterday, but the Ground. The power will come from the pin when we set it to High. I *always* make that mistake, I don’t seem to be able to learn this for good. And that’s the main reason I didn’t become an electrical engineer. I suck at circuits.

So for future reference, here’s how a common anode RGB LED is supposed to be read.

RGB Led – courtesy of Adafruit

And finally the code:

MIT EdX Class done…

Another online class done ! This time with MIT and EdX.
MITx: 6.00.1x Introduction to Computer Science and Programming Using Python

Final score: 99%. Yeah, right! I got a 99% from an MIT class! Go me!

That said, the class served as a refresher of some Computer Science principles that I haven’t used in ages. Big-O Notation for one. I get it, I understand Big-O Notation, but I suck at it. I fail to properly identify which is which. I failed that concept when I was in university, and here I am 30 years later, still failing it. Sigh… Somehow, my brain blocks on this concept.

Apart from that, everything was review. It was mostly Computer Science, not even Python. I still think like a C programmer, and not a true Pythonista. And I know it. There were cases where I had to Google the proper Python way to do things, and not the C way. The class didn’t give any feedback on coding style, so I didn’t get the answers that I needed but getting access to Python code afterwards helped.

New Online Class : Data Wrangling with MongoDb

I have just finished my first MongoDb class with Mongo University, getting a B in the class (I missed the A by one point, grr…)

I thoroughly enjoyed working with MongoDb, and I want to keep those brand new shiny skills working. So I looked around and found “Data Wrangling with MongoDb” at Udacity. So I’m starting on that.

Lesson 1 is on CSV and Excel files. That’s where I’m at. Now I’m learning about XLRD. I have to read in an Excel worksheet, and figured out the date where some min and max have been reached.

Looking around the web, I discovered a site dedicated to Python/Excel. Cool! They have a tutorial too!

Clyde as a Twitter Monitor

This week, I will be presenting at PyLadies. Just a little pet project of mine.

Clyde is a lamp that we can hack. It’s Arduino-based and has some cool functionalities in the basic software. However there isn’t much space left to code anything else, if you want to keep that out-of-the-box functionality.  As Serial Communications are supported, I came up with the idea of pairing it with a Raspberry Pi, and coding the Pi instead.

Goal: Getting the Pi to monitor Twitter for specific hashtags, and control the color of Clyde’s eye based on trendiness of the target hashtags.  Three hashtags can be monitored, and mapped to R,G and B.  It’s best if the hashtags are *not* trending. Trying to follow the Superbowl was not a success, as the lamp was simply white (at max value) all the time. But it’s a good thing when you want to be notified of a non-trending hashtag.