From a Client to a Host With 2040

by David_Lin in Circuits > Microcontrollers

303 Views, 1 Favorites, 0 Comments

From a Client to a Host With 2040

uart_ckt.jpg

long long time ago......

the computer or PC or NB connect to a MCU(board) always via a cable of

RS-232 till now!

How to Remove the Notebook or Monitor Away ?

DSC_2547.jpg
DSC_2549.jpg

(left picture above is showing the uart powered by USB cable)

(right picture above is showing the uart powered by 3.7v battery)

ARDUINO NANO Serial AND PI PICO Uart

DSC_2545.jpg
DSC_2546.jpg

HOW Does pico USE THE UART TO BECOME The HOST?

some how .....

the nano(or mini) is connect to a NB or a computer as a client.

for nowaday......

the uart of pico have become a host connect to an Arduino nano(or mini or pico) !

HOW TO CONNECT TO THE NET

DSC_2564.JPG
DSC_2530.JPG

HOW TO CREATE A CLIENT AND CONNECT TO IT ?

uart = UART(0, 9600) # pico

or

serial.begin(9600); // nano

WHAT IS THE PROTOCOL ?

1. it is p2p (point to point).

2. it is bit by bit transmission.(Baud Rate ex:9600,115200...)

3. it is 2p (two pair TX, RX twin communicate)

4. 5v, GND, TX, RX for each.(without clock)

5. communicate both at the same time serial.

6. sometimes terminal by 30, 0A, 0D or sometimes terminal by "\n"

Circuit Connections

uart0_ckt.jpg

the four wires can be extended

but the power must be +5V (from USB 3.7v~5v)

WHY ?

ex:

the air conditioner (A/C), always have a display of the temperature.

and almost the MCU is sending the temperature to the display-er ,

who from the remote host.

Code of Client

Code:

Downloads

DEMO

2021年3月23日 Let it be !

HAVE FUN !