Archive for the ‘Projects’ Category
Changing X11 Appearance
Ever wanted to make X11 look a lot cooler? There is a way, using some custom themes! With this you can make things like gEDA look even more cool when using a black theme. Now let it be known that this method is sort of not stable and I’ve had mixed results with it. Sometimes it works sometimes it doesn’t- haven’t really figured out why yet.
Open up terminal and do this (you’ll need Macports installed). The search should return results to proceed further. The two things we will be installing are a theme, and the theme picker.
-
port search gtk2
-
sudo port install gtk2-aurora
-
sudo port install gtk-chtheme
The themes are stored at this place, so do this command…
And you can move in your various themes to here…
-
sudo mv (path to downloaded theme folder) yourthemename
And now for the best part! To actually choose the theme! Let’s open up chtheme! Use this command:
-
gtk-chtheme
Now hopefully you will have some themes that you can switch to there. If not, I’m not sure what has happened. This has been happening to me quite often, but there are some occasions where I get it to work and it’s pretty cool.
If you ever want to reset everything…
-
rm -r ~/.gtk*
If you are looking for some cool themes, there are a handful of most excellent ones on deviantART that you can search around for. Hopefully it works out good for you, have fun with your new X11 look!
Cloud Robotics Hackathon!
I was at the Cloud Robotics Hackathon this weekend in Montreal and it was a BLAST! There were tons of teams participating, learning about robotics, programming with Arduino, and there was a MakerBot, some Naos, and a Darwin-OP there! Holy macaroni!
My favourite part at the end was listening to the experiences that people had programming their robot. There were lots of new people to robotics, so it was great.
I worked with Marek over the weekend! He is a super web dev guru, and was also on the Edubotics team at Startup Weekend Montreal. We came up with a pretty crazy project, under the team name of TEAM LIGHTNINGBOTS, because lightning comes from the cloud!
We ended up winning the Montreal part of the Cloud Robotics hackathon! Here is our project’s video!
As a quick summary, we made a network of cheerleading robots for an educational math game that can post the scores on MyRobots, then display them on a robotic scoreboard. Let’s take a look at this in more detail!

Here is the basic setup. There is the math game on the iPad. This app is actually a web app with a very thin native client layer to send data to the robot. It works by sending HTTP callbacks, which the app parses, then sends a packet through the Redpark Serial Cable, which Learning Pet (blue RoboBrrd) receives, parses, then does an action. You can input two digit numbers into the app because there is a specially-tuned delay to do so. You get an unlimited number of tries for answering, and no hints, since this is a basic version of it (proof of concept). The green dots below are showing the number of questions completed and needed to level up. The game repeats once you level up. The game is functional in any modern web browser, so you can check it out HERE! Marek was the one who coded this, and it was developed beforehand at Startup Weekend, so nothing new here.

Now for the new part: when Learning Pet (blue RoboBrrd) receives the data from the app, it also broadcasts the message out through its Xbee to the other two robots. We use the XBee Network Protocol for this, developed by Kris Kortright, but we use my uno-compatible fork of it.
Both Impy (orange RoboBrrd) and MANOI receive this data through their XBees, and are able to act out the actions as well. When you get the answer right, they do a little action of encouragement (MANOI swings its arms, RoboBrrds flap their wings, and Impy changes its eyes green too). When you get the answer wrong, they shake their heads- MANOI looks really scary doing this so you don’t want to get the answer wrong. When you level up, they all do a crazy dance celebration.
You can grab their code on Github here!
Now for the next new part: when Impy (orange RoboBrrd) receives the data from the mesh, it communicates with the computer which is running a Processing application. In the application, it creates a tally of the questions answered, and the number correct, the enthusiasm value (which is just how drastic changes in RoboBrrd’s sensors were), and the “brain power”.
The brain power is determined by the function:
(correct/tries)+enthusiasm+(100*levelnumber)

This data is then uploaded to MyRobots every 15 seconds and then cleared out for the next upload batch.
One of the tricky parts was figuring out how to optimize the sending and receiving of packets on Impy (orange RoboBrrds) end. It turned out that we had to listen before we send, or something like that, just to make it work a bit more reliably.
You can grab the code for the Processing sketch on Github here.

