https://github.com/blues/notecard-pseudo-sensor-python
An API interface to pseudo sensors for testing the Blues Notecard and Notecarriers
https://github.com/blues/notecard-pseudo-sensor-python
Last synced: 5 months ago
JSON representation
An API interface to pseudo sensors for testing the Blues Notecard and Notecarriers
- Host: GitHub
- URL: https://github.com/blues/notecard-pseudo-sensor-python
- Owner: blues
- License: mit
- Created: 2021-10-15T13:29:32.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-26T16:05:40.000Z (over 4 years ago)
- Last Synced: 2026-01-14T09:12:23.168Z (5 months ago)
- Language: Python
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.mit
Awesome Lists containing this project
README
# NotecardPseudoSensor
NotecardPseudoSensor provides an API interface to the internal sensors of the [Blues Wireless Notecard](https://shop.blues.io/collections/notecard). The goal of this abstraction is to offer a sensor to use with more advanced tutorials, which enables focus on basic Notecard transactions for those new to the platform.
## Installation
With `pip` via PyPi:
```
pip install notecard-pseudo-sensor
```
or
```
pip3 install notecard-pseudo-sensor
```
## Usage
``` python
import notecard
import notecard_pseudo_sensor
# How you connect to the Notecard varies based on your platform.
# See the note below.
from periphery import I2C
port = I2C("/dev/i2c-1")
card = notecard.OpenI2C(port, 0, 0)
sensor = notecard_pseudo_sensor.NotecardPseudoSensor(card)
print(sensor.temp())
print(sensor.humidity())
```
> **NOTE**: The way you create the `port` and `card` differs based on platform. For details, check out the [`note-python` usage documentation](https://github.com/blues/note-python#usage), which contains [examples](https://github.com/blues/note-python/blob/main/examples).
## To learn more about Blues Wireless, the Notecard and Notehub, see:
- [blues.io](https://blues.io)
- [notehub.io](https://notehub.io)
- [dev.blues.io](https://dev.blues.io)
## License
Copyright (c) 2021 Blues, Inc. Released under the MIT license. See
[LICENSE](LICENSE.mit) for details.