Piwars 3.0 Day 3

3rd Feb 2017

Oooooh there is so much I want to share you you all about our newest robot…but can’t. Sorry, sworn to secrecy ๐Ÿ™

Don’t dismay, here is what I CAN tell you:

Over the last couple of years I’ve assisted in building several wheeled bots and prototypes (actually, counting back in my head its more that I realised). These range from tiny little three omni wheeled mico-pi noon entrants all the way up to our beloved bighak. One thing that they all have in common during the building stage is we haven’t ever built a rig testing station. By that (excluding bighak due to its size and weight) they have all rested on a china mug when performing motor tests. Normally this induces a fair amount of fear in me as the vehicle spins up the dangling wheels to their full speed (not always in the same direction as each other and not always stably…) and having loose wiring precariously close to the rubber grippy tires.

World, say hello to our newest creation:

Assembled Test Bed

Laser Cutting Test Bed

 

It may not be the most photogenic, but this is a big thing! We now have a ‘safe’ way to test our prototype AND drink our cups of tea, something not previously possible.

Now, we’ve had to do this previously but as I’m in charge of the blog I’d thought it required mentioning so that future Pi designs might be tweaked. Every time we come to mount the Pi (or pi camera module) we very quickly remember that the mounting holes are M2.5. If you didn’t already know, M2.5 bolts are not generally available from hardware stores as they are tiny. The smallest I’ve seen is M3, of which I now have a small stock with nylock nuts to pair with. Just to be clear, I’m not saying they are impossible to come by, far from it. A quick google will probably show loads of places to buy them online. What I’m trying to get across (and probably failing) is that not many DIY projects use them and so I don’t tend to hold a stock of them at home. This has previously led us to do something drastic:

Drilling out a Pi Zero mount hole

What you can see here is me finger turning a 3mm drill bit through an existing 2mm mounting hole. I’m using my fingers and not a drill mainly because the drill is cordless and not charged as I had forgotten I’d needed to do this ๐Ÿ™

Before I get any grief, please don’t try this at home. I’m a responsible adult who will take responsibility if I break my own Pi. I don’t want to be responsible for anyone else who copies me.

 

Wii Classic Controller

Onto the “new” toy, ah the wonders of the second hand market! Last year we used a Wii controller with it’s nunchuk to drive our robot wirelessly. This year we wanted to improve on this as we were basically holding two separate controllers yet only really using one hand/thumb to drive thing. I’ve been researching PS3 controllers and have done a fair few tests with positive results when interfacing with a Pi and Python. Whilst the PS3 controller is ergonomic I don’t like how the thing pairs with the bluetooth adapter. It isn’t a simple button press and requires knowledge of the ‘dark side’ to get it to work. This means if the PS3 controller broke or ran out of juice mid contest we’d be frantically typing on a laptop to try and pair a backup. So, back to the Wii controller it is because this easily pairs each time the robot boots by pressing 2 buttons on the controller. this means we can have many spares and no-one needs divine knowledge as to which one is currently paired.

Whilst I was passing by a favorite second hand shop in town, they happened to have a Wii classic remote going cheap. I knew the Wii had plastic remote holders in the shape of guns and steering wheels and that they had balance boards and the like, but I wasn’t aware that these were made…probably shows just how much use my Wii actually got ๐Ÿ™

I bought the controller and hurriedly ran home like Charley from the chocolate factory to see if I had purchased something useful or whether I’d wasted my money. I was in luck, the CWIID python module supported it (mind, this took a fair bit of googling and github searching to find the exact text state to request from the module and each button ID to test for).

If you have very good eyes you might be able to see a load of text on the screen behind the controller above. Each one of those is a test for a button state and a print line to report a button pressed.

So, at this point we have a basic test rig and a basic controller input. Next up will be proper coding and hopefully testing.

Comments are closed.