this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Create main.c

authored by

Ha_BOD and committed by
GitHub
efd1c7ef bb57f53e

+20
+20
software/firmware/base_badge/src/main.c
··· 1 + #include <zephyr/kernel.h> 2 + #include <zephyr/drivers/sensor.h> 3 + #include <zephyr/drivers/led_strip.h> 4 + #include <zephyr/drivers/regulator.h> 5 + #include <zephyr/bluetooth/bluetooth.h> 6 + 7 + void main(void) { 8 + LOG_INF("Démarrage du BaSIL V5.9.5..."); 9 + bt_enable(NULL); // Init BLE 6.0 10 + 11 + /* Gestion antenne pour économie d'énergie */ 12 + const struct device *rfsw = DEVICE_DT_GET(DT_NODELABEL(rfsw_pwr)); 13 + regulator_enable(rfsw); // Activer pour scan, disable pour sleep 14 + 15 + while (1) { 16 + // Lecture QMC5883L + Fusion Capteurs 17 + // Mapping sur LED_STRIP (Index 8-23 pour l'anneau extérieur) 18 + k_msleep(current_mode == MODE_ECO ? 500 : 50); 19 + } 20 + }