Category Archives: Old Site

Import from blog.cottee.org

Configuring WordPress 3.1.x on Ubuntu Server

I’ve been doing the following

apt-get install wordpress
apt-get install libssh2-php

I don’t use the wordpress that’s installed (I install the latest from source) but it ensures all the necessary libs etc are installed. The libssh2-php is so that new themes, plugins can be installed using ssh rather than ftp.

>Conky Colors Calendar Glitch

>I’ve started using a Conky configuration created by Conky Colors on Ubuntu Natty 11.04. I noticed a glitch (no idea if this exists in other versions) that my calendar display was slightly corrupted. For today’s date there were some extra characters around the digits (putting it out of line with the other weeks in the month).

Simple fix, open up your conky configuration file, find the part in the calendar that reads “cal |sed”and change it to “cal -h |sed”. cal by default hilights today’s date. Putting the -h in stops it doing that.

>PinguyOS

>Been around the distributions recently and currently loving PinguyOS. As an aide memoir to myself, if you want to remove the notifications when pressing the caps lock key (which I do, as I’ve mapped that key to control), rm /bin/lock_keys

Thanks to the helpers on #pinguyos on freenode for the advice.

>RGB LED’s and Arduino

>

Quiet on the Arduino front for the last couple of week not helped by hospital visits. I received a week or so ago some RGB LEDs from the wonderful people at Oomlout, you can see them here. Damn cheap (three for two quid), easy to setup and pretty to look at. I was playing with a colour sensor a few weeks back so my next task is to get these lighting up based on the sensor readings.

A lot of my recent time has been spent on reading up on the PIC microprocessors. Played a little more with the Amicus 18 but I’ve ordered a PIC development board which should be arriving shortly and will see what I can do with that.

>PIE

>

We have three children, ages 12, 7 and 4. None of them have ever eaten a savoury pie. Today was the day we ended that.

That is a Marks and Spencers’ roast chicken pie. Selina didn’t like it, Hugo and Alisa said they did but didn’t eat much of it.

We won’t be having another in a hurry.

>Arduino, Servos and SCADA

>

This weekend I was going to play around with servos and motors, but due to a missing diode I only got the servo working, displayed below. Yes, that’s a matchstick attached to it with Blu-Tac.

The processing language is actually very nice to play with. If I squint and pretend it’s Javascript then I can write in it without missing python too much.

The whole purpose of playing around with electronics is deep down I’d like to know a bit more about the factory floor hardware side of things. I’ve written a lot of software for factories but hardware tends to be black box stuff. When I couldn’t find the diode I needed I instead thought I’d see if I could get somewhere with an Arduino and SCADA. Turns out you can. You need some modbus client code from here and the Mango M2M system from here.

What was supposed to be hardware time ended up playing around a lot with Java, Tomcat and understanding what modbus is and does. But at the end of the evening (I packed it in early, I was whacked) I saw this on the Mango interface …

That ‘1’, in the Nodes found list, is the sweet smell of success. Next step would be to fit some sensors on the Arduino and get Mango to monitor them.

>Scrolling LED

>

Hardest thing I’ve wired up so far. Not ‘hard’, just tedious. But it works!! Weeeeeeee.

Buy yours here.

>Amicus18 / Netduino / Arduino

>

OK, whilst I am here, there’s another addition. The Amicus18 could be considered an Arduino with a PIC processor. Once again, the Amicus18 homepage at http://www.myamicus.co.uk/ gives the summary:

Amicus is a multifunction development system inspired by the popular Arduino board, however, the Amicus board uses a Microchip PIC®microcontroller instead of an Atmel AVRtm type

For the moment I am going to focus on the Arduino, learn some .NET and do some Netduino and then play with the Amicus18 in any spare time. Would like to do some assembler with that one. So here’s the current family.

Just one more to join – coming soon.

By the way, the breadboards on the Amicus and Arduino come from Oomlout. They make me happy (the company and the board). Also recommended are Cool Components, where the Netduino came from and Proto-Pic who supplied the Amicus18.  Great service from all three of them.

One more I want to pick up …

>Arduino/Netduino

>

My last posting detailed getting my Arduino displaying a temperature sensor on a LCD. That worked fine. Soon after that I took delivery of a Netduino. A Netduino is … well … to quote from http://www.netduino.com/:

Netduino is an open source electronics platform using the .NET Micro Framework. Featuring a 32-bit microcontroller and a rich development environment. Suitable for engineers and hobbyists alike.

It’s basically an Arduino that you program via the .NET language. I’ve not used Microsoft languages for yonks, so why buy one of these things? Well, I’ve not used Microsoft languages for yonks. Might be fun to play with them again. Maybe Smile.

So my plan was to take what I’d done before, but this time, put the temperature sensor on the Netduino and transmit the data to the Arduino (using the RF link transmitter and receiver shown at http://is.gd/f4n3Q), and the Arduino LCD would display it. I spent quite a few hours working on it last Friday evening. A lot of pain was caused by learning some basics of .NET and C# (many thanks yellowduino on the #arduino irc channel). I fiddled with it relentlessly Friday evening and bits of Saturday and Sunday. I stopped trying to transmit the temperature and instead just worried about transmitting a set string.  But I just could not communicate from the Netduino to the Arduino.

Not quite true. I could see things ‘changed’ when I switched the Netduino on – the data on the arduino might show signs of seeing something. But what i was actually transmitting from the Netduino was never displayed on the Arduino LCD. I switched anything that could possibly interfere off but nothing. Eventually, Sunday evening, I gave in. I really didn’t mind that much, I learnt a lot and that, rather than the accomplishment, was important. But still …

This Friday evening I switched it all back on again and it worked first time. First time.

>Easy peasy Arduino

>

I’ve dealt with software for a long time, over twenty years. Software is quite simple really when you know the basics but to people totally outside of it, it no doubt looks like magic. I’ve always wanted to learn more about hardware. I remember buying an electronics book whilst in Japan but did nothing with it. A short while ago I picked up a starter Arduino kit.

Arduino is (to quote the site) an

open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It’s intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.

The kit linked to above from oomlout.co.uk contains everything you need although having done the first couple of exercises I let it drop due to pressure of work. I picked it up again recently and made my first real project. It’s actually nothing. It’s an Arduino linked to a LCD (buy that separately from Oomlout) and a temperature sensor. It displays the temperature.

Putting it together was simple using the Oomlout guides for each piece. What was more important for me was understanding how a circuit gets wired up and how to use different components together. In terms of complexity this is very very simple but seeing something in front of me working that I put together has really given me a kick. Hey, little things make me happy!

More importantly it’s made me realise not to think things are complex just because I don’t understand them. That mass of wires looks difficult but they’re all pretty understandable very quickly.