Modifications

Sauter à la navigation Sauter à la recherche
Ligne 289 : Ligne 289 :  
Then we create the needed buses resources to access the various sensor.
 
Then we create the needed buses resources to access the various sensor.
   −
<syntaxhighlight lang="python">spi = SPI(0, baudrate=50000, polarity=0, phase=0, firstbit=SPI.MSB)
+
<syntaxhighlight lang="python">spi = SPI(0, mosi=Pin(7), miso=Pin(4), sck=Pin(6), baudrate=50000, polarity=0, phase=0, firstbit=SPI.MSB)
 
nss = Pin( 5, Pin.OUT, value=True )
 
nss = Pin( 5, Pin.OUT, value=True )
 
rst = Pin( 3, Pin.OUT, value=False )
 
rst = Pin( 3, Pin.OUT, value=False )
i2c = I2C(0)
+
i2c = I2C(0, sda=Pin(8), scl=Pin(9) )
 
</syntaxhighlight>
 
</syntaxhighlight>
  
32 908

modifications

Menu de navigation