Educating the world

Our blog has over 10,000 readers a month

Setting up a Raspberry Pi to run a Finch Robot

August 14th, 2013

Half the battle is getting the Raspberry Pi up and running with Java installed. Once you’ve done that, the rest is pretty simple.

  1. Firstly Install Rasbian wheezy on your Raspberry Pi.
  2. Then install Java 8.
  3. Create somewhere nice for us to work.

    mkdir /home/mrn/dev/finch
    cd /home/mrn/dev/finch

  4. For the latest version of the Finch development kit go to Search for BBTechSoftwareForPi and download it.


  5. They’ve done that thing where you don’t get a containing folder inside the zip, so we’ll have to make it.

    mkdir BBTechSoftwareForPi-9303915
    cd BBTechSoftwareForPi-9303915
    unzip ../

  6. Zips don’t hold unix permissions so we’ll have to add execute permissions to anything we want to run.

    chmod +x Configure

  7. We need to run this as root because it copies libraries into protected places.

    sudo ./Configure

  8. That’s kind of it. Make sure the Finch robot is connected.
  9. Enter the Java folder

    cd FinchJava

  10. Compile the sample program

    javac -classpath :finch.jar Code/simpleInput/

  11. And run it

    java -classpath :finch.jar Code/simpleInput/LEDSetter

Nepal Day 6 - Drive to Chitwan

August 12th, 2013

Up at 6.20am for breakfast and we were all packed and on the coach bound for Chitwan by 8am. As the crow flys Chitwan is about 100km from Kathmandu but the road is very narrow and cuts through the treacherous mountains. The drive was amazing. I passed more burnt-out wrecked cars that had fallen over the edge that I’d care to mention. The majority of the road was B-road standard (one carriage way in each direction, narrow in places).

At 11.30am we stop for lunch. This was our first meal outside the tourist-safe areas of Kathmandu. We were in the frontier now so Steve gave us a list of foods to avoid which turned into a short list of things we could eat. Basically anything pre-bottled like Coke and anything deep fried like chips, so chips and Coke it was!

After lunch we drove for about 10 minutes and stopped at a rope bridge style crossing. It was made of metal and was about 2 people wide spanning the 150 meter turquoise river. Took a few photos and got back on the bus for the quiz.

Steve is a legendary quiz master. Questions were clearly taken from a crumby “make your own quiz” book with the questions he thought were too hard replaced by James Bond questions. Quite a few of the questions were ambiguous like “Which is the biggest tea producing country? A) Sir Lanka B) India C) China". Well they are all tea producing countries so the question became which is the biggest country to which the answer is obviously China. Nik pointed this out and argued the toss, but Steve knocked a few points off him for cheekiness and said “Do you think you can do better?". Nik said “Yes” without even hesitating (see later).

I was writing this journal on my phone but due to an unfortunate USB disaster I had to switch to a pen and paper. The USB charger plug socket on the phone broke. So when the battery ran out of juice I couldn’t charge it up. Looking back, while this was a bit of a pain, being phoneless in another country, it did force me to not do any work. I had to enjoy my holiday instead of picking up emails and checking things, not easy when you run your own company. Pens and paper didn’t go very well with the extremely bumpy road but after a while I kind of got used to it.

We had left the Professor behind and along the way we picked up Losan who was to be our guide for the rest of the trip. He was a bonafide Buddhist monk with the maroon outfit and everything. Although he did wear Nike trainers and shorts underneath!

We arrived in Chitwan and checked in. The accommodation was a bit like a colonial hunting lodge. We had a quick de-camp then it was a jeep ride to the Chitwan National Park and the Elephant Breeding Centre. This is the only reserve that boasts twin junior elephants and a calve less than a few months old; he was still having trouble balancing.

It had been a really long day so after the reserve we went and sat by the river with a Gin & Tonic,.. and then a couple of beers. There was traditional dancing back at the hotel but I ended up talking quite late with Julian who had done a computer science and image processing degree. So we indulged our techie’ness and chatted away most of the evening. Got back for the final dance which was one of those “get the tourists involve” type-things. Lot’s of fun especially as my balance was a bit off!

Jonathan (my room mate for the trip) and I were paranoid about mosquitoes. Luckily we were both practical people and so instigated measures to protect ourselves. Before going to bed we’d make sure all the windows had mosquito nets that weren’t damaged. If they were we closed the window. We then did a thorough search of the bedroom and bathrooms and executed anything that had more legs than us. No one was going to sleep until we were happy we weren’t going to get eaten during the night. We had done this each night but I’m mentioning it here because we were now in the malarial zone and it some how seemed like we were doing it “for real".

