.NET console app on Mono on Raspberry Pi writing to MySQL (compiled on a Mac)

Update: if you’re just looking to build a simple LAMP server on a Pi, then there is an updated version of this guide which installs more up to date versions of e.g., PHP, here.

For reasons I won’t go into, I have an unnecessarily complicated set of requirements:

  • Dev environment is Windows 10 + Visual Studio 2015 running as a virtual machine inside VMWare Fusion on Max OSX 10.11.6
  • Target application is .NET 4.5.2 running on a Raspberry Pi 3 under Mono
  • App must write data to MySQL db

This is my first time working with Mono. It’s actually relatively straight-forward to setup, but there were one or two hoops I jumped through, so I figure this may be helpful. You could choose to use VSCode on your Mac if you didn’t want to go down the Windows dev VM route.

TL;DR

The main issue I encountered is the latest MySQL Connector for .NET that you get using NuGET doesn’t seem to work in Mono. The trick was to install an early version (6.4.6 to be exact) and once I did this, all seemed to work OK. Have not got much further yet, so not yet sure what other issues I will encounter.

This assumes you have a completely fresh copy of Raspbian latest. If you haven’t, follow a guide here. I used Etcher for the first time and was very impressed as it worked perfectly.

I am using the -Lite (no UI) version so may have had to do extra stuff that the full fat version didn’t require. I also configured Apache/PHP etc. so I could have phpmyadmin running.

Read more

Camping Bel, Tranche sur la Mer, France

This review is written from the perspective of being a first holiday park holiday and similarly the first at a Eurocamp. Our party was two adults and two young children (3 and 1).

The booking experience with Eurocamp was good - they’ve invested a lot in their website which makes it super easy to book. There was a slight snafu with some extras which needed to be resolved directly with them, but all in all was a hassle-free experience. Eurocamp were great at sending all the required documents well in advance and in terms of everything been set for what we’d booked, it was all done properly. So full marks there.

Read more

Proxxon AH 80 - Surface Planer / Jointer - English review

Proxxon AH-80/>

Have been looking for a small surface planer and edge jointer for some time and although there a few things out there, some of the cheaper models (e.g,. Silverline) I was a bit suspicious of. If you’re trying to make things flat and square, then you really need the machine itself to be of a suitable quality in order to do that otherwise you’re probably better off not bothering. Many of the cheaper models looked a bit plastic-y and flimsy, until I stumbled across this one.

Read more

Debugging a Bosch compound mitre saw... part 2!

I previously wrote about trying to figure out why the Led/Laser switch on my Bosch PCM-8S didn’t work. I determined the switch was faulty.

After a bit of a hunt, I found the part here: http://www.powertoolspares.com/tool/bosch/spares-and-accessories-for-slide-mitre-saw-pcm-8-s/3603l02070/spares/ - looks like a good resource. £6 for the switch seemed reasonable - but £10 for postage, didn’t. It’s not uncommon to encounter this sort of thing living in the Channel Islands, it nevertheless it’s irritating.

So before coughing up the £16 for the new part, I figured I’d see if there was anything to be done to rescue the existing switch. I previously thought it was a sealed unit, but after a bit of prying with a mini flathead screwdriver - turns out it’s not. And, much like everything else on this saw, it was all gunked up with crap. And after cleaning it up, and reassembling, hey presto, the switch is working again. Result.

Read more

Debugging a... Bosch compound mitre saw

A year or so ago I picked up a secondhand Bosch PCM-8S compound mitre saw for my workshop. Handy little saw, handles most things I need to do. One thing I accepted at the time was the built in Led lights and laser didn’t work. Didn’t think much of it given that most of it was chock full of sawdust.

Today though, curiosity got the better of me and I decided to find out if it was fixable. I’m not going to list in detail everything I did, but needless to say I started in the wrong place and ultimately found the issue in the last place I looked (and last place I expected):

Read more

.NET application output app.config settings at runtime nicely formatted

I’m a big fan of .NET console applications. They’re a really quick way of getting something functional up and running fast without wasting loads of effort on user interfaces. (Hey, I’m a developer, OK… not a designer. Function over form and all that.)

I also make heavy use of the built-in app.config / settings functionality so that I can control functionality at runtime. One thing I wanted to do recently was to output the configured settings to the console window so that I could eyeball all was well before going ahead.

Read more

SharePoint 2010 Programmatically Create List from Custom List Template in C#

Yep - tech 2010! Continuing my tour of strange facets of old SharePoint technology, here’s something new I tried to do today that took a lot more effort than it should.

The objective was simple: create a new list, based on an existing list.

This is reasonably easy to do using List Templates… when you know how of course.

So the steps are:

  1. Save a copy of your current list as a template
  2. Create a new list based on that template.

The main issue is the way SP stores the custom list template when you’ve created it.

Read more

Subaru Forester window motor replacement

A quick video showing that it’s possible to replace an electric window motor on a Subaru Forester (in my case a 2003 Subaru Forester XT SG Turbo ABC Etc. without totally taking the whole car apart. Who knew?!

(Well no-one, apparently, hence why I made the video. Duh.)

Full schematic of the window mechanism available here.

Read more

Sample Python code to query Wunderlist API

Update: Wunderlist is no more - it got acquired by Microsoft :( The domain is also broken but I’ll leave the code here for funzies.

So I’ve been working on a simple application at home, part of which I want a list of items, which I want to be able to control from Wunderlist. As a relative novice to Python, I was looking around for some pre-built library that I could just plug in to my existing code. A few things do exist - there’s some sample code at Github and there’s even a basic API wrapper called wunderpy2.

Read more

Surf Snowdonia - 10 things about a trip there

You’re unlikely to be reading this is if you haven’t heard of Surf Snowdonia. But if you haven’t - it’s the world’s first commercial inland wave adventure parc. Or in other words, it’s a surfable wave in a lagoon nowhere near the sea. The park opened in 2015 to much fanfare but closed again after less than a season due to mechanical issues. But over the winter it’s had some investment (£1m if you believe what you read) and it’s open again.

To surf there, you have four options… IE where in the lagoon you can surf. Beginner, improver, intermediate or advanced. The website has a description of what you can expect from each and the sort of skills you should have. It’s advisable to book ahead. Not really knowing what to expect, I booked an hour on the intermediate wave which included board rental.

The wave itself is relatively simple in concept - it’s an oval shaped lagoon with a structure in the middle. Every 90 seconds an arm dredges from one end to the other creating a wave in its wake… Well, in front of it. Not in its wake. That’d be behind.

Anyway. Each of the four sections should give something to all abilities. There is plenty of white water for beginners to play in with the advanced take off points should give experienced surfers something challenging. I’ve been surfing 20 odd years - on and off - I’ve surfed some great waves around the world but I am by no means an expert. My quiver consists mostly of longer boards 6'7″ upwards but most importantly, whilst my surf fitness is quite high, I’ve not actually surfed in a while (young family has rather got in the way!) so felt that an hour on the intermediate wave would be a good starting point.

So here are my 10 key thoughts and observations about Surf Snowdonia

Read more