Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
Initial work on a freyr screen sideproject
  • Loading branch information
Buried-In-Code committed Feb 26, 2024
1 parent 0674e3d commit 4357111
Show file tree
Hide file tree
Showing 8 changed files with 695 additions and 35 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.15
rev: v0.2.2
hooks:
- id: ruff
- repo: https://github.com/executablebooks/mdformat
Expand Down Expand Up @@ -39,7 +39,7 @@ repos:
args:
- --markdown-linebreak-ext=md
- repo: https://github.com/psf/black
rev: 24.1.1
rev: 24.2.0
hooks:
- id: black
- repo: https://github.com/pappasam/toml-sort
Expand Down
10 changes: 5 additions & 5 deletions freyr-device/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ Collects temperature and humidity readings and sends them to Freyr.

## Installation

1. Update the `config.py` file with your settings
2. Download and load the [Micropython uf2](https://www.raspberrypi.com/documentation/microcontrollers/micropython.html) onto your Pico.
3. Install [mpremote](https://pypi.org/project/mpremote/).
4. Install external dependencies:
1. Download and load the [Micropython uf2](https://www.raspberrypi.com/documentation/microcontrollers/micropython.html) onto your Pico.
2. Install [mpremote](https://pypi.org/project/mpremote/).
3. Install external dependencies:
- `mpremote mip install dht`
- `mpremote mip install urequests`
5. Copy the config file to your device: `mpremote cp config.py :`
4. Copy the config file to your device: `mpremote cp config.py :`
5. Update the `config.py` file with your settings: `mpremote edit config.py`
6. Copy the main file to your device: `mpremote cp main.py :`
2 changes: 1 addition & 1 deletion freyr-device/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def collect_measurements():
led.on()


def send_results(temperature, humidity):
def send_results(temperature: float, humidity: float):
body = {"device": device, "temperature": temperature, "humidity": humidity}
print(f"Sending request to {base_url}/api/readings")
response = urequests.post(url=base_url + "/api/readings", json=body, headers=headers)
Expand Down
22 changes: 22 additions & 0 deletions freyr-screen/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Freyr - Screen

![Micropython](https://img.shields.io/badge/Micropython-1.22.2-green?style=flat-square)
![Status](https://img.shields.io/badge/Status-Beta-yellowgreen?style=flat-square)

_TODO_

## Components

- [Raspberry Pi Pico W](https://www.raspberrypi.com/products/raspberry-pi-pico/)
- [Waveshare 2.9 ePaper Module](https://core-electronics.com.au/waveshare-2-9inch-e-paper-module-for-raspberry-pi-pico-296x128-black-white.html)

## Installation

1. Download and load the [Micropython uf2](https://www.raspberrypi.com/documentation/microcontrollers/micropython.html) onto your Pico.
2. Install [mpremote](https://pypi.org/project/mpremote/).
3. Install external dependencies:
- `mpremote mip install urequests`
4. Copy the config file to your device: `mpremote cp config.py :`
5. Update the `config.py` file with your settings: `mpremote edit config.py`
6. Copy the display file to your device: `mpremote cp waveshare_display.py :`
7. Copy the main file to your device: `mpremote cp main.py :`
3 changes: 3 additions & 0 deletions freyr-screen/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ssid = "WIFI"
password = "PASSWORD"
base_url = "http://127.0.0.1:25712"
Loading

0 comments on commit 4357111

Please sign in to comment.