RPi reading serial and store values received in a databse - Raspberry Pi Forums
dear all,
have attached arduino rpi. arduino has sensors , buttons attached it, can manage them through serial interface.
now, have sensors data, button status, saved on database, instance can read temperature each hour or change status of button in db table "live". final goal have web page graph of temperature values interact through serial arduino.
interaction part sending command via serial have tried http://code.google.com/p/php-serial/ works fine.
missing database part, thinking sort of script keeps monitoring serial input coming arduino (such buttons), , other script (scheduled each hour) sends command read analog inputs.
of has suggestions or ideas on how that? there better methods?
thank you,
dk
have attached arduino rpi. arduino has sensors , buttons attached it, can manage them through serial interface.
now, have sensors data, button status, saved on database, instance can read temperature each hour or change status of button in db table "live". final goal have web page graph of temperature values interact through serial arduino.
interaction part sending command via serial have tried http://code.google.com/p/php-serial/ works fine.
missing database part, thinking sort of script keeps monitoring serial input coming arduino (such buttons), , other script (scheduled each hour) sends command read analog inputs.
of has suggestions or ideas on how that? there better methods?
thank you,
dk
simplest method database sqlite
http://zetcode.com/db/sqlitepythontutorial/
craft python script reads current input states , logs database along timestamp.
use crontab schedule every hour. http://www.pantz.org/software/cron/croninfo.html
bit of php able access sqlite database , display data.
or
if pi connected internet make use of google docs. http://www.danielhansen.org/2013/03/ras ... using.html
http://zetcode.com/db/sqlitepythontutorial/
craft python script reads current input states , logs database along timestamp.
use crontab schedule every hour. http://www.pantz.org/software/cron/croninfo.html
bit of php able access sqlite database , display data.
or
if pi connected internet make use of google docs. http://www.danielhansen.org/2013/03/ras ... using.html
raspberrypi
Comments
Post a Comment