Modifications

Sauter à la navigation Sauter à la recherche
36 octets ajoutés ,  31 juillet 2025 à 14:33
Ligne 197 : Ligne 197 :     
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
−
from machine import I2C
+
from machine import I2C, Pin
   −
i2c = I2C( 0 ) # sda=GP8, scl=GP9 @ 400 KHz (default)
+
i2c = I2C( 0, sda=Pin(8), scl=Pin(8) ) # @ 400 KHz (default)
−
# i2c = I2C( 0, freq=100000 ) # Reduce bus speed @ 100 KHz
+
# i2c = I2C( 0, sda=Pin(8), scl=Pin(8), freq=100000 ) # Reduce bus speed @ 100 KHz
 
</syntaxhighlight>
 
</syntaxhighlight>
  
32 908

modifications

Menu de navigation