Page Personnelle de Vincent Kerhoas Vincent Kerhoas - Professeur Agrégé

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



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


Back                  << Index >>