44 lines
1.8 KiB
Markdown
44 lines
1.8 KiB
Markdown
# Inky Ticker
|
|
|
|
An Info display for my Inky pHAT.
|
|
|
|
## Description
|
|
|
|
This repository provides an info display for an [Inky pHAT](https://pimoroni.com/inkyphat), or a SSD1675 eInk display attached to a Raspberry Pi, to be more specific.
|
|
|
|
It displays (as of now) the current weather at a given location based on data provided by the [OpenWeather](https://openweathermap.org/api/one-call-3) API.
|
|
I selected this particular data provider because it has a One-Call API which yields all relevant information with just one API call (hence the name, heh?).
|
|
The use of the API is free so long as one stays below 1,000 requests/day (as of the time writing this).
|
|
You'll need your own API key to use this project.
|
|
|
|
Copy the file `src/weather/secret.rs.example` to `src/weather/secret.rs` and replace the placeholder API key inside with yours.
|
|
|
|
|
|
## Hardware Required
|
|
|
|
I developed this project for my Raspberry Pi Zero (as of me writing this there is only this one revision of the Pi Zero, though there's a version with and without WiFi) with an attached Inky pHAT.
|
|
|
|
### Cross-Compiling the project
|
|
|
|
Since builds on a Pi Zero can take painfully long, I've moved to cross-compiling this project on my machine.
|
|
You can do that using the [`cross`](https://github.com/cross-rs/cross) tool by running:
|
|
|
|
```text
|
|
cross build --target=arm-unknown-linux-gnueabi --release --bin inky --features inky
|
|
```
|
|
|
|
## Running the Simulator
|
|
|
|
The project comes with a built-in simulator to allow for quick prototyping.
|
|
To run the simulator, just execute:
|
|
|
|
```
|
|
cargo run --release --bin simulator --features simulator
|
|
```
|
|
|
|
You will need the SDL2 library for that, though.
|
|
Information on how to install it can be found [here](https://github.com/embedded-graphics/simulator#setup).
|
|
|
|
## License
|
|
|
|
This project is licensed under the MIT license. For the licensing text, refer to the `LICENSE` file in this repository.
|