Allows you to scan sensors connected to your machine and produce a JSON Data API response you can use for input within your own application. This is best used with our TRMNL BYOS self-hosted implementations.
-
Supports TRMNL BYOS open source self-hosted implementations.
-
Supports sensors connected to Raspberry Pi hosts.
-
Supports the following sensors:
-
SCD41 : SparkFun CO2 Humidity and Temperature Sensor.
-
AHT20: SparkFun Humidity Sensor.
-
BMP180: Adafruit Barometric Pressure/Temperature/Altitude Sensor.
-
BME280: SparkFun Atmospheric Sensor.
-
BMP388: SparkFun Pressure Sensor.
-
SHT3X: Adafruit Sensirion Temperature & Humidity Sensor.
-
HDC180: Think Robotics Gas, Temperature, and Humidity Sensor.
-
HTS221: Adafruit Temperature & Humidity Sensor.
-
MCP9808: Adafruit High Accuracy I2C Temperature Sensor.
-
To set up the project, run:
git clone https://github.com/usetrmnl/sensor_scanner
cd sensor_scanner
bin/setupTo connect sensors to your Raspberry Pi, buy these cables:
-
Flexible Qwiic Cable - Female Jumper (4-pin): Necessary to connect your Raspberry Pi to your first sensor.
-
Qwiic Cable - 50mm: Necessary to connect any number of sensors together (i.e. daisy chain). If 50mm is too short, you can also pick up 100mm, 200mm, and 500mm cables too. You’ll need one cable per sensor you wish to daisy chain.
To setup your Raspberry PI with your first sensor, follow these steps:
-
Open the Raspberry Pi Pinout in your browser. This provides a visual guide to all pin locations. Pin 1 starts at the top of your Raspberry Pi board (near the microSSD card port).
-
Connect the red cable to Pin 1 (3.3v).
-
Connect the blue cable to Pin 3 (I2C Data).
-
Connect the yellow cable to Pin 5 (I2C Clock).
-
Connect the black cable to Pin 6 (Ground).
To build for Raspberry Pi, use
bin/build💡 You can also use the Pi project to save the above as a sensor_scanner service for automatic install and configuration on your Raspberry Pi. For further examples, check out the Terminus Raspberry Pi documentation.
To contribute, run:
git clone https://github.com/usetrmnl/sensor_scanner
cd sensor_scanner
bin/setupYou can also use the IRB console for direct access to all objects:
bin/console