Pheonic Reboot!

After having shuttered Pheonic nearly eight years ago, I have finally rebuilt the site as a personal site. As such, I've moved my blog articles on robotics over from the now-defunct Robotic Ramblings blog as a start and I will be making a concerted effort to get back to writing more often.

Inter-mBot Infrared Communication Achieved

One of the areas that I passed over in the first volume of A Gentle Introduction to Robotics was the use of the infrared transmitter/receiver that is on the mBot. My original plan was to use it to facilitate inter-mBot communication so that at some point I could demonstrate simple swarm robotics. However, I ran into too many issues via mBlock (which have apparently been resolved with the current version) and it was preventing me from completing the book so I dropped that chapter with the intention of addressing those devices in the second volume of the series which focuses on native programming in the Arduino environment. While there are innumerable ways to make use of inter-mBot communications, I'll present a short video below of one mBot changing the color of its LEDs and sending the color to another mBot so that the other mBot can match colors with the first.

Are delay and delayMicroseconds Considered Harmful?

One of the big things I've noticed in a lot of the Arduino tutorials is the use of delay() and delayMicroseconds(). Both of these methods are "blocking" calls that literally stop the operation of the microprocessor until they complete. Apparently a lot of folks aren't aware of the millis() and micros() timer functions which are non-blocking so I wrote a small utility object named ActionTimer that uses the millis() method and published it on Github link. It seems to work well for me but of course, your mileage may vary. More interestingly is that I have seen the same thing pop up for the FTC teams using the FTC SDK in Java, so it is apparently not an uncommon situation.

mBot and IR Transmit and Receive

In my first book I avoided the IR Transmit and Receive devices other than using the included IR remote that comes with the mBot. Some of that had to do with not being able to get the test programs in Scratch to work, but a lot of it was more because I couldn't think of an application for a single mBot. That's still the case, but I've got an idea for an application with two or more mBots that will appear in volume 2 of the "A Gentle Introduction to Robotics" series. That being said, I wanted to share a couple of test apps that I've written so that you can go forth and be creative if you have a couple of mBots (and really, who wouldn't want to have two?).