tweaks724/RETSTONE.md
Minecon724 916f44da47
All checks were successful
/ build (push) Successful in 1m1s
redstone WIP 2
2024-12-30 21:07:47 +01:00

32 lines
No EOL
1.1 KiB
Markdown

## Remote redstone
See [retstone.py](retstone.py) for usage example
### Glossary
repeaters - the blocks which allow to interact with redstone over internet \
packet - a bunch of bytes sent over the internet, that do something with a single repeater
### How it works
A packet is int / 4 bytes / 32 bits
Packet format:
```
[ 01 ] [ 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 ] [ 29 30 31 32 ]
action bits 2-28 of repeater id payload
```
- action: `1` to write, `0` to read
- payload: power level if writing
If writing, no response \
If reading, response is the power level, or 0 if not powered or no repeater with that ID
Reading powers the block down of course \
BUT you should power it down (or read), wait some, and then read again
### Retstone
**Network** translates to **reto** in Esperanto \
So retsomething means networked something (posto - mail, retposto - email, ejo - place (site), retejo - website, etc.) \
And sometimes we use network instead of internet, same is in that language \
Hence retstone