I was goofing around the other day thinking of ways that I could use NFC with RoboBrrd. I got a few NFC tags and was also getting a robot achievement badge (thanks Adafruit!), so there had to be some way to connect these things with RoboBrrd!
Looking at one of my first robots, BubbleBoy, I borrowed the hula hoop idea from it… so why not also borrow the hat idea? Sweet! We could have NFC hats with RoboBrrd, where it does different things for the different hats! More super powers, new behaviours! Woot!
Here is an interactive video where you can go through all of the hats and see what they do!
For the build, creating hats out of foam is actually a surprisingly difficult task.
Eventually this is what I ended up with:
The badges are attached with velcro!
The purple robot achievement badge hat is RoboBrrd’s favourites!
RoboBrrd celebrates with the red Maker 2011 hat:
Chirping and chirping and waving with the top hat:
But does RoboBrrd like the green hat? NONONONONONO
The code for this you can find on GitHub, in the Impy_RoboBrrd-mod repo. This is where I will be putting all of the modifications that I make for RoboBrrd!
One of the fun parts of the code is how I handle being able to check the NFC to see if the hat was removed/replaced after each action. To do this, I just go through each step.
checkNFC();// checks the NFC, updates hat (0 = no hat)
case1:// top hat
photovoreCheck();// check the LDRs each time
// snip – does the different actions here
if(step > 5) step =0;// after the 5 steps it resets
Of course, this would be much better if we had multi-threading and all of that. There are ways you can do threads with the Arduino … sort of … but sometimes I find that goofing around with sequentialness makes you think a bit more.
I’m going to challenge myself to try to keep this Arduino Diecimila 168 inside of Impy RoboBrrd and not upgrade it to a MEGA. I think it will be fine, but it will be fun to have to deal with not enough pins.
For instance, to make the NFC shield (thanks seeedstudio!) work, I had to use four pins that were previously used for servos, which meant I had to move the LEDs to the analog input pins, which now means that there is only one analog input available now.
The NFC shield is mounted between the two ledges on the side faces:
With some dual lock, so it is easy to remove:
I want to eventually add in two tilt balls and some e-textile fabric sensory things. Adding in some multiplexers shouldn’t be too much of a problem for some things, like controlling the LEDs. It is kind of fun dealing with this sort of problems
On the Adafruit Show and Tell, ladyada had a cool idea that I never thought of, actually writing a paper about this. I’ll probably do this. I’ll probably have to make a make-believe deadline to actually get it done. There is an Open Hardware journal, maybe it would be cool to submit it to there. The only weird part is that when I was researching last night, I couldn’t find anything about NFC and human-robot interaction. Has anyone seen anything about this? Or perhaps, RFID?
Eventually with these NFC hats I want to add on some features, like being able to write how often it has been played with on the hat. Using the green hat as an example, perhaps every 5th time that RoboBrrd wears the hat, then it will like it!
That’s all for now. This week I’m going to try experimenting with laying out a board for RoboBrrd! OOOH! Hope you enjoy the interactive video!