Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/naoto64/picolan
This is a LAN system library using UART on Raspberry Pi Pico.
https://github.com/naoto64/picolan
lan parallel raspberry-pi-pico rs485 rs485-communication rs485-comunication rs485protocol uart uart-protocol
Last synced: 4 days ago
JSON representation
This is a LAN system library using UART on Raspberry Pi Pico.
- Host: GitHub
- URL: https://github.com/naoto64/picolan
- Owner: naoto64
- License: mit
- Created: 2022-01-03T14:22:02.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-06T09:20:01.000Z (almost 3 years ago)
- Last Synced: 2023-05-17T13:28:17.092Z (over 1 year ago)
- Topics: lan, parallel, raspberry-pi-pico, rs485, rs485-communication, rs485-comunication, rs485protocol, uart, uart-protocol
- Language: Python
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# PicoLAN
This is a LAN system library using UART on Raspberry Pi Pico.## Description
You can build a LAN system by converting the UART of Raspberry Pi Pico to RS485 and connecting them in parallel.## Demo
### Reception example
This is a program that reads received data.
Receive format: `STX` `ADDRESS(00~10)` `DATA_LEN` `DATA(10Byte)` `ETX`
```python:demo1.py
from machine import UART, Pin
import PicoLANdef print_func(arg):
print(arg)uart = UART(0, baudrate=9600, tx=Pin(0), rx=Pin(1))
plan = PicoLAN.PicoLAN(uart, 10, print_func, 10, 10, PicoLAN.DATA_LEN_FIXED)while True:
plan.read()
```### Transmission example
This is an example of sending dictionary format data.
Transmission format: `STX` `ADDRESS(00~10)` `DATA_LEN` `DATA(10Byte)` `ETX`
```python:demo2.py
from machine import UART, Pin
import PicoLANdef print_func(arg):
print(arg)uart = UART(0, baudrate=9600, tx=Pin(0), rx=Pin(1))
plan = PicoLAN.PicoLAN(uart, 10, print_func, 10, 10, PicoLAN.DATA_LEN_FIXED)
data = {
"a": "1",
"b": "2"
}
plan.send(data, 0)
```