Hull Pixelbots and the wrong kind of quotes

badquode.PNG

One of the downsides of thinking “I’ll use my phone for all my pictures” seems to be that don’t take any photographs at all when I should. This is how it was today at the Hull Pixelbot talk I gave at the university. However, the talk went well with a very appreciative audience.

I hope I didn’t come over as too obsessive compulsive when, during the session I started to fret about the use of the wrong kind of double quote in some of my sample code. Stupid “Smart Quotes” had stuck its fingers into my text and broken it. I hate it when I see it in other folk’s stuff, and I usually try to make sure that my quote characters are the right stuff.

For those of you who’ve no idea what I’m on about, its the “ in the top line should be vertical double quotes like the rest of the sample. It’s important to me, but perhaps I should get out more…..

For connoisseurs of quotation marks you can find the slide deck here.

Fantastic Bugs and Where To Find Them

30442377357_7cf0ca64b7_o.jpg

On Thursday, as we were building robots I came across one of the most amazing bugs I’d ever seen. We’d reached the point where the robots had been built and they were connected to the computer. My HullOS Editor program lets you write programs and send them into the robot for it to run them. But something weird was happening.

The editor was displaying things that it should not. It seemed to be duplicating program code that had been typed in. And nothing was working. It was very confusing. I thought back to the time I spent the day before testing the code and had to confess that I’d never seen anything like it before. In fact, if I’d set out to write a program that was doing what the editor seemed to be doing, I was not sure how I would do it.

After a bit of head scratching I found the fault. And it wasn’t software. The robot has a speaker - more of a buzzer actually - which makes all kinds of irritating buzzing noises. Normally you’d connect a speaker across an output pin and a ground connection so that when the voltage on the pin goes up and down the speaker is driven in and out.

However, the Arduino doesn’t have many ground connections, and the ones it does have are all in use by the pixel and the distance sensor. So I use this rather clever (for me) trick of putting the loudspeaker across pins A0 and A1. If I make sure that A1 is always at the low logic level I can produce a potential difference between the pins by setting A0 high. This drives the speaker and sound comes out. I’m happy to trade a signal pin I don’t need for a ground connection.

This is probably deeply dodgy in electrical design terms. But since it works I think I have the last laugh on this one. Actually, if I had the time I’d experiment with swapping the ground level from one pin to the other while I play the waveform and seeing if this means I can make louder sounds by driving the speaker in and out, not just out.

Anyhoo, enough about my dodgy cleverness. Turns out that the fellow making the robot had wired his speaker incorrectly. Rather than wire the speaker between pins A0 and A1 he had wired the speaker between pins D0 and D1. These are two data pins on the Arduino which are also used for the serial port that is connected to the host PC. One of the pins is the data going into the Arduino and the other is the data coming out of the Arduino. Linking these pins together has the effect of sending every character that the PC sends to the robot right back to the PC again. Hence the terminal madness.

We put the speaker on the right pins and it worked a treat.

This illustrates one of things I said at the start of the robot building. Making robots is both fun and tricky because the combination of hardware and software makes for very “Interesting” misbehaviour.

Making Hull Pixelbots

 We were in Hull University Robots Lab

We were in Hull University Robots Lab

Had a lovely day making robots today. I was working with Tristan and Mac, who were visiting the university from Scarborough, taking part in a work experience program. I had to robot kits all ready and a set of nicely printed instructions for them to follow.

They spent the morning building the robots and the afternoon programming them. It was great fun, and by the end they had left the suggested exercises well behind and were heading off in all kinds of interesting directions, which was wonderful.

It’s a couple of years since I stopped working at the university and it was lovely to see the campus looking so nice. There seem to be a lot more buildings than I remember and the Computer Science and Engineering Department have acquired some lovely new toys.

Rob at Ron Dearing UTC

30041497068_3f43db175b_z (1).jpg

