Modifications

Sauter à la navigation Sauter à la recherche
366 octets ajoutés ,  25 mai 2021 à 08:29
Ligne 65 : Ligne 65 :  
from machine import UART
 
from machine import UART
 
ser = UART(1, tx=4, rx=36, baudrate=9600 )
 
ser = UART(1, tx=4, rx=36, baudrate=9600 )
 +
</syntaxhighlight>
 +
 +
Instancier le bus SPI sur le connecteur UEXT se fait à l'aide de la classe {{fname|SoftSPI}} .
 +
 +
<syntaxhighlight lang="python">
 +
from machine import SoftSPI, Pin
 +
# SoftSPI(baudrate=500000, *, polarity=0, phase=0, bits=8, firstbit=MSB, sck=None, mosi=None, miso=None)
 +
spi = SoftSPI( miso=Pin(15), mosi=Pin(2), sck=Pin(14), baudrate=500000 )
 +
ssel
 
</syntaxhighlight>
 
</syntaxhighlight>
  
29 917

modifications

Menu de navigation