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. 

Ultimaker Heated Bed Now Available

Ha. Within a couple of days of me changing over to the BuildTak print surface Ultimaker have announced a Heated Bed kit for my printer. Oh well. There may be some second hand printer parts going up for sale soon.

I've always wanted a heated bed for my printer. Una, my Ultimaker 1, does a lovely job on very small objects, but on larger ones there is always some warping as the printed object cools and contracts, lifting the corners and turning any rectangular object into a cushion. 

A heated bed solves that. It also gives you a smooth glass surface to print on so that you get lovely shiny prints. The upgrade replaces the entire print assembly, which is also cheering for me as I made a bit of a botched job of making the original, giving Una a rather lopsided appearance. The new bed should put that right and so I've ordered one.

BuildTak Printer Surface

While I was at the 3D printer show a while back I picked up a sheet of BuildTak to put on Una, my Ultimaker printer. Up until now I've used 3M blue masking tape underneath all my prints, and it works quite well, but I've never been able to get a smooth finish because of the gaps between rows of the tape. 

The surface that you print on is actually quite crucial, in that the heated plastic must stick to it well enough to allow the item to be printed but not so well that you can't get the darned thing off the bed afterwards.

BuildTak manages to do this very well. If you're like me, and you've not got a printed bed for your printer, then you might like to have a play. I'm much happier with the quality of the surfaces that I've printed on the BuiltTak bed. They have a slightly rough texture but it is much better than the one provided by tape. The company says that the surface should last for a while, I've done quite a few prints now and it seems to be holding up well. 

Pro top: if you are printing lots of the same thing, move each one slightly on the print bed so that it spreads the wear on the surface. Also, if you want maximum quality, move the print closer to the back of the printer. This is because when the printer is moving at speed the print bed (which is only supported at one end) will tend to waggle and leave ripples in the printed surfaces. 

Put Yourself in Carbonite with Kinect

If you've seen the movie Star Wars 2/5 (The Empire Strikes Back) you'll know that things don't end that well for Han Solo. He finishes up entombed in "Carbonite". Now, thanks to the magic of the Kinect Sensor and 3D printing we can all get the same treatment.

I've written a little program that takes the output from the Kinect Depth camera and renders it into an STL model that can be 3D printed. It uses some fairly simple averaging and filtering and seems to do a perfect job of rendering all of my chins in lifelike detail. Oh well. 

Above you can see the program in action, pointed at my less than tidy office. You can set thresholds for the front and back of the 3D region to be rendered, and also control the width of the printed item and how strong the relief is. You can even take selfies. 

I've popped the whole thing on GitHub, you can find it here

We are going to set the system at the Freshers Party next week so that we can print out little frozen models of all our new students..... 

Update: Rob (great name that) Relyea has pointed out that the Kinect Fusion tool does a great job of capturing 3D objects and will export STL files, It works very well, and the way that you can move the sensor round and add detail is very impressive. You can find it via the sample browser once you have installed the Kinect for Windows 2 SDK.

However,  I wanted to find out just how far you could get with a single sensor and fixed viewpoint. I also wanted to produce solid print ready output very quickly on a large scale, which is what my program does. I'm very impressed that with just a bit of averaging you can get such good results just from the depth sensor. 

Update: We used the system at the First Year welcome party. It worked rather well. You can see some of the prints here.

Panel Picture

I'm quite proud of this picture. I took it in the Post and Telecommunications Museum in Copenhagen (well worth a visit and free). The panel was used by coastguards who were talking to ships apparently. I took three photographs, made an HDR version using PhotoMatix and seriously tweaked it.

I've used it as the backdrop to the Festival of Daring and Excitement poster, but I think it makes a good standalone shot.  

Singing the SharePoint Song at C4DI

We use SharePoint at work. All the modules that we teach (and lots more besides) have SharePoint sites that contain notes, coursework and other useful stuff. It works for me.