Despite arriving a tiny bit late, I had a great time at the evening event at Ron Dearing UTC today. A whole bunch of folks came to see me to talk about technology and I showed off some Hull Pixelbots, my silly goggles and the prototype air quality sensor that we’re working on over at Connected Humber.

Of course, I totally forgot to take any pictures at the event. Silly me. That’s why there’s a rather splendid picture of Whitby pier at the top of this post instead of anything relevant to the night.

Anyhoo, I talked to a bunch of folks and gave out a bunch of advice. Summarised thusly (posh prose)

  • If you’re into computing, start playing with the Arduino device. It’s cheap to get started (much less than a video game) and extremely creative. Buy a Sintron Arduino kit (search ebay or Amazon for “Sintron Arduino” to see a selection of kits. The one that is around thirty pounds is good value. If you want to start cheaper, come along to a Connected Humber event (we have them on the first and third Thursday of the month at c4di starting at 6:00pm in the evening). We’ll sell you an Arduino and some hardware for five pounds and give you some things to do with it. You can find out more here.

  • Start learning about 3D design. Lots of people that I spoke to were already doing this. The ability to think in 3D will stand you in good stead whether you go into fields ranging from video games to product design. There are lots of free packages you can use, I quite like FreeCad, although it can be a brute to get to grips with. If you’re a programming type, take a look at OpenScad. If you want to use a free, professional level, tool take a look at Blender. It will really make your head hurt, but you can do awesome things with it. Take a look online for howto videos for these tools. If you don’t like the ones that you find, make some better ones of your own.

  • Which brings me to my third point. Lean to write and talk. When you start doing something, start writing about it too. Put your writings into a blog, a personal diary or a log. I don’t mind. The important thing is that you do this. I made the point lots of times that you can learn a good living, and have fun, as a programmer. But if you also have the ability to write well and are good at communicating your ideas this makes you much more useful and interesting to employers, getting you even more interesting and rewarding things to do. So you should work at getting those skills. Deliberately do things that take you out of your comfort zone. Practice talking to people (networking is a big part of success) and try to force yourself to speak in public. Trust me. It really pays off.

By the end of the evening my voice had just about worn out, as had the batteries in the robots. But it was great fun. And then I went home and had bananas and custard for supper. Such fun.

Hull Pixelbot at The Digital Awards

35180323692_b3d1ed4820_z.jpg

I'm totally gobsmacked (a great phrase) to discover that the Hull Pixelbot has been made a finalist in not one, but two categories in the The Digital Awards 2018.  

"The little robot from Hull" is up for an award in the "Best Hardware" and "Best Use of Technology within Education" categories. Awesome stuff. Thanks so much folks. The awards ceremony is in September.

There's some impressive competition in the categories, including some from companies that are also based at c4di. I'm really pleased just to have made it as a finalist. If you want to read what I wrote about the robot, you can find my entry description here

Robot Rumbles at Dot Net North

40185274710_a3545d8130_z.jpg

Turns out that Dot Net North is a great place to go and talk about robots. It's in Manchester and they run regular events about technology. Pete had offered me a chance to take along some Hull Pixelbots and explain that they are all about. Great fun. You can find the explanation here

We had Pizza, and at the end a Robot Carrying Cheese Race. 

 A tense moment with the cheese.

A tense moment with the cheese.

The audience was splendid, most things worked (although one of the cheese carrying robots could probably have used some new batteries). 

You can find out about more Dot Net North events here

Hull Raspberry Pi Jam with robots

20180505_091359858_iOS.jpg

Well, that was great fun. Spent the morning at the Hull Raspberry Pi Jam. It was something of a "RobotFest". I had my Hull Pixelbots and Coretec Robotics were there with their balloon Raspberry Pi powered balloon busting robots. I was trialling a new idea I've had, called the "Robot Rumble". The idea is that players code up their robot warriors to get as far into their opponents area as possible. You can find the draft rules here

As it turned out we didn't get that many rumbles going, but folks had great fun making their robots do things, including some things I'd never have thought of, which was rather nice. And from the sounds of bursting balloons and cries of victory coming from the other side of the library, fun was being had there too. 

The second part of this post was going to have the title "Three Thing Game Judging Fun". But instead I'd have to use the title "I probably shouldn't have eaten that chicken from the fridge". Number one wife did ask me to check the sell by date but I was confident it was fine. And besides, I'd thrown the package away.

By 2:30 it was turning out that the chicken might not have been that fine after all. And an attempt to "kill or cure" by drinking a can full of "Old English Ginger Beer" didn't have the desired effect. Which meant I had to beat a hasty retreat from the event and head home for a lie down amongst other things. 

Fortunately the effects don't seem to have been too long lasting, which is a good thing as I'm supposed to be driving to Birmingham tomorrow. 

 

Hull Pixelbots at Dot Net North in Manchester next Tuesday

pixelbotbits.PNG

Another Hull Pixelbot event coming up. On Tuesday next week I'm going across the Pennines to Dot Net North in Manchester. You can sign up here.  I'm going to try and crowd source some robot control. And apparently the pizza is really good. 

If you want me to bring my Hull Pixelbots to your neck of the woods (do woods have necks?) then let me know. 

Hull Pixelbot Robot Rumble at the Raspberry Pi Jam on Saturday

39993977510_2d91acb24f_z.jpg

Don't forget the Hull Raspberry Pi Jam this coming Saturday at Central Library.  There are going to be lots of robots, including a bunch of my Hull Pixelbots.

I'm going to be testing a new "Hull Pixelbot Robot Rumble" in which two teams of robots face off against each other in a test of programming skills and strategy. Should be fun. You can sign up here

esp8266 wacky wifi

 one way to get a screenshot....

one way to get a screenshot....

This is rather weird. It all started when I got my old Nexus 7 tablet out of retirement. I'm doing some upgrades for the web server for the Raspberry Pi event coming up, and I wanted to use the Nexus to see if the web site would work on an Android powered browser. 

One of the applications on the Nexus is a WiFi analyser that I've used to pick and choose my WiFi channels. When I fired it up I noticed a few strange transmitters which were taking over the spectrum (as you can see above). 

I finally tracked this down to the esp8266 devices that I use in Hull Pixelbots. For some reason, when they wake up, they start doing things on WiFi channels. I've no idea of the precise meaning of this transmission, but I don't particularly like it. It turns out that if you turn off the WiFi before you do anything else (even turn it back on to connect to an access point) then you don't see this. 

I'd love comments from anyone else who've seen this, or has more knowledge of what is going on. In the meantime all my programs now start with:

WiFi.mode(WIFI_OFF);

Talking Hull Pixelbots at the new Hull Makerspace

 I stole this picture from  Hull Makerspace . Thanks for that. 

I stole this picture from Hull Makerspace. Thanks for that. 

Today I got my first look at the new Hull Makerspace. 

It's splendid. It's a huge room full of potential; connected to a bunch of other rooms also full of potential. The stuff they are installing is fantastic, including pottery kilns, a CNC machine shop, a paint booth, wood working, sewing and of course frickin' lasers (not mounted on sharks, that would be silly, but for cutting things with). 

I'd been invited to give a presentation at a Code Club meetup. Code Club is an an organisation that does just what it says on the tin. It sets up code clubs, usually as an after school activity, where kids learn the basics of coding. They're getting going in Hull, but they could always use more help - contact them here for more

We also had a talk from Matthew about his efforts putting a Raspberry Pi in the sky, Becky on why we should all be taking part in Code Club and Jon, giving details of the next Raspberry Pi Jam in Hull. 

When it was my turn I showed off the new Hull Pixelbot in perspex,talked a bit about HullOS and we had some fun making robots move via Azure IoT Hub and MQTT. Such fun.

Thanks for the invite folks, I look forward to seeing a lot more of the makerspace in Hull. 

Talking about robots for the children's university

 Showing of "Transparent Terry", one of the robot crew

Showing of "Transparent Terry", one of the robot crew

We had a bunch of folks from HEY Children's University come and see us at c4di today. It was great fun. I was showing off how we can put programs into robots to tell them what to do, and that a program is just something that takes in something (a distance from a distance sensor)  does something with it (run away if the distance is less than 100 mm). 

They were a great audience and I hope that a fair few of them get into software, robots and other stuff that can change the world. 

I said I'd put some links on here to resources. You can find out about the Hull Pixelbot (the robot I was showing off) here. You can find resources to build your own Pixelbot here. If you really do want to build a robot, come along to our hardware group meetings (there's one next Thursday). Sign up here