Photos on my Facebook page.

Nepal Day 5 - Bhaktapur, House viewing, Brick making

July 26th, 2013

We were a bit late getting up and breakfast took an age to arrive but we eventually got out and met the rest of the group. Steve had a special day planned today.

We met with 4 local young adults. 1 boy aged 16 and 3 girls aged 20. Our whole group was split into 2 and we had Koral (the boy) and one of the young women to show us around. We walked through a maze of leaning back streets and tunnels for about 20 minutes until we arrived at Koral’s house. He showed us the well in his courtyard and then took us into his house. It was very humbling. His bedroom was not dissimilar to what you would expect for a 16 year old but more rustic. There was a bed with a TV opposite and 2 windows without glass. Although he lived with his aunt, parents and grandparents, he had his own cooking facilities which amounted to a gas canister and a 2 ringed stove.

His grandfather lived above him and cooked on a traditional fire because he couldn’t work the cooker. We shared a little joke about old people not being able to get in with the new technology!

Stopped for a drink to wait for the other group. I bought Koral and I a Lassi and he explained what the symbols on his currency were. When we’d regrouped and had a rest we all walked out of the city through the farmlands to the place where they make bricks.

The 2 brick makers were actually the parents of one of the young girls who was showing us around. They make 250rs/day and are expected to make 1000 bricks. During my up bringing I was taught how to make things from clay (and throw pots etc) so I had been watching them with interest while Steve was giving us the low down.

Steve asked for 5 volunteers so I and 4 others stepped forward. We were shown how to make a brick by the mother. During the day I had built up a rapport with the young lad, he was very interested in computers, so in order for there not to be any favouritism all 4 of the young adults were asked not to watch us make the bricks so that their judging would be fair. I went first and I effectively made my brick in about 30 seconds. It popped out and I was extremely pleased with it. The 4 bricks that followed were terrible and ranged from a slightly collapsed brick to what could only be described as a splat of clay. The kids were called in to judge, their deliberations took less than a second as they all pointed to my brick. Steve announced that I was brick champ and all the kids cheered and whooped. The person they had wanted to win, had won! My prize was a Nepal tourists t-shirt with Brick Champ 2070 embroidered on the front.

Nepal works on the lunisolar Hindu calendar so the current year in 2070 (at least it was on April 16th 2013).

After being named Brick Champion the mother brick maker told Steve that my brick was good enough to join her bricks and would be sent out with the rest to form a new building. I am the first Angel Holidays person to have a brick accepted. Props to me!

We header back through the farmlands towards the town. The kids showed us that we could eat some of the wild peas so we munched as we walked.

When we got back to the town we had a whip-round for the kids. The girls were at college and could use the extra money. We had a chat with Koral earlier in the day where we asked him what he wanted to be when he grew up. “A Dealer", he replied which made us all laugh. We explained that if someone said they were a dealer in the UK it meant they were a drug dealer. The translation for what he actually wanted to say was “Salesman"!

Got back to town and Pabi showed us a good place to buy silver jewellery. I bought 3 sets of locally crafted silver ear rings at a very reasonable price; about a third of the price of what it would have been in England. Strangely the item’s price seemed totally dependant on the weight of the item and not how much time the craftsman had spent making it! The opposite of what it would have been in the UK!

The final souvenir was a Thanka from a traditional shop filled with master craft’s men who painted them on site. Steve knew a good one which he took me too called Master Pieces Thanks Treasure. After looking around I settled on a Kalachakra Mandala because I liked the concentric squares and circles and I thought the orange colour would look good in my new terracotta bedroom.

Did a bit of shopping for my trip to Chitwan showered and met 2 others for dinner. We ate in the same place as last night but this time I had Neapli Bati (non-vegetarian) which was lovely! Got back to the hotel for 9.30pm and had a night cap before hitting the sack.

Photos on my FaceBook page.

Nepal Day 4 - Everest, Pashupatinath, Boudhanath, Bhaktapur

July 25th, 2013

Got up at 4.20am and showered. Left at 5am to the domestic airport. We got on a 30 seater plane but we only occupied the window seats. The flight took us all the way along the Himalayas to Everest then turned around to let the people on the other side of the plane have a look. The air stewardess came and pointed out the mountains in the range - yes there is more than just Everest in the region. I don’t know much about mountain climbing but they were all really famous! I wished the plane could have got a bit closer to the mountains but the (female) pilot let us go up to the front and take pictures from there so that made up for it. It was still pretty amazing though. Got a certificate to say we had flown around Everest and then headed back to the hotel for breakfast.

