Archive for the ‘Programming’ Category
As you might have seen in the teaser video from last week, we were working on an application called RoboBrrd Dashboard. Now, it is available as Beta 1! Check out the video overview:
Watch on YouTube
This was made entirely in Processing with controlP5. It was quite straight forward to code it, the things that took the most time were in the details, like positioning, colours, and buttons. It also writes to an xml file, to save your current theme and servo positions. Handy!
Here is a screenshot:
RoboBrrd enjoys being calibrated with RoboBrrd Dashboard!
This is version Beta 1, so let us know if you find any bugs so that we can fix them
Help spread the word of RoboBrrd on Indiegogo and share the inspiration of robotics! Thanks!
Get your Arduino working with Google+ Hangouts!
I hacked this together a while ago, and now here is the tutorial for it. A lot of people have requested it, so hopefully it is of help!
Check out the video!
Watch on YouTube
In order for this to work, there are four main parts. The web app, Processing sketch, Arduino, and Google+ Hangouts xml.
The web app is the core of it all. The way it works is that it uses web sockets for communicating between the browsers, and a tcp socket to communicate back to Processing.
Processing is listening to this tcp socket, and then it tells Arduino what to do.
To get it working in Google+ Hangouts, the web app is included as an iframe. If your camera is pointing at the Arduino, then everyone will be able to see it work!
I have posted the code for all of this on Github. Go check it out!
A large amount of the code was based off of the code by John Schimmel: node-session. He was really awesome on Twitter helping me get it working!
The tutorial, with all the steps listed out, is over on RoboBrrd.com. I really recommend looking at it, because it tells you where to replace the variables for your own ones.
If you decide to take the plunge and try it out, I created a long in-depth tutorial walking through the code.
Watch on YouTube
I really hope that this helps people out there to get started! I would love to control some of your robots and blinky lights through Google+ Hangouts. Oh yeah, and it would be great to see them on the Robot Party!
Let me know if you have any questions along the way, and I can try and answer them! Gooooood luck!
SecondConf was a great experience! I spent the weekend learning and taking in a lot of useful knowledge about software and also hardware!
The most I learnt about was Bluetooth Low Energy from @macisv (Bob Kressin) and @bradlarson (Brad Larson). They are doing some really spiffy things with the technology. Not only is it going to have uses that can benefit our day to day lives, but it will be great for hobby uses and research.
Bob actually gave me a BLE module to play around with, and I have one of the shields from RedBearLabs from Maker Faire now as well, so I cannot wait to test it out! I’ll probably have to rent an iPod Touch for a weekend to test out the apps on it, but hey better than nuttin! Better than MFi! (That there in the pic is also a book that I won from the puzzle contest!)
I gave a talk on Apps for Arduino and RoboBrrd! You can view the slides on my webpage here, or on SlideShare here. There was a demo afterwards where I showed off RoboBrrd, the laser cut pieces, and also the boards.
I was quite pleased with this talk, since it was 40 minutes long I was able to explain everything in detail. People clapped afterwards, and the response on twitter was good, so hopefully people enjoyed it and learned something new!
^ pic by Kevin Mitchell
The demo worked great, except Impy had a little bit of stage-fright batteries at the beginning. I’m glad that I left the demo to after the whole talk was finished, because then people could come up and ask questions!
^ pic by Kevin Mitchell
This pic is funny, apparently RoboBrrd does not know how microphones work yet.
^ pic by Kevin Mitchell
It was interesting how often the word ‘design’ was used during the conference, mainly because it’s important, but it also has a lot of different contexts. From SecondConf I learned that design could mean anything from the user interface of the app, to accessibility, to behind the scenes physics formulas. Well, it seems kind of obvious now, but it’s just like design is everywhere. Not just CAD or EDA or UI, but how you do whatever you’re doing!
One of the perks of the conference being in Willis tower was going up to the Sky Deck and being totally scared out of your brains! I’m not usually a person scared of heights, but when you step onto the open glass, your mind plays tricks on you and you think that there is no glass- that you would be falling. It was pretty crazy kneeling down to take a picture of RoboBrrd like this:
It’s just so crazy to be that tall up off the ground!
The organizers were really great! The food was good, the pop was good, and even the tea was good! The pizza there was pretty crazily three dimensional too. Amy was awesome, and tried her best to rescue me when I was stranded at ORD and I only had access to Twitter through a poopy touch screen public computer. In this pic is David and I, he was really cool too!
^ pic by Kevin Mitchell
As you can tell, I was pretty happy to be at SecondConf! I’m looking forward to trying to go next year. The size is small enough that you get to meet everyone at least once, and learn about what they make etc. It’s just an excellent way to learn pearls of wisdom from other developers who are as experienced as you, if not more!
^ pic by Kevin Mitchell
It was great meeting many new friends at SecondConf, and I’m really looking forward to what everyone is going to make in the future!
We’re going to SecondConf! SecondConf is a developers conference for iOS and Mac. It’s sort of like WWDC, but there will be less people there, more discussions, and lots of learning of course!
We were invited to give a talk last year, but thanks to a cold on the end of Maker Faire we had to post-pone it to this year. And we were actually invited back this year to give a talk! Sweet!
If you’re going to SecondConf, our talk is Sunday at 11:00AM!
You will not want to miss it, because it will be about robots and electronics and how to create a blended reality by combining it with software!
The talk is about 40 minutes long. During the talk we will discuss:
Apps for Arduino
- “If hardware is the heart of a project, then software is its soul”
- Matatino and Wijourno frameworks
- Why lack of feature creep is its best feature
- Community, open source
- And more!
- “Do-it-yourself educational robotic pet”
- Educational aspects
- Fun hardware
- And more!
The talk will also include some demos of how everything works and such!
From what I’ve heard, the talks will be recorded and archived, so it will be online in the future.
Check it out! Dr. Wave is also going to be there! Remember when RoboBrrd visited Pixar while we were at Evil Mad Science? It’s always really interesting to learn more about Pixar, movies, software, and just so many things.
Bob Kressin, who is the presenter right after me then lunch, is also doing a presentation on Bluetooth Low Energy. This will also be really cool, since we are going to work together to get RoboBrrd working with BLE on Friday! I’m totally psyched for this!
Mega thank you for SecondConf for the opportunity and accommodations! It’s going to be great. Looking forward to meeting everyone!
Introducing Speech for Arduino! This app will give your electronics a voice, your Arduino-based project will be able to synthesize speech!
You send a string over Serial, and the app will say it for you in various voices. You can use voice modifiers to place emphasis on words, change the pitch, rate, volume, and more.
Check out the video demo below!
This was a really fun app to make. I actually wrote it while in transit, so that was interesting. Coding in a moving vehicle is an interesting experience.
This app is Donationware, with a suggested minimum donation of $5. I put a lot of effort in this app, so it really means a lot ^_^
Go and get it on AppsForArduino.com! Hope people will make cool projects with it!
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:
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!
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.
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:
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.
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
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!