Lora at the c4di Hardware Group

We had a great hardware meetup tonight. I showed off a bit of the latest Hull Pixelbot scripting stuff (once I'd got it to work - note to self - don't turn up with a machine and think you can install the software and it will just work. Doesn't happen). 

Then we talked a bit about Lora (or low powered radio to you). I've blogged a bit about this in the past but now we want to take things a bit further, and get going making Lora stuff. We've got all kinds of plans, none of them involving world domination. At least that's what we're saying for now. 

Anyhoo, expect to hear more about our Lora plans in the not too distant future. It looks like a great technology to get in on the ground floor of. If you fancy getting involved you should come along to our next meetup and utter the magic phrase "I fancy getting involved". You can sign up for the next meetup here

A Dashboard Camera for 10 quid. What could go wrong?

One of my New Years resolutions should have been "I must stop buying cheap and useless gadgets".  But since I haven't made that resolution, and I found myself in the local grocers looking at the bits and bobs on offer, I ended up buying a little dashboard camera for a tenner. 

It comes with a mounting for your windscreen, a power connector and even a little lithium battery so it can be used away from the car (I want to attach it to a Hull Pixelbot). 

It works really well. The camera is reasonable quality, the controls a bit clanky, there's some HF whistle (which I can't hear) when it's switched on. But overall a win. 

Except for one tiny flaw that I've yet to resolve. You need to add an SD card which is used to store the video. When I take the card out of the camera and try to use it in my computer the files on it are not recognised. I hope it isn't using "write only memory" technology. 

Hull Pixelbot Scripting Language lives

One of "Robert's Rules" of programming is that things that sound simple often aren't. And things that sound complicated often aren't. A while back I had an idea for a simple scripting language that could be used to control Hull Pixelbots (or anything else embedded). It sounded simple. It's not.

