For python you have the python serial
library, which handles uart (serial) communication (like minicom).
I think you should be able to receive the data in python and write it to a database.
P.S. could you post the command that you are using for minicom?
I used the makefile from wiringpi/examples/gertboard and added some lines with #c for mysql to compile it:
LDFLAGS = -L/usr/local/lib -L/usr/include/
LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm `mysql_config --cflags` `mysql_config --libs`
So far its compiling and i don't have any issues with that, but my access to the database gets denied. I don't know why? I installed the sudo apt-get install libmysqlclient-dev before for the mysql header. Here is my code for the connection:
Code: Select all
#define DATABASE_NAME "test"
#define DATABASE_USERNAME "root"
#define DATABASE_PASSWORD "xxxxxxxxxxxx"
void mysql_connect (void)
//initialize MYSQL object for connections
mysql1 = mysql_init(NULL);
if(mysql1 == NULL)
fprintf(stderr, "ABB : %s\n", mysql_error(mysql1));
//Connect to the database
if(mysql_real_connect(mysql1, "192.168.2.120", DATABASE_USERNAME, DATABASE_PASSWORD, DATABASE_NAME, 0, NULL, 0) == NULL)
fprintf(stderr, "%s\n", mysql_error(mysql1));
printf("Database connection successful.\r\n");
Thank you for the help so far.