Modifications

Sauter à la navigation Sauter à la recherche
335 octets ajoutés ,  25 février 2022 à 23:08
Ligne 220 : Ligne 220 :     
<syntaxhighlight lang="python">
 
<syntaxhighlight lang="python">
from machine import Pin
+
from machine import UART
x
+
 
x
+
uart = UART( 1, baudrate=9600, timeout=3000)
x
  −
x
   
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
The {{fname|UART}} class is [https://docs.micropython.org/en/latest/library/machine.UART.html fully described into MicroPython documentation].
 +
 +
One of the key parameter of UART is the {{fname|timeout}} parameter which indicates the timeout (in ms) to receive the end-of-line on UART.readline()
    
=== SPI Bus ===
 
=== SPI Bus ===
29 917

modifications

Menu de navigation