Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bailuk/halocode-tools
https://github.com/bailuk/halocode-tools
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/bailuk/halocode-tools
- Owner: bailuk
- License: gpl-3.0
- Created: 2022-03-27T18:50:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-04-30T08:01:21.000Z (over 2 years ago)
- Last Synced: 2024-10-25T09:28:02.765Z (about 2 months ago)
- Language: Python
- Size: 1.87 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# halocode-tools
Upload and log script for the [makeblock halocode MFF-K00-01](https://en.wikipedia.org/wiki/Makeblock#1.6_Makeblock_Halocode)
Source code has been extracted from this [project](https://github.com/FFtust/mu)## Upload python scripts and show console log
```bash
# on linux
./upload.py samples/test.py# on windows
python upload.py samples\test.py```
## Code snippets for VS Code
Copy `.vscode\python.code-snippets` to directory `.vscode/` of your project. Generate code snippets with [api/transform.awk](api/transform.awk).
## Run with python embedded
- Download Python embedded: https://www.python.org/downloads/release/python-3104/
- Unzip to `halocode-tools/python`
- Download Serial module:
- Install Serial module to halocode-tools/python/Lib/site-packages: `python\python.exe setup.py install`
- Add `Lib` and `Lib/site-packages` to `halocode-tools/python/pythonXX._pth`
- Run `python\python.exe upload.py samples\test.py`## Message Broadcasting
halocode uses [MQTT (Message Queuing Telemetry Transport)](https://mqtt.org/) to broadcast messages:
Broker -> Server
Client -> Send and receive
Subscribe -> Topic```bash
# install server
apt install mosquitto# edit /etc/mosquitto/mosquitto.conf:
---------------------
allow_anonymous true
listener 1883 0.0.0.0
---------------------# start server
systemctl status mosquitto
systemctl start mosquitto# install clients
apt install mosquitto-clients# subscribe to test
mosquitto_sub -t "test"# publish message
mosquitto_pub -t "test" -m "test
```samble script: [samples/wlan.py](samples/wlan.py)
## Links
- [Python Mu Editor for halocode](http://docs.makeblock.com/halocode/en/tutorials/use-python-mu.html)
- [Python Mu Editor original](https://codewith.mu/)
- [halocode API reference](http://docs.makeblock.com/halocode/en/block-reference/block-reference.html)## Picture
![halocode](halocode.jpg)