The Beatles: Hey Jude in C (Programming)


Bit of fun for a Saturday afternoon… This afternoon’s procrastination was sparked off this morning when I logged in to Facebook. Someone had posted this fantastic flowchart of the Beatles’ Hey Jude lyrics:

Hey-Jude-flowchart

I immediately realised that if the song structure can be put into a flowchart, it can be coded. I’m always looking for fun ways of practicing my programming, and this was suitably humorous and trivial! So I fired up Eclipse, googled the lyrics and got writing. Continue reading

12-zone perimeter detection from 6 ultrasonic sensors


The proximity sensing in ‘An Accident Waiting to Happen’ was done by a PICAXE 28X2 microcontroller, reading 6 Devantech SRF-10 ultrasonic sensors mounted around the perimeter of the table. The PICAXE board was programmed in PBASIC using their proprietary IDE. The detection cones of the 6 sensors overlapped slightly, so there were area where an observer would only be detected by one sensor, and also areas in between these where they would be detected by 2 sensors. This gave us 12 ‘zones’ in which to detect objects. Proximity readings were taken by the 6 sensors in sequence, and this was output to the PLC as a 4-bit parallel signal representing which zone had the closest object. Continue reading