Skip to content
This repository has been archived by the owner on Jun 15, 2020. It is now read-only.

The rest server I use for getting sensor data from Orange Pi Zero

Notifications You must be signed in to change notification settings

michadenheijer/python-rest-sensor-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-rest-sensor-server

This is my personal project that allows me to access sensors on a Orange Pi Zero and a Raspberry Pi Zero using a REST api.

Sensors

I use the following sensors.

  • Adafruit MCP9808 (temperature)
  • Adafruit TSL2591 (light level)
  • Sparkfun SI7021 (temperature and humidity)
  • CPU temp (temperature)

Installation

Firstly, clone my project.

git clone https://github.com/michadenheijer/python-rest-sensor-server

Then make sure you have pip3 and smbus installed.

sudo apt install python3-pip, python3-smbus -y

Open my project

cd python-rest-sensor-server

Install dependencies

pip3 install -r requirements.txt

Then start the server.

python3 api.py

Your REST-server is running and you can get information by using:

curl http://localhost:5000/cpu
curl http://localhost:5000/temp
curl http://localhost:5000/lux
curl http://localhost:5000/humidity

About

The rest server I use for getting sensor data from Orange Pi Zero

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages