I finally got around to finishing off this prototype 7-segment display module, based on the MAX7219 integrated circuit. I went for the largest displays that the IC can drive directly, but that meant wiring them all together. I've since acquired a slightly smaller 4-digit display which will be a lot easier to wire up. My home brew Arduino is,driving the module, but there are libraries in JAL for PICs for the MAX7219 as well as for the Arduino. The interface is a simple SPI type and could be driven from the Raspberry Pi except that the 3.3v/5v issue becomes a pain in the rear as usual. I'm keen to have this bad boy on the dashboard of the MR2 sometime soon.
Friday, 22 February 2013
Sunday, 3 February 2013
Now, it dawned on me last week (luckily after only 3 hours) that I was writing a small file out to the SD card every 5 seconds from my Python program which might be hard on the SD card with all those writes. SD cards and Linux file systems provide some sort of wear levelling, but any application which writes intensively to the card is going to wear it out fairly quickly. Writing to the card every 5 seconds might wear it out in a few weeks at best.
The other one was to use PHP to send data directly to the client browser using AJAX without an intermediate Pyhon script and file writes. I got this working this afternoon, but without proper data as I need to research using I2C on the RaspberryPi with PHP, if this is even possible. Using dummy data provided by PHP random number statements the results are good and over the local wireless lan refreshes of at least 4 per second (delay of 250 ms) are possible. The photo below shows the graph displayed on a basic Android 2.3 tablet I have which is in need of a purpose. I could see this mounted on the dashboard of the MR2 with the Raspberry Pi in AP (access point) mode, serving data via wireless from the engine.