Intentar ORO - Gratis
MakerSpace
Linux Magazine
|#293/April 2025: Trojan Horse
If you need to store long-term historical data, you can cobble together some Arduino modules, sensors, and displays and get them all to talk to an SQL server.

Figure 1: This Arduino project logs data to an SQL database.
In most Arduino projects, devices use messaging protocols like Message Queuing Telemetry Transport (MQTT) [1] or custom dashboard platforms such as Arduino Cloud [2] or ThingsBoard [3] to talk to each other. While those two approaches offer excellent solutions for viewing short-term sensor data, they have limitations when used for long-term historical storage.
A common solution that supports historical storage is to connect MQTT brokers to datalogging packages like Node-RED, InfluxDB, or Grafana. Another approach is to install SQL drivers on the Arduino controllers and then pass sensor data directly to a database server. There are Arduino C/C++ libraries for MariaDB/ MySQL, Microsoft SQL, PostgreSQL and even local SQLite 3 databases. SQL-based solutions have some useful benefits such as:
• No intermediate storage is required
• Access raw historical data or aggregate calculations
• Write custom queries
• Use back-end views and procedures to minimize dashboard code
Depending on your project requirements, using an SQL server could be a good fit for your next Internet of Things (IoT) project.

This article presents a sensor project that connects Arduino modules to a MySQL/ MariaDB server (Figure 1). Dashboards showing current values and historical trend charts will be created using some SQL widgets in Node-RED.
SQL Libraries for Arduinos
Esta historia es de la edición #293/April 2025: Trojan Horse de Linux Magazine.
Suscríbete a Magzter GOLD para acceder a miles de historias premium seleccionadas y a más de 9000 revistas y periódicos.
¿Ya eres suscriptor? Iniciar sesión
MÁS HISTORIAS DE Linux Magazine
Linux Magazine
A couch-gaming OS based on Big Picture streaming Game Master
Play Steam, GoG, and Epic games with one steamy and epic OS.
8 mins
#297/August 2025: Cleaning Up
Linux Magazine
Shopping Frenzy
To gain insight into his Amazon orders, Mike Schilli writes a Go program that runs statistics and displays the results graphically.
10 mins
#297/August 2025: Cleaning Up
Linux Magazine
Zack's Kernel News
Chronicler Zack Brown reports on the latest news, views, dilemmas, and developments within the Linux kernel community.
10 mins
#297/August 2025: Cleaning Up
Linux Magazine
FOSSPicks
Sparkling gems and new releases from the world of Free and Open Source Software
14 mins
#297/August 2025: Cleaning Up
Linux Magazine
Create interactive fiction with Inform Storyteller
Inform is your guide to the strange worlds of interactive fiction and text-driven games.
12 mins
#297/August 2025: Cleaning Up
Linux Magazine
MakerSpace Send Raspberry Pi and Arduino notification messages to your desktop You've Been Notified
If you use sensors with a Raspberry Pi or Arduino in your home network, you may want to get desktop notifications on your Linux PC whenever some interesting event is detected. You can send messages via SSH or through simple TCP connections and display them with notify-send.
4 mins
#297/August 2025: Cleaning Up

Linux Magazine
Tuning tools for AMD graphics chips Clockwork
CoreCtrl and RadeonTop monitor the utilization and clock frequency of AMD chips with the potential for boosting performance.
5 mins
#297/August 2025: Cleaning Up

Linux Magazine
Window of Opportunity
Add graphics that automatically update. We show you how to build an analog clock widget with the Cairo and GTK libraries.
11 mins
#297/August 2025: Cleaning Up

Linux Magazine
MADDOG'S DOGHOUSE
The prohibitive expense of early proprietary supercomputers is just part of why Linux has taken (and kept) the lead in this area.
3 mins
#297/August 2025: Cleaning Up

Linux Magazine
Notification Nirvana
If you host a lot of services on your home server, it helps to have them send you timely notifications. With ntfy, you can send push notifications to your phone or desktop. By Koen Vervioesem
9 mins
#297/August 2025: Cleaning Up