From 41654932e53dc84a5c18c79f2f11d46a10147291 Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Sat, 12 Sep 2026 16:57:33 -0400 Subject: [PATCH] Adding shell script to more easily install the app --- README.md | 4 +++- install.sh | 13 +++++++++++++ package.json | 5 +++++ pyproject.toml | 2 +- 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100755 install.sh create mode 100644 package.json diff --git a/README.md b/README.md index fa01313..40f6fc4 100644 --- a/README.md +++ b/README.md @@ -46,13 +46,15 @@ These are not necessary to run the app, but can be useful for testing and/or fla 1. This has been tested with MicroPython 1.29, but other versions should work. 4. Clone this git repository: `git clone https://git.metaunix.net/BitGoblin/pico-time`. 5. `cd` into the repo: `cd pico-time`. -6. Install Python dependencies via mpremote: `xargs mpremote mip install < requirements.txt`. +6. Install Python dependencies via mpremote: `mpremote mip install ./package.json`. 7. Copy `config.example.py` to `config.py` and edit the settings to match your environment. 8. Copy the Python code over to the Pico: 1. `mpremote cp main.py :main.py` 2. `mpremote cp config.py :config.py` 9. Reset the Pico: `mpremote reset` +There's also `./install.sh` if you'd like to run steps 6-9 more quickly. + If it worked you should see the display show a message about connecting to WiFi, then eventually a readout of the current temperature to the SSD1306 display. If it failed, you can monitor the app via `mpremote repl` or using an IDE like [Thonny](https://thonny.org/). ## License diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..964b9aa --- /dev/null +++ b/install.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +APP_FILES=('main.py' 'config.py') +APP_PACKAGES='./package.json' + +# Copy required files +mpremote cp "${APP_FILES[@]}" : + +# Install dependencies +mpremote mip install ./package.json + +# Reset the pico +mpremote reset diff --git a/package.json b/package.json new file mode 100644 index 0000000..b0d2c8f --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "deps": [ + ["ssd1306", "0.1.0"] + ] +} diff --git a/pyproject.toml b/pyproject.toml index 138bd9f..b0b3894 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ authors = [ ] [tool.ruff] -target-version = "py311" +target-version = "py312" line-length = 100 [tool.ruff.lint]