Skip to content

TomasGiS/IOT_senseHat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

IOT_senseHat

The raspeberry pi Hat used in this example is the Sense Hat. The Sense Hat has several sensors on it:

  • Humidity
  • Pressure
  • Temperature
  • Compass

Also the sense Hat has:

  • a led matrix
  • a joystick (not used in that example)

This project has two parts:

The hardware used on the Rest server are:

  • Humidity
  • Pressure
  • Temperature

Project dependencies

The project use the python module sense_Hat that you can install on debian:

sudo apt-get install sense-Hat

Also, this project use web.py as a web server for building an API rest.

pip install web.py

How to use

To start the web server

python rest_server.py [PORT]

The web server automatically starts using your private ip and not the local host. The default port is 8080

The Rest server has 4 calls:

  • humidity
  • pressure
  • temperature
  • all_sensors

For example

http://ip:8080/humidity

The response is in JSON format:

{"code":200,"status":"ok","sensor":"[type_sensor]","value":[sensor_reading_value]}

About

The project was created for a workshop about IoT at the event HackURV . This project is using a raspberry pi with sense HAT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published