Modifications

Sauter à la navigation Sauter à la recherche
1 octet supprimé ,  29 avril 2025 à 20:25
Ligne 76 : Ligne 76 :  
The parameter must be the reference to a regular function accepting a "din" object as parameter.
 
The parameter must be the reference to a regular function accepting a "din" object as parameter.
   −
'''Good practice:''' instead of defining global variable, it is recommended to add a new attribute on the "din" object. By doing so, the ''userloop''' can easily access the new object.
+
'''Good practice:''' instead of defining global variable, it is recommended to add a new attribute on the "din" object. By doing so, the ''userloop'' can easily access the new object.
    
The following [https://github.com/mchobby/micropython-mydin/blob/main/examples/din_controlers/pico3mod/async-qwiic-bme280.py async-qwiic-bme280.py example] show how to create such reference and how to retreive it in the ''userloop''. The sensor is a [https://shop.mchobby.be/fr/cartes-breakout/684-bme280-capteur-temperaturehumiditepression-i2cspi-stemmaqtqwiic-3232100006843-adafruit.html BME280 sensor wired] on the I2C bus.
 
The following [https://github.com/mchobby/micropython-mydin/blob/main/examples/din_controlers/pico3mod/async-qwiic-bme280.py async-qwiic-bme280.py example] show how to create such reference and how to retreive it in the ''userloop''. The sensor is a [https://shop.mchobby.be/fr/cartes-breakout/684-bme280-capteur-temperaturehumiditepression-i2cspi-stemmaqtqwiic-3232100006843-adafruit.html BME280 sensor wired] on the I2C bus.
32 908

modifications

Menu de navigation