Skip to content

Scans locally connected sensors and produces an API response for further processing.

License

Notifications You must be signed in to change notification settings

usetrmnl/sensor_scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sensor Scanner

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.

Features

  • 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.

Requirements

  1. C.

  2. Ruby (for setup and CI).

Setup

To set up the project, run:

git clone https://github.com/usetrmnl/sensor_scanner
cd sensor_scanner
bin/setup

To 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:

  1. 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).

  2. Connect the red cable to Pin 1 (3.3v).

  3. Connect the blue cable to Pin 3 (I2C Data).

  4. Connect the yellow cable to Pin 5 (I2C Clock).

  5. Connect the black cable to Pin 6 (Ground).

Usage

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.

Development

To contribute, run:

git clone https://github.com/usetrmnl/sensor_scanner
cd sensor_scanner
bin/setup

You can also use the IRB console for direct access to all objects:

bin/console

Tests

To test, run:

bin/rake

Credits

About

Scans locally connected sensors and produces an API response for further processing.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Contributors