Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4474

C/C++ • C/C++ to mySQL/MariaDB

$
0
0
Apologies for this newly question.
My first foray with a Raspberry Pi CM4

Hoping to read GPIO pins and put the values into MariaDB(mySQL), but which is the proper way to do it?
Value will be entered via a stored procedure which will do the calculations based on the entry and thus the Database becomes a data warehouse.

Should it be one program that polls all the pins and has only one connection to the DB OR each pin have its own program and connection since the pin values will change independently and only interested when values change?

Once this is working I will add to it - eg IF value higher than threshold turn on another GPIO and IF lower than turn off a GPIO for controlling pumps via relays.

Currently have MariaDB working and posting values in from Arduino's via WiFi, but connectivity is flaky, hence the desire to do it all in-house.

Many thanks in Advance.

Steve

Statistics: Posted by sgreensides — Sun Feb 11, 2024 8:09 am — Replies 0 — Views 38



Viewing all articles
Browse latest Browse all 4474

Trending Articles