Here’s the next new part: To have the results of the game displayed on a live scoreboard, we used the DFRobot RobotShop rover as a scoreboard. I attached it to the bottom of a soapdish, which gave the treads enough clearance, and some popsicle sticks for support. Marek added the numbers and faceplate to it, and coded it up in Python. The code pulled the live “correct” number score from MyRobots and then called the Arduino to update the motors accordingly. It was pretty sweet!


All in all, the whole system worked great. It’s truly the ultimate social robot network, because we were able to combine so many robots together!
There was a lot of stuff that we developed that we didn’t use or mention though. For instance, Marek created this web nodejs application that can show the same webpage to all clients, and also send tcp messages to everyone connected. CHECK IT OUT HERE! We were going to use this originally as a sort of orchestra or central command console for the robots. He also made a Twitter analyzing program that looks for happy faces or sad faces in the streaming Twitter firehose. The data is being plotted on his MyRobots page for it, which is really cool.
On the first day I worked on getting Learning Pet (blue RoboBrrd) going with the ADK. For some reason it would work fine, I would get up for a break, and then not work. So that night was the turning point in the hackathon when we went with the idea we have now.
The idea we implemented is pretty cool though, since it both sends data to MyRobots and it uses it. We also are using basically 3 clouds in the 1 project, being:
1. The math game web app
2. The local mesh network
3. MyRobots
All in all, it was a blast! Huge thanks to Marek for his web skills!
I’m definitely looking forward to volunteering at this hackathon next year. Thanks to the organizers for making such an awesome event. SEE YOU IN THE CLOUD!
Reading Data from MyRobots / ThingSpeak
Last post I showed some code and a guide on how to connect your robot to MyRobots/ThingSpeak! Now let’s look at how we can read the data from MyRobots. This part will be pretty cool, because you can read other robots data, and have your robot react to it!
I haven’t written up a MAKE Project guide for this yet, but wanted to show it anyway. Here you can get the SimpleThingSpeak_Parse code on Github!
We will be using the JSON Processing library to get and parse the data.
There are three main parts to this code:
1. Reading the entire feed
2. Specific feed field
3. Last entry in the robot feed
Here’s what the basic field structure looks like. The channel data is the info about your robot, and the feeds is an array, with each element being the specific datapoint.
- created_at (str)
- description (str)
- field1…8 (str)
- id (int)
- last_entry_id (int)
- name (str)
- updated_at (str)
feeds
- (your entry int here)
– created_at (str)
– entry_id (int)
– field1…8 (str)
So for the accessing entire feed, you can use these functions:
Here’s a very basic example of how to use these functions:
-
// example, get random stuffs, print it out
-
int feedsNum = getFeedLength();
-
-
println("\nHey! Did you know that " + robotName + ", aka coolest robot in the world was created on MyRobots on " + creationDate + "?");
-
println("It’s last field1 value that it sent (entry #" + lastEntry + " by the way) was: " + lastField1 + ". Cool!\n");
For the field feed, you can use this function:
For the last entry, you can use this function:
And that is it! You can use the data from the functions and connect it up to your robot.
Try it out, get the code from Github!
apps4arduino – Meters for Arduino on iOS, Introducing Wijourno!

Meters for Arduino is now available for iOS! You can get it on the App Store here:
http://itunes.com/apps/metersforarduino
It communicates with Meters for Arduino on Mac, which just had a 1.1 update. You can get it on the Mac App Store here:
http://itunes.com/mac/metersforarduino
Meters for Arduino on iOS works with the magic of Wijourno. Wijourno lets you communicate with your iOS devices and your Mac.
It’s a lot of fun, since you can send messages to specific devices, or broadcast a message to all devices. I’m imagining things where (for robots) you could have the iPad displaying lots of diagnostics and such, the iPhone would be the controller, and the Mac would be the data logger and connection to the internet!
Check out the apps4arduino site for more information, including some details on how you can use Wijourno in your own Apps.
Can’t wait to see what people are going to make with this!
A little bit of random everything!
After Maker Faire everything has been sort of buzzing in my head. There’s lots of new things to try, learn, and share! Of course, I was pretty much blanked out afterwards with a cold, which meant I unfortunately couldn’t go to SecondConf where I was invited to speak
, and then last Thursday/Friday/Saturday/Sunday I was super tired. x_x But, here is a post with tons of pictures nonetheless
Learning Pet – Polymorph Phail, OpenSCAD and gEDA
To advance Learning Pet more, there has to be some sort of way to actually make these that doesn’t involve tens of hours of effort for each one. I was thinking maybe I could take a shortcut on this whole laser cutter/3d printer ordeal and use polymorph!
We created a stencil out of popsicle sticks:

