Home > other >  MicroPython microcontroller - simple to use UART communication with PC
MicroPython microcontroller - simple to use UART communication with PC

Time:01-26

MicroPython has official transplant to realtek RTL8722 dual-band WiFi + 5.0 BLE microcontroller, using UART and PC or other single-chip data transmission line only need 5 Python code, you could just below are sample.

Use material: Ameba x 1, TTL serial USB transfer module 1 x

As shown in the figure below, transfer of USB to TTL serial transmission module is connected to the pin PA_21 and PA_22



Then, copy and paste the following code line by line to the REPL, to see the effect,

 from the machine import UART 
Uart=uart (tx="PA_21", rx="PA_22")
Uart. The init ()
Uart. Write (' hello ')
Uart. Read (5)
  • Related