Introduction: From a Client to a Host With 2040

About: As a young kid, my curiosity in electronics was compelling.... why does thunder interrupt the radio reception? ....why does ROBOTs run without any wire?.... and I've been hooked on making thing ever since.

long long time ago......

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

RS-232 till now!

Step 1: How to Remove the Notebook or Monitor Away ?

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

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

Step 2: ARDUINO NANO Serial AND PI PICO Uart

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) !

Step 3: HOW TO CONNECT TO THE NET

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"

Step 4: Circuit Connections

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.

Step 5: Code of Client

Code:

Step 6: DEMO

HAVE FUN !

Microcontroller Contest

Participated in the
Microcontroller Contest