First attempt was to lay the polymorph flat and use the stencil like a cookie cutter:

It turned out to be way to flimsy and thin. It would be more of a jello brrd than a RoboBrrd with the servos on it. Bah! Second try was to fill the stencil with the polymorph:

This was stronger in some parts, but it sort of broke at the top. Third attempt in the same way, but more better:

The third way is definitely strong, but it still takes ages to create. Not to mention, it destroyed the stencil trying to get it out. Plus, the polymorph extras are kind of hard to get rid of.
Polymorph is cool, but it may not be the best for creating the frame of a RoboBrrd. This is when I decided to learn OpenSCAD. Learning it isn’t that tricky. There’s some familiarities that you can draw from Matlab in there. The software itself is horrendous. You can rotate and zoom the viewer camera, but not translate, which makes it extremely annoying to try to use. Whatever. At least I don’t have to worry about trying to figure out what buttons on the screen to press to create a shape.
Here’s a screenie of an exploded view of the shapes that I created:


The school I mentor for FIRST robotics has a 3d printer, so we were going to print them out. This is them on the stl viewer. I like how it looks slightly Tron (original Tron) like:

They haven’t been printed yet, and actually I may not have the chance to pick them up if they were printed! But the idea was to experiment and see if the nubs would actually fit, seeing as how they are exactly the same size.
I learned later on about the same sort of technique with a laser cutter at Spikenzie Labs, you can read more into it in the next section
The boards are also going to be another thing to create. I’m attempting to try to learn gEDA (each time I try to pronounce the software it sounds like some sort of cheese), which is a PCB/schematics/board bundle of awesome! The learning curve for this though seems like a vertical line, it almost reminds me of Objective-C in that way. Which can only mean good things!
I didn’t save my original screenshot of playing with gEDA, but it looked like a board with chicken-pox, because there were lots of holes (which are called vias?). However, I was playing with text, and weird stuff happens with text. Depending on whatever colour you pick, it writes it normally, or it writes it flipped horizontally, so “w00t” becomes “m00f”, hahaha!

I couldn’t install gEDA on my Mac under fink or Macports unfortunately, but it works fine on Ubuntu. Oh yeah if anyone is wondering, the file I was playing with was the OHS badge. It’s cool. No idea how on earth they made the curved lines yet, but I hope to figure that out eventually.
There’s lots of resources online about gEDA, so I just have to read them and figure it out, and climb this vertical learning curve ;P
There also has to be more software developed for Learning Pet, but I don’t want to go too crazy with it. I’ve been trying to figure out what platforms should be followed, and which ones should not. Or are we even at that point to make that decision? :/ I might just make some software for several platforms, then run some trials and see which ones are better.
Of course, Learning Pet itself is a platform! So it will also have to be able to play some *small* games. I’m looking forward to this part, like maybe I will save game data in an EEPROM or something? Or just save it in an SD card so that way it is more “modular”?
That’s about it for Learning Pet today. I’m working on a module where the sensor and button can sit on its own platform, making it have more of a purpose of working with a specific set of software. It will also have LEDs!
Spikenzie Labs
When I went in to visit my FIRST team, I also visited Spikenzie labs! Their laser cutter is awesome!

Here you can see some of the watch faces being cut out

They were also faced with the challenge of getting the slots to fit together. For them, they had to take into account the beam of the laser and all sorts of other interesting math. However, the result is nice slots that fit perfectly together:

This knowledge is great, and will definitely help
This is the sort of technique that I would want to use in Learning Pet’s structure.
They also gave me free stuff. LOTS of free stuff!

More about building them in the next section. Thanks for the free stuff Andy & Mark!
Random Everything
The VoiceShield looks really cool. Unfortunately mine doesn’t play sounds, only noise. It may be because I’m doing something wrong with the uploading or something. I should also go back and check all the soldering.
In concept though, it is really cool. It lets you upload sounds to this chip, and you’re able to play them individually or in sequence, which would be really handy for some of RoboBrrd’s sounds!

Soldered the MPTH kit too. It’s also pretty cool! Send in serial and have it displayed on the screen. Nice!

