esp_now_init  ( -- fl )

publication: 29 mai 2024 / mis à jour 23 novembre 2025

Read this page in english

 

vocabulaire: espnow

Initialise les fonctions ESPNOW.

Exemple:

0 constant ESP_OK 
-1 constant ESP_FAIL 
 
\ Configure WiFi in station mode 
: wifi-init ( -- )  
    \ start wifi in station mode 
    WIFI_MODE_STA Wifi.mode 
  ; 
 
\ Initialize ESPNOW 
: espnowInit ( -- ) 
    wifi-init 
    esp_now_init ESP_OK <>   \ 0 for success 
    if  
        ." ESP-NOW init failed" cr  
        -1 throw 
    then 
    ." ESP-NOW init success" cr 
  ; 

Legal: site web personnel sans commerce / personal site without seling