It works for Simon and Steve too. Tonight at the C4DI Software Development Meetup they gave a presentation which started with a song. (something I've never dared do) and then went on to lay out, in well structured detail, just how much you can do with this platform.

Things that came out of the talk for me:

  • SharePoint an "everything machine". You can use it to share data, you can use it to manage process, you can use it to present stuff. And lots of other things too. It will provide 90% of the features of highly expensive platforms for things like document management, version control, group working and lots of other business needs. And if it doesn't do what you want out of the box you can use it as a platform for customised apps that can run on a huge variety of devices.
  • SharePoint is cheap to get started. Individuals can use the online version which is part of Office 365  for a few quids a month, and you can get developer access for not much more. And even an individual can get value out of using it to manage their data.
  • SharePoint is becoming a cloud application. You can run your own servers, but the number of reasons for doing this is falling over time. 
  • SharePoint is like a lot of things in life. You get out what you put in. A little planning at the start will pay off hugely when you start to use the system. 

I only use a tiny percentage of what our departmental SharePoint site offers. After this talk I left resolved to find out more.

Festival of Daring and Excitement

Preparations are afoot for the new session. We're trying a few new things this year, including a special "Freshers Frag Fest" at the end of the first week. The "Festival of Daring and Excitement" will give new arrivals something to do during that critical first weekend away from home.

This one is just for newly arrived students, but if it is popular it we'll make it a regular thing in the department for everyone to attend.

A Streetcar Named Desire

A few weeks ago we went to see Monty Python live at a local cinema. Tonight we went to see a proper play which was beamed all over the country from the West End.

A Streetcar named Desire is a bit of a break from my usual entertainment fare of superheroes and productions that explore how many ways it is possible to break the laws of physics in a single action sequence. But it was very enjoyable none the less.

The subject is not a happy one and anyone looking for an uplifting ending is going to leave disappointed. But the production and acting, particularly Gillian Anderson in the central role of Blanche DuBois, was top notch.  

I think I get quite a bit of my enjoyment from a play as I struggle to understand the behaviour of the characters after I have seen the whole thing. If it is a good one it is always more complicated than it seems at first glance. This is that kind of play. Well worth a look if you get the chance.

Back To Work and Loving Python

Back to work today. I'm working on a new version of the Tagomatic for next year. I'm designing the boxes using a program that I'm writing inside the FreeCad designer. This is almost certainly not the best way to do it, but I like programming and I love being able to change any aspect of the design by just tweaking some numbers and re-running the code.

I'm working in Python in the seriously constrained environment of the FreeCad macro editor. This has no breakpoints, single stepping or variable viewing, but I'm quite enjoying the experience. Python is definitely growing on me. 

There is a school of thought that things like airbags and crash-absorbent cars have actually made driving more dangerous. Drivers may be more inclined to take risks if they know that their car will save their life if things turn out badly. This leads to an argument that the best safety device for a car would be a sharp metal spike sticking out of the steering wheel. This would make the driver very conscious of the effects of any stupidity on their part....

Writing Python is very like this. I think of it as "building bridges with dynamite". Mistakes can have catastrophic effects. Spelling a variable name incorrectly and gets you all kinds of fireworks. Incorrectly using one of the language constructions opens the door to a world of pain. So you end up being very careful when you code.

You use block copy to copy variable names so you never misspell them (of course, if you use Iron Python you can get Visual Studio onto this one). You compile often. You write tiny behaviours and test them as you go along. And you automate your tests so that you can run them again and again.

If the language and the compiler is not going to save your bacon, you have to do it yourself. The net effect of doing all these good things actually has the side-effect of making you into a much better programmer too, which is nice.

I reckon this makes Python a perfect language to learn if you can already program. It forces you to think very hard about the craft of programming if you want to turn out good code in good time. I think Python is a bit frustrating as a first language because you don't know the rules and some of them are a bit arbitrary, but it is definitely something that every programmer should have a go at.

Heading Home

Today we headed home. Sad face.

We flew from Copenhagen Airport, and were lucky enough to find what I call the "handling space" in the airport quite easily. I think every airport has one of these. It is a quiet area, usually with tables and chairs, where airport staff take hapless passengers to tell them that their flight has been cancelled/luggage has been lost/plane is full etc etc. The one in Copenhagen is called the "transit area" and located just behind all the shops.

We sat there for a while as I fiddled with some pictures and wrote some draft blog posts and stuff. The Surface Pro 3 has proved to be a very capable travelling companion. It just works.  Battery life is great and the screen size is perfect for getting proper work done on the move.

The only thing I don't like is the way that the bright blue keyboard seems to be picking up a bit of dirt, but that is rather like buying a white pair of trousers and then complaining that they get dirty quickly. When I get back I'm going to experiment with cleaning it.

Tivoli in Copenhagen

Today we returned to Copenhagen for another day trip. And we went to Tivoli. This is a mini amusement park right in the middle of the town. It is packed with restaurants and rides of a varying degree of scariness. It also has some lovely gardens. 

This is the scariest ride I have ever seen. You sit in a fake plane on the end of an enormous arm which is whipped around at speed before starting to rotate in a whole bunch of axes at once as you fall from the sky. It looks like it has been designed to simulate every part of a plane crash apart from actually hitting the ground. I felt a bit queasy just watching it. I did manage to go on the Ferris wheel though, which was much more my style. 

Kroner vs Kronor

One of the reasons that we are in Malmo is that is is connected, via a very long bridge, to Denmark. This morning we went from Malmo (Sweden) to Copenhagen(Denmark). The English associate foreign travel with passports and people at border crossings looking suspiciously at you as you move from one nation into another. In this case it was rather different. We just got on a train in Sweden and got out in Denmark. No passports, no nothing.

I'm writing this against the backdrop of the Scottish Independence vote and it is pleasing to find that in some parts of the world it is possible to go abroad without any fuss. In the event that the Scots decide to go it alone (which would be a horrible outcome in my opinion) then at least we have an example of how it should be possible to go there without too much hassle. 

Working with the money is a pain though. One country uses Kroner and the other uses Kronor. They differ in value by about 20% or so and I keep producing the wrong notes to pay for things. I'm trying to think of an easy way of remembering which is which. I tried "Sweden has an e in it, and so does Kroner" but unfortunately Denmark has an e in it too, which doesn't help. The best one I've found so far is that money from Sweden has people on it, whereas notes from Denmark don't. And Danish money has "Denmarken" or some such clue written on it.

We went to the Post and Telecommunications museum in Copenhagen and it was great. They had a really nice cafe right at the top with amazing views. And the whole thing was free. 

Then we went to a design museum and finally made the trek to see the Little Mermaid.

Copenhagen is the capital city of Denmark and so it breaks my "Go for the small city" rule. It is nice enough, but a bit full for my liking. It reminds me a lot of Amsterdam.

Go for the Smaller City...

This place serves really nice chocolate balls

This place serves really nice chocolate balls

If you want to find out what a country is really like don't go to their biggest city. England is a case in point here. I'd really hate it if people thought that we were all as friendly and outgoing as the sort of folk you find on the tube in London...  

Some time back we had a really enjoyable time in Brno, which is not the largest city in the Czech Republic, but turned out to be a super nice place to visit.

When we were planning a trip to Sweden we discovered Malmö, which is the third largest city in the country. So we went there. Although, because of it's proximity to Copenhagen, we also ended up going to Denmark as well. 

Malmö is lovely. We didn't quite know what to expect, although it seemed to have a goodly quotient of museums and parks and stuff from our explorations on the internets. We we didn't spot was the Kings Gardens, which is just fabulous. 

There's even a windmill, and displays that by early September are probably slightly past their best, but still stunning.

I don't know the name of any of the flowers in this picture. And I am not proud of this fact.

I don't know the name of any of the flowers in this picture. And I am not proud of this fact.

Oh, and in travel writer mode: "The roots of the name Malmo is the phrase "pile of sand" and the 2013 Eurovision Song Contest Final was held in the city. The UK did not win this competition, scoring 23 points and coming 19th". 

Travel Writing from Somewhere

We are heading off on our "proper" holiday of the year today. Not that we have had improper ones earlier, it's just that this is the one that involves the use of a passport.

This departure put something of a strain on our aging frames, in that we haven't had much time to recover from the London trip yesterday before heading off to foreign parts, but I've decided that if I'm going to go of anything, it is going to be from having too much fun. 

The destination of our trip was carefully chosen by the use of Expedia and a pin, and there was actually quite a bit of confusion about just which countries we were actually going to visit.

Hopefully the handy map should give you a good idea of where we are headed. 

Just the kind of things you want to find in your room when you arrive. 

Since I've hardly done any, I thought I'd spend the week brushing up on my travel writing skills. So stay tuned for a bunch of reports from your intrepid reporter.