Raspberry Pi IRC server

Nice tutorial on setting up an IRC server if you know nothing about IRC servers (or almost nothing)
via Raspberry Pi IRC Server.

Next challenge is to open up a port on the router, so the IRC server becomes reachable from the outside world.

I’m following this tutorial, with no success so far

I’m using this to see which ports are open/close

And now I’m off to read https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers to try and figure out what’s not working.

UPDATE: After realizing that there was a checkbox to check on my router’s interface, I can now say my IRC server test is functional!

Mini Game Controller for Scratch on the Raspberry Pi

I spent part of the afternoon building this mini game controller: (video is bad, I would have needed three hands)

The “how” for most of this can be found here. I changed the Scratch code a bit, as I wanted an RGB LED, instead of three separate LEDs, but other than that, it’s pretty much the tutorial as is. Thank you Ben Miller!

EdX: 6.00.2x has started

So I just finished this online MOOC MIT class with a 99%.  Only to learn that the follow up class started last week!

And my other class starts next week, and there’s this class I can do on my own… Too many things to learn.

For references here are the links to the classes I will attempt:

Text Retrieval

6.00.2x Course Info | edX

Data Wrangling

I don’t know if I’ll be able to do three classes at the same time. Wish me luck!

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:

import RPi.GPIO as GPIO
import time
pin1 = 18 #red
pin2 = 23 #green
pin3 = 24 #blue
while 1:
print "pin1"
print "pin2"
print "pin3"
view raw RGBLEDGPIO hosted with ❤ by GitHub

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!