Wednesday, 15 July 2015

Am I really a blogger?

suprised to see that my last update was in Fenruary!

I have now got an Agobe robot which follows a black line, most of the time and also attempts to get out of a maze.
Both of these programs are based on those supplied with the robot.

I have been trying to understand threading in Python, so I have created a program which uses the switch to change between line following, maze solution, quit and shitdown. This seems to work. I have also got an IP display from 4tronix which I use to display the mode. It all seems to work and I must put the code into GitHub , on the off chance someone may be interested.

The robot sometimes does not detect the edge of the line, this could be because of the speed it is moving and the fact I have got a 0.2 second sleep statement in the main loop. Must investigate whether decreasing the time delay improves the performance or maybe I could add a callback on the edge detection.

Then another  idea I have is to use my series 2  b Modesto detect when the ahobo attempts to move out of an area using  Opencv. This would mean having to look at communication between the two PIs.

Friday, 20 February 2015

Get_instance is not working

so it looks like my problems are not anything to do with opencv. Adding some debug statements the code is making two instances of my camera class so the second one can't get access to the camera and hence the error.

Not sure why it is not working, have to do a bit more digging.

Thursday, 19 February 2015

raspberry PI robots

So I have been beavering away for ages now trying to get a robot to follow a line. I have got a model B connected to a BrickPI  controlling a lego robot.
It has been relatively straightforward to control the robot using a Nintendo WII controller.

A while ago I came across opencv and SimpleCV and thought it would be interesting to use the camera to detect masking tape and follow it. Then before Christmas MAGPI included an article on Pietar which recognised traffic symbols. So I have started to implement this code. Although I could get it to work statically, I could not get it to work dynamically because the video picture was not being streamed.

This has led me to look at loads of other approaches, the Dexter streaming robot, CoderBot to name but a few. I have also looked at Flask, in particular Ben Nuttals Bett-Bot proved useful to get some understanding. Then I came across a tutorial from Miguel Grinberg and I have started to use his approach.

In the meantime I have modified my original code to make more use of classes, and the CoderBot approach of using get instance to create only one copy of the class.

My original program based on Pietar now works, I can control the robot from the WII controller and it processes video. When I run everything from My Flask App I get an error
Lib 4l2: error setting pix format: device or resource busy
HIGHGUI ERROR: libv4l unable to IOCTL S_FMT
HIGHGUI ERROR: V4L:initial capture error unable to load initial memory buffers
*** glibc detected *** corrupted double linked list.

The reference to memory buffers made me wonder about memory split, but increasing to 64K has not made a difference.

Tim to investigate further, 128K did not change anything.

Sunday, 8 February 2015

Almost three years later

Well so much for writing something every day!

Quite a lot has happened since my last post of June 2012, still not working although I am still a STEM ambassador, now a code club volunteer running two clubs a week at a local primary and secondary school.

 I also trained as a Code Club Pro volunteer to help train teachers about computers to give them some background for the new computer curriculum. That unfortunately has not taken off in my area, contacted six schools several times and have not acquired any bookings.

I have become addicted to Raspberry PIs with at the moment three of my own, two B's and one B+ with a dead model A. Do not drop things on a raspberry PI, they tend to get squashed!

The main problem I am finding with the raspberry PIs is the number of projects and uses people are coming up with. This means I never get to complete one!

One  PI is sitting waiting to be fitted I to a bird box so I can install it in the garden and take time lapse photographs. It is fixed with the noir camera and a Bright PI.

The second is  mounted on a Dexter Industries BrickPI card and lego robot. I have got the robot working via a Nintendo controller or from the web. I have been looking at opencv and simplecv for camera recognition. There are lots of posts on this, Codor, Pietar and Dexter industries, I keep flitting between each of them. Currently struggling to understand how to send an image back to a web site.

Well, hopefully it won't be three years to the next post.

Monday, 18 June 2012

changes in technology

As I have said in the previous blog, I have been working away from home and staying in hotels. Just before Christmas 2011 I sat down at a table in the bar, ready to eat and drink of course and put down on the table, my phone, kindle and iPad. it then hit me as to the amount of technology I had just put on the table. My phone is a HTC desire, which includes, two cameras , gps, width, mobile Internet, an eight gig memory card and of course a phone. The kindle is the basic model, wifi not 3G, with ten novels to read. I have got an iPad2 which needs no introduction. That got me thinking of all the technology I posses and the changes I have seen in my lifetime. I think the changes I have seen since 1954 are pretty incredible, but do they compare with those witnessed by my great grandma ginny? As a lad I sometimes used to go with my dad to quorn to visit his mother, Millicent, who lived with her brother Ernie, their mother Ginny and Aunt nell in a house on the corner of barrow road and Loughborough road. If we got there between 11 And 1130 then my dads great uncle bill would be there. As a lad I tended to ignore these old folk but there was conversation that I can remember. I think my dad asked bill what changes he had seen in quorn, and he reeled off something like he could remember the first bike, car, plane, zeppelin in the first world war, helped build the great central railway, radio, television , telephone , jet engine, space rockets and I think he lived long enough to see Apollo 11 land on the moon. I need to check this out but I think he served in the boer war and the first world war where he was invalided out. Anyhow the point is the amount of change that Bill and Ginny had lived through, from horse drawn transport to space rockets, from no radio through crystal sets to valves to transistors to integrated circuits. So how about me? Well I thought I would post on different topics such as transport, radio, tv, computers etc. The next post will cover transport.

Friday, 15 June 2012

First Blog

So, here we go my first blog so please bear with me as I find out how this works. Why start a blog, well after 34 years at work I am about to finish after my site was closed down. I have always had this idea of writing a novel, so to get used to the idea of writing a few words a day I thought I would start a blog of what I am up to, and a bit of personal history. Why the title RambleOn, well I do tend to ramble on a bit as you will find out if you continue to read, and the lyrics from a Led Zeppelin track, " I am going to ramble on, sing my song, it won't take long" came into my mind. hopefully I will manage to keep rambling on for quite a while. I promise not to sing! Well that is it for the first blog, let us see what it looks like.