The LoL shield! YAY! If anyone tells you it only takes an hour to complete this shield, they are either a professional, or completely wrong.
I had some trouble with a few LEDs, but it turned out that they needed more solder. There are also a few LEDs that flicker. I haven’t figured out how to fix them yet though. The white LEDs are beautiful!

This poem on the back of the LoL shield is so deep.

I gave one of the Propellers a go, and made it so that if I press gently on the button thing, then the LED will light up! However, these button things are kind of weird in the way that if you press down, then it shorts out (I guess), making the value 0. If you press lightly on the middle pad, the value ranges up to 1. The default value is also 0. So it is kind of hard to figure out, either that or I’m doing something wrong, which is most likely

I’m in the middle of trying to organize everything. It’s INSANE. Luckily it doesn’t look like this anymore, but I still have a few other things to organize away.

DOGCOW’s Ping))) sensor has sort of been a running joke on the Robot Party. Turns out it does work, I was just doing it wrong hahahaha

Here are my broken servos. This would definitely make a GREAT Christmas tree ornament!

And with that, moving on to the next section!
Old Popsicle Stick Constructions
Popsicle sticks and hot glue are great for creating things. Here are some things that I started to create, but haven’t finished. They were mainly created to let me visualize things that I was thinking about.
This robot was supposed to have LEDs spinning on its motor. It got me thinking about this design challenge, where you will have to somehow be able to power the LEDs even though it is spinning. If the LEDs were to blink, it would be better just to have the blinking circuit also spinning.

Here is proto-brrd. It’s skeleton served as a way to play around with the beak mechanism. It was also good to try the design before building the green RoboBrrd
It always makes me laugh the way the bottom beak falls down…

This is a weirdo LED giraffe type of animal/creation. Its weak legs jittered around the desk as the spinning counter-weight tail moved, and as the head spun around. It was fun to see how fast the pennys flew off of the counter-weight sometimes.

Last was this interesting stretching armature thingamajig. It had an elastic to pull the two arms tight, but the motor would be able to push them apart. Since the motor didn’t have that much torque, it didn’t work that reliably.

Misc
I also visited Robot Shop headquarters. Had a tour of the place, it’s pretty cool!

My friend & inspiration Jeri (link goes to one of my favourite videos) is going to be in this film called Pinball Donut Girl. She’s really cool. I’ve had the chance to play some pinball, and it’s really fun. There’s a lot of electronics that happens behind the scenes too. The film needs funding, and it’s being crowdsourced. So instead of your coffee today, consider putting the money towards this! I only donated $7, but collectively it can get funded! YAH! GO DONATE NOW!
Last but not least, winter is fast approaching! Get out there and enjoy the autumn nature

Building Learning Pet
Here’s what you may not know about Learning Pet: It was created in 4.5 days.
When I heard about the Open Hardware Summit Scholarship contest, I couldn’t let this opportunity pass. The prize would do more than wonders to get this idea flying. For example: A 3D printer would be able to be bought and used to create parts for kits. Also, we would have been able to order some custom PCBs online with the winnings, too.
When I heard about the contest later on that evening was when I started (Sept 8). I created the structure and beak mechanism all in that one night

The first day (Sept 9), the mini RoboBrrd character was crafted, and all servos and LEDs tested and functional.

The second day (Sept 10), the modular electronics board was created. Featuring a slide-out drawer for the Google Android ADK
This was also my birthday! Hooray!

Third day (Sept 11), all of the circuits and wiring was complete. Had some pitfalls during the day trying to use different connectors, but switched to the ones you see below in the photo. The plugs are great, really sturdy!