Super Duper Hardware Meetup

Hullpixelbot Connections.png

We had a really good hardware meetup today at c4di. A whole bunch of new members turned up. along with a bunch of "regulars".

I did a talk about the latest developments on the Hull Pixelbot front. The system that controls the Hull Pixelbot has been renamed "HullOS" for marketing reasons, and is now available on GitHub. There's also a manual for the new scripting language supported by HullOS and an editor program you can use to create HullOS scripts and load them into the robot. 

Finally, I've added the DXF files for laser cutting Hull Pixelbot chassis components, along with STL files for the 3D printed parts that you need as well.

I'll be adding more Hull Pixelbot stuff in blog posts over the next few weeks. 

There were lots of really interesting conversations going on all round the room, which was great. We've still got room for more though, the next meetup is on the 15th of February. You can sign up here

Hull Pixelbots at Global Gamejam

The them of the Global Gamejam was "transmission". Over in the university we had a bunch of teams exploring different aspects of this in lots of creative ways. 

I had a bunch of Hull Pixelbots and a newly minted web editor that mostly worked. 

Above you can see a nearly working display of Hull Pixelbots propagating a transmission from one to the other. Each robot is programmed via a web site using a scripting language that runs inside the robot. 

The idea is that each robot "wakes up" the next one by moving close to it. The first attempt fails because the Mr White doesn't wake up Crystal Maisie,, and the second attempt shows my bad planning, in that it leaves Crystal Maisie in the way of the final move from The See Through Kid. Oh well. 