I've been playing around with the language and I've just about got it going. It's not as simple as I might like, but it does work. The biggest change that I've made from previous versions is to use the "Python" style of code blocks. I did have "endif" keywords to mark the end of conditions but I found these really irritating (I kept missing off the endif and then wondering why the program wouldn't compile). So now you indicate which statements are controlled by a condition (or a loop) by just indenting the statement. Want to see some sample code?

begin
move 100 wait
turn 180 wait
move 100 wiat
end

This program would move the robot forward 100, make it turn 180 degrees and then move back. The wait element means "wait for this move to complete before performing the next statement". If the wait element is omitted the program starts the action and then moves onto the next statement immediately. We can make more interesting behaviours:

begin
forever
    green
    move 100
    if @distance < 100
        red
        turn 90 wait
end

This program makes the robot move forwards. As the robot moves it checks the value returned by the distance sensor . If the program detects an object less than 100 mm away it turns the robot 90 degrees and then continues moving forward. The red and green commands change the colour of the pixel. The indenting above tells you that the red and turn 90 statements are only obeyed if the distance is less than 100. 

The programs are compiled and executed inside the robot. I've written a tiny Python program to send them via the USB port. 

Update: I've made some tiny changes to the way that the wait behaviour works after showing someone the language and realising that it could be better. 

Mario and Rabbids for Nintendo Switch

Another game I've been playing with over the break is Mario and Rabbids on the Nintendo Switch. It's a fun little game that was on offer at a temptingly low price over the Christmas break. I like it because it's turn based. You give your characters their instructions and then watch the action unfold as they get into position and shoot at the enemy. Then the enemy takes their move, and your carefully laid out plans collapse before your eyes. Although that might be just me. 

I really like the way that there's no limit on how long you can spend thinking about what to do next. I'm rubbish at most "shooty" type games because I have a habit of standing and thinking, never a good plan when there are snipers about. But with this game I can spend as long as I like choosing who to send into battle, which of the wonderful weapons to give them and what to make them do when they get there. There seems to be a huge depth to the action too, with stuff laid around the levels that really encourages you to go back and play them again once you've levelled up a bit. 

If you've got a Nintendo Switch you really should get this game I reckon. 

Dark Souls III

Number one son has brought his Playstation 4 Pro along for the Christmas break. And he's bought Dark Souls III

I'm finding it great fun to watch him play it. There's a lot of death involved. Quite a bit of it involves the player. It seems that you learn the right thing to do in every battle by doing the wrong thing first and finding out that it kills you. The graphics are impressive, if a bit murky, and the animations and actions of the different forms of the evil hordes that you need to kill are very well realised. The voice acting of the characters is well done, and the story is suitably preposterous. Worth a look if you've got the patience of the un-dead. 

We didn't playtest this at all

Lovers of games involving strategic play, intense plot and mental strength should look away now. Lovers of idiotic fun though, that's a different matter....

We didn't playtest this at all is daft. It's the kind of game you can win by being the shortest player. Or lose by being eaten by a dragon. Or not touching your nose the right number of times. The games are short, furious and fun. I can't imagine spending an entire evening playing this game, but for a bunch of mad fun before you start playing Coup I reckon it would be hard to beat. 

Idiot ebay buyers

Here's a model for a business. Search ebay for things which appear to be going cheap. Make a stupidly high bid for the cheap item to try and win it at a knock down price. If you win at a low price, pay it. If you win at a high price, delete your username and walk away.

I've had this happen to me before. Up until now the buyers had the "decency" to come up with an excuse for their stupidly high bid before retracting it. This time they just deleted the user. 

It occurs to me that eBay should probably keep track of the postcodes used by buyers and check for large numbers of accounts being registered/deleted at a particular location. This would seem to be a good use of all this "artificial intelligence" that we are always hearing about

Start a Diary

We had a lovely Hardware Meetup at c4di today. We were a bit worried about having one so close to Christmas, but in the end enough folks turned up (hi Rob!) to make it more than worth the effort. 

One person that turned up has been making great progress working with his Hull Pixelbot. Each time we get together we solve a few problems, discover a few more and more forwards. Today we were talking about potential dividers. Great run.

As we left I made a strong recommendation to him. Start a diary. He's having lots of great ideas and building things, but having the standard "mad inventor" problem of remembering what he's done, what happened and where he's put the program files. A diary would solve all that.

I suggested that a great Christmas present would be a nice "page a day" diary, which can be used to record ideas and experiments. I keep a diary. If I do something interesting I write down what I did and what happened, along with links to any resources that I used.  Mine is electronic, an ever growing Word document, but I sometimes think a paper one would be nice too. There's something much more "real" about a physical artefact that you update. It's also much easier to work on and add diagrams and other stuff as you go along.  Proper engineers take pride in their log books that they use to record what they did. These are a fantastically useful resource if someone ever asks "Why did you do it that way?" because you can go back to the day that the design decisions were made and explain exactly what drove the decision. 

Writing a diary is also a great way to practice your writing skills, and you might even find that some of your diary entries become blog posts (I've done this before too).

Player Unknown's Battlegrounds

I'm more of a video game buyer than a video game player. Over the years I've acquired consoles, controllers and a whole bunch of games and some I've played quite a bit. But often I just end up playing Zoo Keeper in front of the telly. 

I'd not heard of Player Unknown's Battlegrounds until number one son mentioned that it's lined up to be the biggest game of the year. So much for my street cred (if street cred is even a thing these days).

The premise is very simple. One hundred people land on an island. The winner is the last one left. There are weapons, vehicles and nicely drawn surroundings that contract during the game so that you are forced together into one part of the island to duke it out in the final minutes. 

We used my PC to play it, and it worked really well. It's also available for Xbox. It's network only (which is not particularly surprising) and a fast network connection is probably a good idea.  

If I played it I'd last as long as it took for someone to find me. After some discussion we reckon that the way to progress is to parachute into heavily populated areas so that you can practice your gunplay. Strongly recommended if you like shooty games. 

Battlestar Galactica Board Game

Spent a very happy evening playing board games tonight. We started off with a session of Coup, always good for a giggle. Unless you assassinate one of your son's characters, and he then promptly turns round and knocks you out of the game. Oh well. New tactic. Don't attack the player on your immediate left, as it's their turn next and they will instantly go for payback. 

Then we got out the Battlestar Galactica game that I really wanted to play. I bought it ages ago, but never played it properly. Fortunately number one son had, and so we all had great fun finding out how the game works and then finding out how to work each other over during gameplay.

The premise is quite simple. The crew of a spaceship is trying to guide it and a bunch of civilian ships to safety in the face of implacable (and rather numerous cylon foes). The twist is that some of the crew are working for the enemy, and at the start nobody knows who the cylons are. At every turn the crew must deal with a crisis, and work out from the outcomes who can be trusted and who needs to be put into an airlock for a one way trip into space. 

By a combination of skill and miss-reading the rules the good guys managed to make it to safety, which made me a rather hapless member of the winning team. It's a great game, although there is a lot to take in at the start. The events in the game pay good service to the plot of the TV series (that is, the second iteration) but you don't need to have seen the programme to be able to enjoy the board game. 

Next time we play, I hope I'm a cylon though, it looks like fun.

Ideas can be dangerous

I've had a bunch more ideas for features in the HullOS language that controls the Hull Pixelbot. Which is nice. 

But not that nice. Ideas can be dangerous. If you have too many you start to worry about the effort of implementing them, and then move on to feeling guilty about how few of them you've actually made work. Then you start to have ideas for another project that doesn't have quite so much emotional baggage. Until you have more ideas for that project. And so on. 

I do this a lot. 

One solution that I've found is to keep a diary where I note my ideas, amongst other things. That way I don't worry about losing the ideas and I can tick them off when I implement them. 

Dr. Who Christmas Special Preview

I know stuff. Things I can't tell you. Things you can only learn by getting tickets to a Dr. Who Christmas Special preview in Hull and then standing in the freezing cold for an hour waiting to get in.

Thanks to Derek for getting the tickets. No thanks to the "fan" who thought it might be a wizard wheeze to sneak a camera into the earlier showing, disrupt everything when caught and delay things for everyone.

The showing was part of a tour of cities, bringing a bit of early Dr. Who themed seasonable joy. They had a Tardis with a snow machine. You could take pictures of yourself next to it, but we didn't bother in case we lost our place in the queue. The security was good natured but very intense. I've been on less well policed flights. We handed in our phones and then had a proper search for any other dodgy devices. 

I can't tell you much about the show, except to observe that I think the job of a Dr. Who Christmas Special is to stretch plausibility, space and time as far as it possibly can without breaking it and lob in a few good jokes plus a seasonal message. This one did a very good job of all those things. And it means I can give out a knowing air when we sit down in front of it on Christmas day.