Final Year Of Uni - Project
So, I’ve started my final year at University of Portsmouth and have managed to join a really interesting project called PiCycle.
The PiCycle project is aimed to make cycling safer by capturing data through sensors attached to a bicycle. This collected data will be used to highlight certain areas on a map which are potentially risking the lives of cyclists. This information can then be passed onto the local councils and government in order to make the cycling routes safer for the public.
I had a meeting for the first time with my project supervisor last week and he provided me with the initial prototype of the PiCycle. The prototype was a raspberry pi contained in a case, with a few modules attached to the case. These modules were: a GPS dongle, an ultrasonic range sensor (URS) module, and an external power pack.
My first task was to load the rasbian operating system onto the raspberry pi.
During the process of loading rasbian onto the raspberry pi, I encountered some trivial issues. The SD card which my supervisor provided me with was not being detected on either my Macbook or my Windows PC, even though I knew data was on there because it was booting up when attached to the raspberry pi. I had to borrow my housemates SD card in order for it to work.
Once rasbian was installed I set up the SSH server and installed Node.JS. I was not able to obtain the PiCycle Sensor code, as I was waiting for my client to get back to me, so I decided to experiment myself.
The second task was to hook up the URS module with the raspberry pi.
I’ve worked with ultrasonic range sensors before – not too long ago I created a parking sensor using an Arduino with two led lights (red and green) which reacted to a specified distance set in the code.
The URS module that my supervisor gave me proved to be very difficult to hook up to the raspberry pi. There are no analogue GPIO pins on the raspberry pi so you cannot simply listen to the signal being outputted by the URS module; instead, you have to read the digital signal at a specified rate and convert that to meaningful data.
I could not find any node.js libraries which supported the URS module my supervisor gave me, but the module which I own does; so I decided to use my own module. I eventually got the URS module working with node.js and had it outputting the distance (in cm) out to the console.
The next task I have set to do is hook up the GPS module, as well as hooking up a ‘panic button’. The panic button is a button which the user can press if they feel like they’re in danger, which will be recorded as a point on the route, enforcing any heat maps previously recorded on that path.
Expect a post at least once a week, keeping you updated on the progress of this project!