VS 2015 Intallation Tip

I spent a big chunk of today trying to get Visual Studio 2015 Community Edition onto my machine. It put up a bit of a fight, I kept getting an error saying I needed up upgrade my installation when I'd built a project. I've no idea what the problem was.

But I do know how to fix it.

I installed Visual Studio from the ISO image that I downloaded from here. For previous, failed, installations I'd used the web installer. I'm wondering if there were some network shenanigans causing problems during the install.

The wonderful news is that I took my entire Snaps framework (a bunch of programming aids you are going to hear a *lot" about soon) and ported it from Windows 8.1 universal app to Windows 10 in about six minutes. All I had to do was copy the source files into an empty Windows 10 project and it built first time. This is completely awesome.

iBox Printer has Arrived

Last year I backed the iBox printer project on Kickstarter. It is a tiny 3D printer that uses UV light to solidify resin. It's a more precise way of printing than my Ultimaker, which is why I fancied having a go with it. Normally light powered printers like this are powered by video projectors and have highly expensive optics in them.

The iBox printer uses a bunch of ultra-violet leds and a small high resolution LCD panel to control which bits get printed. It can only print small objects (around the size of a chess piece) but since the resin is kind of expensive I don't really fancy printing anything large. And anyway, I've got Una to print the large stuff.

The iBox prints "upside down" in that the build plate (which is not shown in the picture) is dipped in and out of the resin, with a new layer being deposited underneath the previous one. Each layer needs around 20 seconds to harden, but the great thing is that every layer takes the same time to print, which is better than the Ultimaker, where larger things take the print head ages to fill in.

The device is well put together. It uses a Raspberry Pi to control it and tiny stepper motor to drive the printing plate up and down. The Pi has a WiFi interface and you control the printer via an in-built web server where you can upload objects for printing and start print jobs.  

I've not got around to firing it up just yet, but I'm looking forward to having a go.

Reading Raspberry Pi inputs using C# in Windows 10

The LogoBlaster and its buttons

The LogoBlaster and its buttons

I had a lot of fun making my Windows 10 LogoBlaster. At the heart of the program is code that responds to the buttons that are pressed to select the required command. These are wired to inputs on the Raspberry Pi. It turns out that some of the inputs have pull up or pull down resistors, which helps keep the wiring simple.

I used the pins that have Pull Down resistors on them. These resistors do what the name implies. They pull the voltage on the input pin down to the ground level. The diagram above shows how this works. The Pull Down resistor connects the input port to the ground level, which means that if the switch is open the signal at the port is 0. But when the switch is closed it pulls the input port up to the power supply voltage, causing the signal at the input port to rise to 1.

If you don't have the pull down resistor (i.e. you let the input port pin wave about in the air with nothing connected to it until the button is pressed) you run the risk of induced voltages leading to spurious input signals. Sometimes you have to actually add your own resistors to the circuit, but in the case of the Raspberry Pi they are built into the hardware so all I had to do was connect the input port in to the switch. There is a table here which tells which pins have pull ups and which have pull downs.

        const int B1Pin = 12;  // wired to pin 32
        const int B2Pin = 13;  // wired to pin 33
        const int B3Pin = 16;  // wired to pin 36
        const int B4Pin = 26;  // wired to pin 37

These are GPIO pin numbers I used for each of my buttons.  Note that the GPIO numbers used by the software don't correspond to the pin numbers on the header on the Raspberry Pi, but I've put these in as comments.

var gpio = GpioController.GetDefault();
GpioPin nextColorPin = gpio.OpenPin(B1Pin);
nextColorPin.DebounceTimeout = new TimeSpan(0, 0, 0, 0, 20);
nextColorPin.ValueChanged += nextColorPin_ValueChanged;

...

private void nextColorPin_ValueChanged(GpioPin sender,
                    GpioPinValueChangedEventArgs args)
{
    if (nextColorPin.Read() == GpioPinValue.High)
    {
        command = DisplayCommands.NextColour;
    }
}

This is the code that sets up and uses the pin. Note that I set a debounce timeout of 20 milliseconds. This is there because the switches that I used were a electrically noisy and sent quite a few extra ones and offs when they were pressed.

The handler for the pin works very like a normal XAML button, in that it generates events when the input pin changes state. The  code in the event handler checks to see if the pin has changed to the high state (which means that the button has been pressed) and if it has it sets a command value to change the display colour. The code is repeated for the other buttons which select the different commands

Irrelevant Picture

We've been away for a couple of days and today we drove back. The picture above has nothing to do with any of this. But I do rather like it.

I took the shot last week in London. When she gave me the key the girl at the check-in said "I've given you one of our nice rooms, with a great view". At the time I wondered if this was the best possible pitch she could have used as it might call into question other rooms in the place, but she wasn't wrong about the view. It will be even more interesting when they finish building whatever it is they're building.

Clifton and Balloons

Today we spent some time wandering around Clifton, which is a lovely place to be. I've always had fond memories of the place, what with it being where we had our wedding reception a remarkably long time ago.  This is the view of the Clifton Suspension Bridge from the Clifton Hotel terrace, which always brings back memories.

Just around the corner is Royal York Crescent, where number one wife used to live. Great place.

It just so happened that today was the start of the Bristol Balloon festival. We've tried to go and take a look before, but this time we satisfied ourselves with some long distance views over the city.

Mission Impossible: You get what you pay for

I really enjoyed the latest Mission Impossible film. It has all the things that you want from the folks at the IMF. Diabolical baddies, shiny gadgets, mysterious femme fatale agents, Tom Cruise jumping on and off things etc etc. There are some lovely set pieces which are just crackers, but you don't mind because things are rattling along at such a pace.

The cast is all well up to the job and everyone turns in a good performance. Even Alec Baldwin, who does a fantastic job of appearing just like Alec Baldwin. If you like this kind of film, then go see.

A Big Hello to Windows 10

I've been running the preview releases of Windows 10 on one of my computers and I've been quite impressed. And now I've got Windows 10 on my "proper" machine, my Surface Pro 3. It's very impressive. Boots fast and the user interface improvements make a huge difference. My advice for would-be migrators.

  • Do it. I don't think you'll regret it. And if you do, it is very easy to revert back to your previous system. I've actually done the revert after I did something stupid during an upgrade and it took me right back to my original system in around five minutes.
  • Give the machine time to settle down after Windows 10 has installed. Once the Windows 10 upgrade has worked its magic you get a whole slew of processes wanting to come in and tidy up. The Search Indexer, the Antimalware process and OneDrive will all want to do considerable amounts of twiddling on your new system. This can ruin user interface performance for a while as the hard disk gets hammered. But give it an hour or on its own so with a decent network connection and you'll see performance go back to previous levels.
  • The Edge browser is awesome. Very, very snappy. In fact unfeasibly fast. And it seems to be compatible with lots of websites sites too. It works a lot better that Internet Explorer with the page editor for my Squarespace website, which is nice. Try it even if your weapon of choice is Chrome or Firefox.
  • If your machine hasn't got much disk space you can recover quite a lot by using System Cleanup to get rid of your old Windows installations (see above). Of course, if you clear away this backup there is no way to return to the previous version but on very constrained machine you probably won't have a choice about doing this. I've upgraded my ultra-cheap Linx machine (very successfully) and got back three or so precious GBytes by doing this.

It will be very interesting to see where Windows 10 ends up. And I reckon that you really should go along for the ride.

Quick on the Drawer

I made nine drawers tonight. By the end I had a little production line where I worked on the same part of each drawer before moving on to the next one.

I've got one of the drawers slightly wrong, in that the drawer bottom (the thing you can see being slid into the drawer in the diagram) is the wrong way up. But at the moment I don't care that much. Because I've finished making drawers.

Coping with a Skewed Universe

20150810_063031337_iOS.jpg

Today I was fitting handles to doors. As you can see. Note that the handles line up exactly. Turns out that there are two ways you can make the door handles of your wardrobes line up.

  1. Fit the handles in the centre of the door and then make the doors line up. (difficult to impossible outside of laboratory conditions)
  2. Fit the doors and then put the handles in the place where they line up. (easy if you stick some tape across the gap and then use this to line the holes up).

I much prefer the second method. Experience has taught me that when you put big things into houses the concepts of "level" and "right angle" kind of go out of the window. This frequently means that you can't get furniture to line up with the floor and ceiling because they are already wrong at the start.

So you have to go for the solution that looks right. If you look very closely at the very top of our wardrobes you'll notice that the doors are very slightly out of alignment. But the handles are perfect, and those are the bits you focus on.

Windows 10 Celebration fun and frolics

Well, that was nice. Turns out that Microsoft can build operating systems and also organise great parties. We got there a couple of hours before the doors opened and got everything working just in time for the start. I was responsible for the "Lift Off" game and the LogoBlaster. The Lift Off game has one or two gameplay issues, but I was surprised (and pleased) to find that some folks worked out how the game worked and then got very competitive.....

The LogoBlaster worked incredibly well. This is my pairing of a Raspberry Pi running Windows 10 and a portable video projector. We ere using it to project Windows 10 logos on passers by. 

It was interesting to notice that some folks didn't really get what it was doing until I showed them where the pictures were coming from. We managed to get the Raspberry Pi to load the LogoBlaster program on boot up, so that the unit became completely wire free. I was able to happily wander round adding logos to passing people.

Demonstrating the power of Logo Blaster

Demonstrating the power of Logo Blaster

Adding cheese to the surroundings

Adding cheese to the surroundings

Shameless self promotion - and a hexapod robot

Shameless self promotion - and a hexapod robot

The best moment came when we pointed the LogoBlaster  at someone's head by mistake. And the results were awesome. He (I'm awfully sorry sir - I've forgotten your name) was even happy to pose for a while as we took some more pictures.

This came out really well. I've put a whole bunch more pictures on Flickr. You can find them here.

The event ran for four hours. By the end we were all thoroughly hoarse from talking to folks about what we had done. But it was wonderful. We packed up in double quick time and staggered back to the hotel. Thanks to Paul for inviting me and letting me be part of this event. Great fun. 

Put "Windows 10 on Everything" with my LogoBlaster

I've just arrived at the hotel where we're staying for the Windows 10 celebration event. I've unpacked a few gadgets...

I'm helping out on the Internet of Things front, and on Sunday night I had a great idea for a device I could demonstrate.  Which I've built. In 36 hours. Go me.

I call it the "Windows 10 Logo Blaster". It really can put "Windows 10 on everything". It's a Raspberry Pi coupled to my lovely little projector. It runs a Windows 10 application that lets you select logos and images to "blast" onto the surroundings.

These are the 3D printed components. A tray for the Raspberry Pi, a cover that supports the projector and a handle which contains the trigger buttons. I've learned a bit over the years, and I now make designs that are easy to construct. As opposed to ones which can contain the components, but you can't actually get them inside.....

You can see how it all fits together here. Its showing the Windows 10 boot screen on the wall. When the program is running it shows different logos that you can switch between by pressing the buttons on the handle.

It works a treat. Battery life isn't great, but it does work. And I really can put Windows 10 (or at least one of its logos, onto everything. Tonight we've been told to wear white shirts as part of the event dress code, which should make the images show up a treat........

I'll put the designs and the software up on Github when I get back to Hull. I'm amazed that we now have tools and software that will let me go from idea to product in such a short time.

I'm really looking forward to the event tonight. I just hope everything works.......

Press Reviews and Colds

I don't mind having a cold. It's the getting of it I don't like. For me there is a stage where your body knows that something is wrong and is trying to work out what is going on. Then the throat and the nose kick in to make it clear what is happening. But for me this is a good thing, it means that I can begin the process of getting better. 

Yesterday I was in stage one. Today I'm in stage 2. Of course, life being that it is, today was also when I had to go into town first thing to do a paper review thingy with Radio Humberside. It was great fun, and this time the picture that I took with the fat lens actually came out. 

Rob at the Windows 10 Celebration Event in London

Paul has invited me down to the Windows 10 celebration event in London on the 29th next week. I'm really flattered to be asked. I'll be helping with some embedded stuff, running Windows 10 on Raspberry Pi devices.

I'm a Microsoft MVP, so you'd expect me to like Windows 10. But I really do. I've had it on my of my older Surface devices for a while and I've watched it "grow up" over the successive releases.

To be honest, I've always found Windows 8.1 to be pretty good, but Windows 10 is even better. It boots really fast, works with all my Windows applications and has some nice extra features. And the new browser really points towards the future.

The event is at Old BillingsGate Market on Wednesday evening.  Looking forward to it.  If you are coming along, seek me out. I'll be in the iot part of the event.

Projecting Myself

I don't have many vices really. I don't drink, smoke or gamble.. Number one wife says that I should start doing all these at once because it would be cheaper than what I do indulge in. And that is gadgets. 

I got another one today. Something I've always fancied owning but not got round to. It's a tiny portable projector from Maplin. The picture above doesn't really give you a sense of scale, but it is around the size of a couple of packets of cigarettes.  Really tiny.

And it works a treat. 

My reason for purchase is that I wanted to attach it to a Raspberry Pi. It works really well. In fact it is even better than you might think (if you think about these things). The projector contains a battery which lets it run for around 2 hours or so. But the battery can also be used to recharge connected devices. So you can power the Raspberry Pi from the projector. Most interesting.

The resolution is fine and the picture is bright enough to see even in a lit room.

I'm not saying you need one of these. But if you fancy one, it is a good one to get. 

Writing a Book

Back at work today. The thing that is keeping me busy over the summer is book writing. I've signed up to write a new book to teach programming. The content is loosely based on the World Famous C# Yellow book, but with a heavily practical approach. The aim is to teach people how to write programs that they could use to impress their friend. And their mum. 

The book is going to be in colour, with pictures and everything. I'll post some sample pages as soon as I can.