diff --git a/README.md b/README.md index c1ebbc5..eac2489 100644 --- a/README.md +++ b/README.md @@ -5,41 +5,74 @@ [![PyPi Package](https://img.shields.io/pypi/v/weatherhat.svg)](https://pypi.python.org/pypi/weatherhat) [![Python Versions](https://img.shields.io/pypi/pyversions/weatherhat.svg)](https://pypi.python.org/pypi/weatherhat) -# Pre-requisites +Weather HAT is a tidy all-in-one solution for hooking up climate and environmental sensors to a Raspberry Pi. It has a bright 1.54" LCD screen and four buttons for inputs. The onboard sensors can measure temperature, humidity, pressure and light. The RJ11 connectors will let you easily attach wind and rain sensors. It will work with any Raspberry Pi with a 40 pin header. -This library requires Python ≥3.6 so we'd recommend using it with Raspberry Pi OS Buster or later. +## Where to buy -You must enable: +* [Weather HAT](https://shop.pimoroni.com/products/weather-hat-only) +* [Weather HAT + Weather Sensors Kit](https://shop.pimoroni.com/products/weather-hat) -* i2c: `sudo raspi-config nonint do_i2c 0` -* spi: `sudo raspi-config nonint do_spi 0` +# Installing -You can optionally run `sudo raspi-config` or the graphical Raspberry Pi Configuration UI to enable interfaces. +We'd recommend using this library with Raspberry Pi OS Bookworm or later. It requires Python ≥3.6. -# Installing +## Full install (recommended): + +We've created an easy installation script that will install all pre-requisites and get your Weather HAT +up and running with minimal efforts. To run it, fire up Terminal which you'll find in Menu -> Accessories -> Terminal +on your Raspberry Pi desktop, as illustrated below: + +![Finding the terminal](http://get.pimoroni.com/resources/github-repo-terminal.png) + +In the new terminal window type the commands exactly as it appears below (check for typos) and follow the on-screen instructions: + +```bash +git clone https://github.com/pimoroni/weatherhat-python +cd weatherhat-python +./install.sh +``` + +**Note** Libraries will be installed in the "pimoroni" virtual environment, you will need to activate it to run examples: -Stable library from PyPi: +``` +source ~/.virtualenvs/pimoroni/bin/activate +``` + +## Development: + +If you want to contribute, or like living on the edge of your seat by having the latest code, you can install the development version like so: + +```bash +git clone https://github.com/pimoroni/weatherhat-python +cd weatherhat-python +./install.sh --unstable +``` + +## Install stable library from PyPi and configure manually + +* Set up a virtual environment: `python3 -m venv --system-site-packages $HOME/.virtualenvs/pimoroni` +* Switch to the virtual environment: `source ~/.virtualenvs/pimoroni/bin/activate` +* Install the library: `pip install weatherhat` -* Just run `pip3 install weatherhat` +In some cases you may need to us `sudo` or install pip with: `sudo apt install python3-pip`. -In some cases you may need to use `sudo` or install pip with: `sudo apt install python3-pip` +This will not make any configuration changes, so you may also need to enable: -Latest/development library from GitHub: +* i2c: `sudo raspi-config nonint do_i2c 0` +* spi: `sudo raspi-config nonint do_spi 0` -* `git clone https://github.com/pimoroni/weatherhat-python` -* `cd weatherhat-python` -* `./install.sh --unstable` +You can optionally run `sudo raspi-config` or the graphical Raspberry Pi Configuration UI to enable interfaces. -Some of the examples use additional libraries. You can install them with: +Some of the examples have additional dependencies. You can install them with: ```bash -pip3 install fonts font-manrope pyyaml adafruit-io numpy +pip install fonts font-manrope pyyaml adafruit-io numpy pillow ``` -You may also need to install `libatlas-base-dev` +You may also need to install `libatlas-base-dev`: ``` -sudo apt-get install libatlas-base-dev +sudo apt install libatlas-base-dev ``` # Using The Library