Here’s a timelapse of some parts of the build:
Forth day was for creating the software and documentation, and submitting to the contest rather early. My train was leaving the next day, so I had to get everything done ahead of time
We didn’t win the contest, or place in the top 3. Somehow. So this became yet another unobtained opportunity, but I can definitely say that Learning Pet was a competitive entry. The documentation webpage was a force not to be reckoned with compared to the other entries. Learning Pet has a purpose that would benefit society. Furthermore, I created a demo prototype for the video about my idea.
Maybe some people will think that it was crazy to pour in all this dedication to one robot. If it would have won, it wouldn’t have seemed crazy. Success is defined as getting up one more time than you’ve been knocked down. I’ll still be continuing with Learning Pet, the idea is exciting and education desperately needs an effective use of technology in the classroom, rather than more technology in the classroom.
Thanks again to everyone who left a comment on my Google+ during the build progress! And thanks to the FIRST team that I mentor, COSI, the gang from FMCG, and all my friends for voting!
Also: I used some parts (the large servo and two RGB LEDs, specifically) from the parts that Adafruit Industries sponsored for the original RoboBrrd, so thanks to them also
Learning Pet at the Open Hardware Summit
Learning Pet had a fantastic time at the Open Hardware Summit!
Before the summit started, we were sitting at the sculpture robo-busking for votes! At that point, Ian came over and wanted to do an interview! It was an excellent interview, and he uploaded it really quickly at the summit so we could get more votes for the scholarship! Thanks Ian!
I actually did go to some of the talks! Specifically, the ones in the morning before the break. The Arduino Team’s keynote was really really great!
After that, I sort of hung around the cafeteria area showing off Learning Pet! A lot of people said they would vote, which was really great! After the crowd died down, I went into the cafeteria area to watch the stream and maybe work on some ADK stuff.

That was when the creator of ThingSpeak himself caught me and said Hello! ThingSpeak is a really cool Internet of Things website. It’s relatively small and new, which is why I like it compared to the others.
He told me about the location data parameter in the API. I never knew this existed! Then I was wondering how to get the location from Mac OS, if there was actually a framework for that. It turned out that there was! Wow! And it was since 10.6 too! I never knew this! Making it work was really great, it was only checking to see if it worked was what we really got caught on (because the XML file goes from oldest to newest).

It was then when I saw David Cuartielles from the Arduino team when I waved, who joined the table. We were talking about Learning Pet, and it turned out that he was the one who created the Processing ADK Tool! Wow! What a cooincidence!
I told him about all of the bugs, and asked how I can fix them. He showed me the code for the ADK tool, and walked me through how to build it in Eclipse! Building a tool for Processing is a little different because you have to tell ant that there are some things that are already pre-compiled, so it doesn’t have to check them.
I played around with the code for a while and sort of got used to the way things work. There are some places where it will be tricky to be able to do what I want to specifically do.
We also tried to figure out why there are four parameters on the Arduino side, and only three on the Android App side. It turns out that the Arduino is the one telling the Android what App it needs, rather than the other way around. This means that of course the Arduino side needs the description and website parameters. Which I guess makes more sense in retrospect

I’ll definitely be helping out more with this Processing ADK Tool stuff. The thing that motivates me the most is that when I first got the ADK and Android, I figured that this should be about 10x easier and 50x quicker than making an iOS App. It wasn’t, and many other people feel the same way, but now it is my goal to make it so.
We did listen to some of the talks while we were down hacking and learning on some code. They were really good! I didn’t manage to get to the breakout session, but they were all sort of scattered and I wasn’t listening to the directions anyway… playing with the code was more fun.

Oh yeah! And I also bought a hackerspace passport from Mitch Altman! It is so cool to see them in real life, they look like a real passport!
The Demo session was fun, lots of people loved Learning Pet and also said that they voted for it! However, when they announced the winners, Learning Pet didn’t place in the top three. I really appreciate everyone voting, though. To be honest and somewhat egotistical, I think Learning Pet’s documentation was the best and most complete. No one even came close!
Here is a video by johngineer about Learning Pet! Thanks johngineer!
Watch video on Vimeo
The one thing that I would improve though, is to make the organizers a little more friendly towards everyone, and not just caring primarily about the sponsors. Yes, it is important to make the sponsors feel good since without them then there wouldn’t be this event, but it is also important to make the people at the summit itself feel good also. For example, at the demo session one of the organizers was talking with all of these sponsors in front of my demo area and goofing around and taking photos, but never bothered to say hello or ask about my project. It was sort of uncool and unmakerly (if that’s a word). The way I think of it is… you might as well be friendly to everyone, because we are all in this together!
All in all, the Open Hardware Summit was great for connecting with some of the people I have met online! It also turned out to be a great learning experience for building tools for Processing, and seeing how the Processing ADK tool actually compiles with API v10 rather than v7 (it is literally just setting the number different hahahaha)!

Also, Learning Pet appeared in the Adafruit blog randomly! It was awesome!





