Raspberry Pi C-Server Sensor Application with websocket
Raspberry Pi C-Server Sensor Application with websocket
Getting pressure and temperature measurements from the Raspberry PI Sense Hat
REM : sensor access functions ( c language) can be found at : https://github.com/davebm1/c-sense-hat
you’ll have to install :
sudo apt-get install libi2c-devAfter websocket handshaking, the RPI gets measurements with I2C bus and sends them to the client through the websocket.
httpDynServerWs_sensor.c
Le fichier iot/linux-server-programming/rpi-c-server-sensor-app/code_ws_sensor/httpDynServerWs_sensor.c n'a pas été trouvé à l'emplacement spécifié.
www/wsAppli.html
Le fichier iot/linux-server-programming/rpi-c-server-sensor-app/code_ws_sensor/www/wsAppli.html n'a pas été trouvé à l'emplacement spécifié.
Adding LED Control
GPIO CONFIG
$ nano /etc/profile.d/gpio_config.sh
#! /bin/bash
cd /sys/class/gpio/
echo 4 > export
cd gpio4
echo out > direction
echo 1 > value
cd ~for led config, have a look at : dynamic_http_server.html
www/wsAppliLed.html
Le fichier iot/linux-server-programming/rpi-c-server-sensor-app/code_ws_sensor_led/www/wsAppliLed.html n'a pas été trouvé à l'emplacement spécifié.
Adding Database Management
Let’s use a lightweight database : sqlite3
# RPI TERM
$ sudo apt-get install sqlite3 libsqlite3-devCross Compiling and Debug
please have a look at : https://web.enib.fr/~kerhoas/ide/rpi-cross-development
code_ws_sensor_led_db_cross_dev.zip