Arduino Fun at Platform Expo

We had some great sessions, this is the presenter setup just after a group had left. 

We had some great sessions, this is the presenter setup just after a group had left. 

I did some sessions for Platform Expo today. I was taking about the joy of making things using the Arduino micro controller. Not a lot of people had heard of this amazing device before they arrived, but they sure had afterwards. I showed off a bunch of silly devices including my wedding lights, the Thingomatic, light panel, balancing robots and even did some programming. All in twenty minutes a session. Six times in a row. 

The audiences were all wonderful. At one point I told everyone that an Arduino board can be bought for two pounds fifty, which is less than a McDonald's burger. And someone called out "Does that include the chips?".  Well played sir, well played.

Arduino Bits and Bobs..

Arduino Bits and Bobs..

I've put some resources on my Arduino pages if you fancy getting started with this amazing device. You can find them here


Bluetooth Manager for Windows 10 Universal Apps now on Nuget

BluetoothManager.PNG

I've been playing with nuget

It's awesome. 

It is fantastically easy to package up an assembly and make it available for just anyone to use in their applications. It is beautifully integrated into Visual Studio and I reckon it is actually easier to download a package from the other side of the world and make it part of your solution than it is to add one that you have written yourself on your own machine. 

To practice I've packaged up my Bluetooth Manager library. This is a little wrapper class that makes it really easy to use Bluetooth on Windows 10 applications. I've not tried it on Windows 10 on Raspberry Pi (but I've tried it on lots of other systems and it works fine). You can find out a bit more about it here.  I use it so that I can print message on my little home made Bluetooth printer, but you can use it anywhere you want to talk over a Bluetooth serial connection. 

Oh, and in case you are wondering why it is version 1.0.1 and not version 1.0.0 I found an interesting quirk in nuget. If your library class doesn't have a public constructor the package will fail to work because Visual Studio will complain that the class is "Inaccessible due to its protection level.". That's what happens when you try to use version 1.0.0

Taking a look at the Photon

The Photon is a neat little embedded device a bit like the Electric Imp I played with a while back, but  a bit cheaper to get started with. You write C code in your browser and the program is deployed over WiFi to the device. The hardware is very like the Arduino. The programs can communicate via the cloud using web requests and there are also bindings for If This Then That.

To be honest, I've not done much with it, but number one son has had a play and things it's quite neat. The only concern I have with these systems is that you are a bit dependent on the cloud backend. I've got a collection of cloud enabled devices that are now just paperweights, and I worry that things like the Photon might go the same way. Having said that though, for the price it is a lot of fun. 

Arduino Kits Going Live

So a couple of weeks ago I got the go-ahead to buy some Arduino kits for our Second Year embedded course. We have been using the Arduino robots and they are nice enough, but a bit too closed for my liking. So I went on-line and tracked down a lovely little Sintron kit on ebay. Twenty Five pounds for loads of bits and bobs.

Tomorrow I'm dishing out the hardware along with a bunch of little plastic bags and a page of sticky labels. Job one will be to use the chart above to put all the components in labeled bags so that we can find stuff later. Job two will be to get some lights flashing and buttons being pressed.

Exciting times.  

Robot Recovery

Last Wednesday my balancing robot kind of overbalanced, leapt off the desk and shattered on the floor. You can see the awful damage here. At the time I said that all I'd have to do is design some replacement parts, print them out,  and I'd have him back on his wheels again.

So I have.

Robot Plates.PNG

These are the FreeCad designs for the two plates that were broken. I did some careful measurement, wrote some Python to do the designs (it's a strange way to work, but I like it) and then printed them out and put everything back together. And it all works, which is nice. I think the new pieces are quite a bit stronger than the old ones. And if they break, I can just change one value in the program, run it again and print out some thicker ones..

Hymers School Summer Students Visit

We had some visitors today all the way from China. They are summer school students who are visiting Hymers College in Hull.  I did a talk about developing for the Arduino which was great fun (at least I enjoyed it) even though I managed to break one of my props half way through the session.

Thanks for coming folks, and I hope you enjoyed your visit to the university.

C4DI Hardware Meetup - You Should Come Along - Really

If you live in the Hull area and have any kind of interest in technology there's a very good chance you'd enjoy a C4DI hardware meetup. They are first Thursday of every month and we have a mix of folks who like playing with computers and hardware and stuff. This month we had a Raspberry Pis of various flavours (which sounds wrong but it's right), flashing lights, amazing embedded devices you can get for less than a fiver and some brilliant discussions amongst other things.

Keep an eye on the Hull Meetup site for the next one.

RGB LED Panel Magic

Some time back I got some of these SparkFun LED panels. I hooked one up to an Arduino and got impressive results, although just driving the pixels took pretty much all the power that the Arduino had. I had this plan to use a Parallax Propeller chip or maybe something from Xmos to create a fast moving animated display. But I never got around to it.

Then I found out about the SmartMatrix Shield for the Teensy 3.1 device. This sorts out all the wiring and power supply issues (all you need is something that can spit out 5 volts at a couple of amps). The Teensy is a quite amazing machine. It pops a 72Mhz processor with 64K of RAM and 260K of ROM onto a platform the size of an Arduino Pro. The development tools integrate straight into the Arduino environment and the deployment to the device works wonderfully, far better than a "proper" Arduino.

TodayI set about building my display. Everything fits into an 8 inch picture frame that I got from HobbyCraft.

You can see it all above. The Teensy and the SmartMatrix Shield are at the bottom of the picture. I've also attached an SD card and an IR receiver that allows remote control of the display.  There's a really good set of step-by-step instructions on the AdaFruit site. I designed and printed some corner brackets to position the panel inside the frame, you can get them from Thingiverse here.

The Teensy runs the Aurora software which is completely wonderful. it produces some really lovely displays. I've had to hack it slightly to get it to work with a remote control I happened to have lying around. The display is excellent, and photographs just can't do it justice.

One other nice surprise was that I did all this on my old Surface Pro that is now running Windows 10. It took all these strange programs and usb devices in its stride and just worked. I'm looking forward to adding some more visualisations and searching down some animated gifs to play on the device.

Four Letter Word Generator

Well, here's something completely crackers that you can buy for less than ten pounds from Tindie. It's a Four Letter word associative database all on a single tiny chip. You can ask it for a random word, and then get another word kind of associated with it. There's a blog post here that tells you how it works. 

Of course I ordered one. It arrived today in a big padded envelope, sent all the way from Japan. Next I have to build a bit of hardware to read the words out and display them. I'm thinking it might make an awesome idea generator for Three Thing Game.  The "Three Thing'omatic", I can see it now.....

Happenings in the Department

Muyiwa.jpg

Muyiwa Olu  gave a really good (and Rather Useful) seminar this week about the Python language. It is great to see someone being enthusiastic about a platform they obviously enjoy working with. I reckon that every programmer should have a bit of Python in their lives, because it is just such a fun language, and it was lovely to see some of the features brought to life. A great presentation from one of our second year students. 

You can find the slide deck for the session here

Next week we have Charlotte talking about Computer Science internships and her time at Airbus Industries writing software, including some Python code...

This week we also had our first meeting of the new "Embedded Development Club". Quite a few folk turned up, if just half of them come back next week with some kit to play with then we'll consider that a win. You can find the slide deck for the presentation here

And tonight we have a Hardware Meetup at C4DI. It's all go.

Exploding Robots

So I fancied having a go at building one of these Sainsmart balancing robots. But I wasn't sure how hard they would be to build. So I hatched a cunning plot. Get one for each for myself and number one son as Christmas presents and then, once he had built his and got it working, carefully copy it. 

The plan was working very well until a wire came off my robot and rather than providing a nice friendly 5 volts to the robot controller it delivered a much more unpleasant 11.3 volts. This did not end well. The voltage surge took out the Arduino board, the radio receiver and the gyroscope. Around ten pounds worth of damage. Wah. 

The good news is that the spares arrived today and my robot is now back on his wheels, lurching around the kitchen under sort of remote control. Getting the robot to balance was a bit of a challenge, my top tip is to just use the values given at the end of this video

I'm looking forward to adding a few more features.  Ideally I'd like to make him self tuning, or at least be able to tune the PID loop using the remote control rather than the fiddly trimmers that are supplied.

The kit is good value, the components are good quality and you get a lot of them. This would serve as the basis of a lot of interesting projects. 

Flashing Lights and Drones at C4DI

DSC_0036.JPG

Today we had another of our hardware meetups at c4di. Great fun was had by all who attended. We had two activities, playing with coloured leds or creating a Larson Scanner. Ross had brought along a little quadcopter with a video camera and much fun was had with that too. I'm not saying you should get one, but if you fancy making an investment you can find it here.

I Want a Microsoft Band

Microsoft have just released their Band, a smartwatch/fitness device that looks really nice. They are selling very well apparently, which means that I might have problems getting one when I head out to Seattle for the MVP Summit. And I really want one.

Now, I fully realise that the pursuit of gadgets is ultimately fruitless as they lead an ephemeral life, doomed to be superseded by the next iteration and driven by a marketing beat. You could argue that people who try to validate their existence by surrounding themselves with the latest technology are perhaps only proving their ultimate shallowness. And in the end the accumulation of material goods is ultimately futile (for a full discourse on this matter listen to the wonderful "Mountains'O''Things" by Tracy Chapman).  

But I still want one. 

If anyone finds themselves in a position to get me one (medium size should fit I reckon as I'm, half way up the strap on my Pebble) I will do the following for them, in addition to paying for the device:

  • supply them with a printed, autographed copy of the latest C# Yellow Book
  • write a poem for them (I am a published poet) on any subject they nominate
  • provide them with a unique Windows Phone Controlled Wedding Light,  in case they have a daughter getting married in the near future who needs table decorations. I'll custom build it with a choice of base colour and ship it to you anywhere in the world. 

Like I said, I may be shallow and gadget obsessed, but I really want one of those bands.

Program Arduino in Visual Studio with Visual Micro

Anyone who has heard me wax lyrical about programming will know my opinion of Visual Studio. If we ever get invaded by an alien race from beyond the stars I reckon that they will be here for our advanced technology and Visual Studio will be on their shopping list. It is the best development environment ever. And anyone can get a free version

You might think that it is only used for Microsoft technology, but you'd be wrong. You can use it for all kinds of language and platforms because it has been built to support plug-ins. You can even use it to create Arduino solutions with the Visual Micro plugin.

The free IDE from Arduino is nice enough, but Visual Micro is wonderful. I used it extensively when I was creating the Wedding Lights.  I had two Arduinos hooked up to my PC, master and slave, and I was able to deploy and debug programs in both of them at the same time using Visual Studio for everything. 

There are a few issues that I've noticed. It supports a kind of debugging mode that I don't find terribly useful (I add lots of code instrumentation) but once you figure out how to turn it off it works fine. The system also doesn't have quite all the refactoring goodies that you have in "pure" Visual Studio, but Intellisense is present and correct, and that is really what you want, plus the lovely editor.

Visual Micro needs a "paid for" version of Visual Studio because the free Express versions of Visual Studio don't support plugins, but you can download and use Visual Micro for free. The way the licence works you can keep renewing it with out paying the company anything. But I've bought a licensed copy because I think people who produce systems as good as this deserve my money. 

If you are serious about Arduino development you should get Visual Micro. Absolutely.

Arduino Rather Useful Seminar

I always take a picture of the audience. For tax reasons....

I always take a picture of the audience. For tax reasons....

We had our first Rather Useful Seminar today. It was all about hardware, made slightly more interesting by the way that hardware, in the form of my Bluetooth keyboard and mouse failed me right at the start. 

But thanks to the loan of spare keyboard we managed to get going and play around with Arduinos. I showed how easy it is to write programs for the platform and how many amazingly cheap components you can find on eBay. (In fact I ended up spending around 5 quid doing "research" for the presentation when I bought a 1.8 inch colour screen and an SD card interface)

Anyhoo, it went well enough and folks seemed to have a good time. If we have enough interest we might start a Hardware Fiddlers club of some kind in the department. You can find my slide deck and details of future seminars here

Hacking Electronics

I like Simon Monk. He writes the kind of books that I wish I'd written. They are sensible, instructive and above all practical. I've read some of his Arduino texts and found them very useful. He's also written the a book that you'll find useful if you want to get into electronics. 

Hacking Electronics is a great guide to getting started with components and computers. It gives you a good grounding in the basics, teaches you how to solder and then gets you making genuinely useful/fun things. Some of them have computers in (usually the Arduino). Others are just circuits. This is very nice to see. I think of electronics as "programming with hardware". You can write a program to make a light flash, or you can make a circuit that does it.

In software you change what happens by adjusting the value of variables inside the program. In hardware you change what happens by altering things like the resistance or capacitance of the components themselves. 

If you are looking for a book to give an inquisitive 11 year old (and then have fun together burning your fingers and "letting the smoke out" of devices) then I reckon this would be a very good one to go for.

Ultra Cheap Arduino WiFi

Embedded devices get really interesting once you connect them together. There are a few ways to do this, you can use the same kind of modules that I used for my Wedding Lights, or you can use Bluetooth. Or you can use WiFi. WiFi is by far the best way to link an embedded device to a surrounding network, but up until now the cheapest WiFi  hardware for a device like the Arduino would cost around 25 pounds.

But now we have the ESP8266 chip. This is tiny (as you can see) , costs less than five pounds, and puts your Arduino on the local WiFi network. 

A few health warnings: The device needs a high speed serial connection to the host computer, and so you must use the proper hardware serial port on your Arduino, not a software one. Also they are not very good at address discovery and so you will probably have to hard-wire the IP address. This is fine if you are using them at home but might make them a bit tricky to deploy on a corporate network. They will let a program connect to a TCP socket on a remote machine and send packets backwards and forwards, but that is about it for the moment. Fortunately that is just about what you want from such a device. 

Peter has been playing with them and getting then to work I've bought some (and put them in envelopes in my little boxes) and I'm looking forward to having a play with them.

Organising Components

While I was up town recently I noticed these rather stylish boxes in Tesco that you can get for a reasonable price. 

I'd been looking for some way of storing my increasing collection of electrical components. I have this worrying (but, fortunately not very expensive) habit of searching ebay for the word Arduino and then being completely unable to resist buying things I find at amazing prices, post free from China.

My plan was to fill each box with envelopes containing particular components.  I stole the idea from the excellent Arachnid Labs blog

It works really well. When I want something I just have to flick through the envelopes to find it. The Computer Scientist in me will probably sort the envelopes into alphabetic order at some point, but for now I've not got enough devices to really make it necessary.I don't have any anti-static envelopes, so I just used ordinary stationary ones.