Hopefully players of the completed game will be better at it than I was.  I think it would be interesting for a large team, with each team member controlling a robot and a prize for the fastest transition from one end to the other, using all the robots at their assigned starting positions. I took some pictures during the judging, you can find all of the shots here

39970013222_55c0f02fe0_z.jpg

Thanks to Simon and David from the university for organising such a great event. 

Hull Raspberry Pi Jam and Hull Pixelbots

28222332319_80bcca7263_z.jpg

Sorry the image above is a bit blurry. My lovely Fuji camera takes fantastic pictures, but only if you're patient enough to let it finish focusing before you take the shot.

Anyhoo, We had great fun at the Raspberry Pi Jam in the Central Library in Hull today. I've written before about how any carefully designed user interface never survives contact with the user. Same happened to day when I turned some kids lose writing little programs to control robots. 

The good news is that making robots do what you tell them was sufficiently intriguing for folks to ride over issues with the interface, and everyone had great fun in the end. I left the event determined to get enough robots together to allow people to do some proper co-operative (or competitive) action.  And set up something rather interesting. 

Then it was on to the Global Gamejam event at the university. The theme of the competition is "Transmission". I've got a plan for that. Involving robots. 

Feeling better - but going backwards

39103302615_91cff07d0b_z (1).jpg

I think I must be feeling a bit better, because I've started making stupid mistakes again. Starting with telling off the database for refusing to find something that I knew was there. After all, I'd put the record there, hadn't I? Turns out that I had. Twice. So my request to find a single item with a particular name was failing because there were two of them.

After a bit of tidying up I've got something mostly presentable. I want to use it tomorrow at the Raspberry Pi Jam in Hull, and also as the basis of a Global GameJam entry.