Left at 10.30am for the regeneration ground at Pashupatinath Temple. We watched several bodies being cremated. Each body takes about 2.5 hours to burn through and when it is finished the ashes are brushed into the river. About 55 bodies are burnt per day.

Had my photo taken by a religious tramp (Sadhu) dressed in orange and dusted in white powder. You are supposed to pay for the privilege. I thought 5rs would be enough but when he saw my 5rs he started whispering 100. Felt like they were out to fleece tourists. He put his 5 feet dreads over me which was a bit gross but I think I was just getting the full treatment!

The burning bodies just smelt of the wood palets they were resting on which also hid the smell of the river! Adults were using the river to clean the cremation sites and the kids where splashing and playing in the water too.

Back in the coach and off to Boudhanath, one of the holiest Buddhist sites. This town boasts the biggest Stupa in Nepal. Went to watch how the Circle of Life paintings are made. Watched a master craftsman who had been studying the art for over 20 years add the finishing touches with 24ct gold paint. The gold is supposed to remove bad spirits and give a calming effect to the viewer.

Had lunch in a Soho style restaurant off the tourists trail, dead cheap, no windows, squat down toilets and full of monks! Only 800rs for 3 meals with rice and cokes. Wandered around the square and looked at the Stupa. It was enormous and we were able to climb on top of it. While on top I was stopped by a couple with a camera. I gestured that I would take a photo of them but the man insisted that he took a photo of me and his wife. A bit weird but they seemed to think this was normal. I think they just liked my novelty tallness and my odd socks!

Drove to Bhaktapur, where Little Buddha was filmed. We were issued with our city passes. Tourists are not allowed to wander in the city at night and in certain parts during the day. The bus drove as far as it could but eventually dropped us off at the bottom of the hill. We walked up through the old town and Steve explained to us that the German’s had rebuild the sewer system which is why there were so many western style manhole covers.

Our guide showed us around the town and we split off to go to our hotel. Due to sizes of accommodation constraints I and 3 others stayed in a hotel with the same name as the hotel we stayed in Kathmandu, Vajra. And the rest stayed in a hotel across the square. After check-in we had a wander around the town to buy water and supplies and got a bit lost. It was beer o’clock when we got back so a quick shower and out for a pre-dinner G&T. Found a really nice roof top restaurant and sat with some friends. Halfway through I noticed lightening in the background and the thunder started to get closer. 5 minutes later it was chucking it down. We hid under the umbrella with a group of women from Holland but by that time it was time to go to the restaurant.

There seems to be no urgency in Nepal so after ordering dinner we still had to wait almost 3 pints of beer for the food to turn up, but this seems to be normal. I had sizzling pepper steak with chips and veg which was delicious. After dinner everyone from the other hotel left and we hung around chatting.

The whole town closes down about 9pm so there isn’t anything to do or anywhere to go so we stay in our room and chatted over a final beer before bed. I was bunked with Jon. His claim to fame was that the Call Of Duty team re-tweeted his tweet about advancements in the ACOG sights. Which is not a bad claim to fame!

Photos on my Facebook page.

Yum installing from EPEL repository on CentOS

July 24th, 2013

EPEL stands for Extra Packages for Enterprise Linux. It contains open source projects compiled up for many versions of the Red Hat distribution, like CentOS.

Follow these instructions to allow yum install to select packages from the EPEL repository.

First we need to find out a few things about our system:

[root@mrn ~]# cat /etc/issue
CentOS release 6.3 (Final)
Kernel \r on an \m

[root@mrn ~]# uname -a
Linux mrn 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

We now know that we are using major version number 6 on x86_64.

It’s very likely that we will need to update our security keys in order to install the latest EPEL repository RPM, so let’s do that first.

Navigate to and get the RPM-GPG-KEY-EPEL file for your major version number, in my case RPM-GPG-KEY-EPEL-6.


Move it into position:

mv RPM-GPG-KEY-EPEL-6 /etc/pki/rpm-gpg/

And import:

rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

Keys are in, so lets get a copy of the latest catalogue.

Navigate to where 6 is the operating system major number and x86_64 is the platform architecture. You can go from if it’s simpler.

There will be a link to the latest version of the epel-release-6-?.noarch. Install it.

rpm -ivh epel-release-6-8.noarch.rpm

Now check that it has worked:

[root@mrn tmp]# yum repolist
repo id   repo name                                      status
base      CentOS-6 - Base                                6,381
epel      Extra Packages for Enterprise Linux 6 - x86_64 9,341
extras    CentOS-6 - Extras                                 13
updates   CentOS-6 - Updates                             1,023
repolist: 16,758

Finally, list all the packages available at that repository:

yum –disablerepo="*” –enablerepo="epel” list available