it looks more like a complete app to me, there's a lot to do on both, PHP and (of-your-choice)SQL. My suggest would be these simple steps
DATA MODELING
* Map data
* set key data (primary, foreign keys, joints, etc)
* tranlate the previous to SQL
SERVER SIDE SCRIPTING
* Define variables, classes (perhaps going object oriented is not really necesary)
* Validation (make it correct and safe)
* Database Handle (it would be easier now with the beautiful tables we just do a few steps above)
* Device API (hope there is one in PHP, although I remember, there is a way to include C code inside a php script, I'll check it out later)
Then you go improving.
hope it helps
it sound interesting