https://github.com/ticky/httpoled
📟 A Raspberry Pi program which displays images on an OLED display when POSTed to via HTTP
https://github.com/ticky/httpoled
Last synced: 11 months ago
JSON representation
📟 A Raspberry Pi program which displays images on an OLED display when POSTed to via HTTP
- Host: GitHub
- URL: https://github.com/ticky/httpoled
- Owner: ticky
- License: mit
- Created: 2017-08-26T04:13:44.000Z (almost 9 years ago)
- Default Branch: develop
- Last Pushed: 2023-02-15T21:30:38.000Z (over 3 years ago)
- Last Synced: 2025-05-12T14:26:20.726Z (about 1 year ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: Readme.md
- License: License.md
Awesome Lists containing this project
README
# HTTPImage
A Raspberry Pi program which displays images on an OLED display when POSTed to it via HTTP.
## Requirements
- A Raspberry Pi
- Python & pip
- An SSD1306-based, 128x64 OLED
- cURL and/or a modern browser
- Sketch (optional)
## Setting up
You'll need access to both `/dev/gpiomem` and `/dev/spidev0.{0,1}`.
First, you need to [enable SPI](https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/README.md#overview) in your Raspberry Pi's boot configuration.
Then, use `sudo usermod -aG spi,gpio $(whoami)` to give your user direct access. Then log out and back in.
Finally, clone this repo to your Pi, and run `pip install -r requirements.txt`
## Running
To run the server, from your Pi, run `python httpoled.py`! The server will be running on port 8080.
## Sending Images
Images can be sent either as the request body, or as the `image` parameter.
To send an image from the command line, you can use cURL:
```shell
curl -v --data-binary "@/path/to/image.png" http://:8080/
```
### Sketch Mirror integration
A script is included which integrates httpoled with Sketch Mirror.
Start Sketch Mirror with a 128x64 artboard. Replace `` with your Raspberry Pi's address, and paste the script into your developer console.
The script will then transmit updates to the Pi directly!