|
1 | 1 | # Running The Demos |
2 | 2 |
|
3 | | -There are two demos available. Currently, data can only be sent in one |
4 | | -direction at a time since I have not figured out how to perform concurrency in |
5 | | -MicroPython. The threading |
6 | | -library is said to be experimental. However, I did locate [this code](https://github.com/fadushin/esp8266/blob/790958fa332592c80a0f81f25cdaa9513d596f64/micropython/uhttpd/uhttpd/__init__.py#L354) which may solve |
7 | | -the concurrency issue. I have yet to have a chance to see if the code works. |
| 3 | +A demo is available to run data end-to-end in both directions. |
8 | 4 |
|
9 | | -## Sending Messages To The Local Simulated Server From The Pico |
10 | | -Here are the steps used: |
11 | | - |
12 | | -1. Start the backplane. |
13 | | -2. Start the [messages_from_pico.py](https://github.com/MrYsLab/python_banyan/blob/tcp_gateway/python_banyan/utils/tcp_gateway/pico_micropython_scripts/messages_from_pico.py) MicroPython script. |
14 | | -3. Start [sim_messages_from_pico.py](https://github.com/MrYsLab/python_banyan/blob/tcp_gateway/python_banyan/utils/tcp_gateway/simulated_local_station/sim_messages_from_pico.py) |
15 | | -4. Start the [tcp_gateway.py](https://github.com/MrYsLab/python_banyan/blob/tcp_gateway/python_banyan/utils/tcp_gateway/tcp_gateway.py) |
16 | | - |
17 | | -You should see the messages if you look at the console window for sim_messages_from_pico.py. |
| 5 | +The TCP Gateway will continually attempt to connect to the Pico. |
18 | 6 |
|
| 7 | +## Steps |
| 8 | +Here are the steps used: |
19 | 9 |
|
20 | | -## Sending Messages From the Local Simulated Server To The Pico |
21 | 10 | 1. Start the backplane. |
22 | | -2. Start the [messages_to_pico.py](https://github.com/MrYsLab/python_banyan/blob/tcp_gateway/python_banyan/utils/tcp_gateway/pico_micropython_scripts/messages_to_pico.py) MicroPython script. |
23 | | -3. Start the [tcp_gateway.py](https://github.com/MrYsLab/python_banyan/blob/tcp_gateway/python_banyan/utils/tcp_gateway/tcp_gateway.py) |
24 | | -4. Start the [sim_messages_to_pico.py](https://github.com/MrYsLab/python_banyan/blob/tcp_gateway/python_banyan/utils/tcp_gateway/simulated_local_station/sim_messages_to_pico.py) script. |
| 11 | +2. Start the [tcp_gateway.py](https://github.com/MrYsLab/python_banyan/blob/tcp_gateway/python_banyan/utils/tcp_gateway/tcp_gateway.py) |
| 12 | +3. Load and start the [select.py](https://github.com/MrYsLab/python_banyan/blob/master/python_banyan/utils/tcp_gateway/pico_micropython_scripts/select.py) MicroPython script on the Raspberry Pi Pico W |
| 13 | +4. Start [sim_echo_client.py](https://github.com/MrYsLab/python_banyan/blob/master/python_banyan/utils/tcp_gateway/simulated_local_station/sim_echo_client.py) |
25 | 14 |
|
26 | | -Check the Thonny shell for incoming messages. |
| 15 | +The messages appear in the sim_echo_client console and on the MicroPython |
| 16 | +Thonny shell. |
0 commit comments