Page Personnelle de Vincent Kerhoas
Vincent Kerhoas
Enseignant du Supérieur
Professeur Agrégé
Page Personnelle de Vincent Kerhoas

Raspberry Pi C-Server Sensor Application with websocket

Back                  << Index >>

Getting pressure and temperature measurements from the Raspberry PI Sense Hat



SOURCE CODE

ws_sensor

REM : sensor access functions ( c language) can be found at : https://github.com/davebm1/c-sense-hat

you’ll have to install :

After websocket handshaking, the RPI gets measurements with I2C bus and sends them to the client through the websocket.


Adding LED Control

GPIO CONFIG



SOURCE CODE

for led config, have a look at : dynamic_http_server.html

ws_sensor_led


Adding Database Management



SOURCE CODE

Let’s use a lightweight database : sqlite3


Cross Compiling and Debug

please have a look at : https://www.enib.fr/~kerhoas/rpi_developpement.html



SOURCE CODE


Back                  << Index >>