{"id":45733041,"url":"https://github.com/btemperli/raspberry-scratch-server","last_synced_at":"2026-02-25T10:01:07.695Z","repository":{"id":38396328,"uuid":"413701751","full_name":"btemperli/raspberry-scratch-server","owner":"btemperli","description":"Part of my Masterthesis: Establish a connection between Raspberry Pi, Python and Scratch.","archived":false,"fork":false,"pushed_at":"2022-06-29T12:41:47.000Z","size":184,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-30T02:51:13.140Z","etag":null,"topics":["python","raspberrypi","scratch","scratch-extension","scratch3","server"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/btemperli.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-05T06:35:10.000Z","updated_at":"2022-07-04T13:29:01.000Z","dependencies_parsed_at":"2022-09-16T11:22:06.622Z","dependency_job_id":null,"html_url":"https://github.com/btemperli/raspberry-scratch-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/btemperli/raspberry-scratch-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btemperli%2Fraspberry-scratch-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btemperli%2Fraspberry-scratch-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btemperli%2Fraspberry-scratch-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btemperli%2Fraspberry-scratch-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/btemperli","download_url":"https://codeload.github.com/btemperli/raspberry-scratch-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/btemperli%2Fraspberry-scratch-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29817057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T05:36:42.804Z","status":"ssl_error","status_checked_at":"2026-02-25T05:36:31.934Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","raspberrypi","scratch","scratch-extension","scratch3","server"],"created_at":"2026-02-25T10:00:32.170Z","updated_at":"2026-02-25T10:01:07.679Z","avatar_url":"https://github.com/btemperli.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scratch Server\n\n## About\n\nThis project is part of the bigger project \"Masterthesis: Learning Networks with new technologies like LoRa\".\nWith this server, it should be possible to establish a connection between a Raspberry Pi and Scratch.\n\n## Setup\n\nPrepare Raspberry Pi:\n\n- enable `Interface Options` / `I2C`\n- enable `Interface Options` / `SPI`\n\n```shell\n$ sudo raspi-config\n```\n\nInstall required packages:\n\n```shell\n$ sudo pip3 install -r requirements.txt\n```\n\nCreate a `.env` file and edit its content: \n\n```shell\n$ cp example.env .env\n$ nano .env\n```\n\nConnect the raspberry pi with the [LoRa Bonnet from adafruit](https://learn.adafruit.com/adafruit-radio-bonnets/rfm69-raspberry-pi-setup):\n\n```shell\n$ wget https://github.com/adafruit/Adafruit_CircuitPython_framebuf/raw/main/examples/font5x8.bin\n```\n\nTest everything needed on the Raspberry Pi:\n\n```shell\n$ python3 test_server.py\n```\n\n## Server\n\n### Start\n\n```shell\n$ python3 server.py\n```\n\n### Connection\n\nWith [postman](https://www.postman.com/): WebSocket Request. Connect to `localhost:8820`\n\n### Requests\n\nYou can communicate with the server by sending json:\n\n```json\n{\n    \"display\": \"a new message\"\n}\n```\n\n#### Keys\n\n| key | handling | example |\n|:---:| --- | --- |\n| `display` | shows a message on the [screen](https://www.adafruit.com/product/4074) of the raspberry pi | `{\"display\": \"some output\"}`\n| `send` | sends a message via the [LoRa-Node](https://www.adafruit.com/product/4074) of the raspberry pi | `{\"send\": \"a message\"}`\n\n\n## Updates\n\n### Requirements\n\nYou can add used packages to the `requirements.txt` in the root-folder. Use the following command to show all installed packages:\n\n```shell\n$ sudo pip freeze\n```\n\nYou can update a specific package with the following command:\n\n    $ sudo pip install --upgrade adafruit-circuitpython-rfm9x\n\n\n## Bugs\n\n### Font Module\n\n```python\n⚠️ NotImplementedError: font module not available (ImportError: libSDL2_ttf-2.0.so.0: cannot open shared object file: No such file or directory)\n```\n\n#### Solution\n\n    $ sudo apt install libsdl2-ttf-2.0-0\n\n---\n\n# Watcher\n\nA second module in this project is the watcher. With the watcher, you can watch the sending streams from the different scratch-server-applications.\n\n## Run watcher\n\n    $ python3 Watcher.py\n\n*You cannot run the Watcher from an external console, because it needs a display to show the incoming messages.*\n\n## Add the watcher to autostart\n\n    $ sudo nano /etc/xdg/lxsession/LXDE-pi/autostart\n\nNow add the following line before the screensaver line:\n\n    @sudo sh /home/pi/raspberry-scratch-server/system/launcher.sh\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtemperli%2Fraspberry-scratch-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbtemperli%2Fraspberry-scratch-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbtemperli%2Fraspberry-scratch-server/lists"}