Close
0%
0%

Sensorian IoT Dashboard

Monitor ambient light, temperature, barometric pressure and altitude via your browser.

dhqdhq
Similar projects worth following
This project outlines how to build a sensor dashboard with Raspberry Pi and the Sensorian shield. Any version of Raspberry Pi is sufficient provided a WIFI dongle or Ethernet cable is used for network access. The Sensorian Python libraries will be used to build the dashboard. The dashboard in itself relies on the Flask framework to expose all the live data from the ambient light and the temperature/barometer/altimeter sensor.

Sensor data are saved in JSON format. On the client side we have a simple HTML file that uses Ajax to update the graph by continuously unpacking the JSON data and updating the graph .

Once the server is running the user can access the dashboard by visiting

http://RPI-ADDRESS:port/Sensorian

where RPI-ADDRESS is the Ethernet or WFI address depending on which network interface is used and (port) is the specific port the user selects from Flask.

The screenshot above shows the dashboard data updating in real time.

@app.route('/Sensorian')
def readMPL():
    sensor.I2C_Initialize(altibar.MPL3115A2_ADDRESS)    #initialize I2C and BCM library
    AltiBar = altibar.MPL3115A2()                #initialize sensor
    time.sleep(0.5)
    AltiBar.ActiveMode()                        #puts sensor in active mode
    time.sleep(0.5)
    temperature = AltiBar.ReadTemperature()
    time.sleep(0.5)
    AltiBar.AltimeterMode()
    time.sleep(0.5)
    altitude =  AltiBar.ReadAltitude()        #Take a pressure reading
    time.sleep(0.5)
    AltiBar.BarometerMode()    #puts sensor in active mode
    time.sleep(0.5)
    baroPressure =  AltiBar.ReadBarometricPressure()        #Take a pressure reading

This basic example can be further expanded by using SQL to save the data locally or in the cloud.

  • 1 × Sensorian Sensorian Raspberry Pi shield
  • 1 × Raspberry Pi V1/V2/A/B/B+ Raspberry Pi

  • 1
    Step 1

    Simply plug in the Sensorian shield on top of Raspberry Pi.


  • 2
    Step 2

    Clone the demo from GITHUB


  • 3
    Step 3

    Run with

    sudo python App.py

View all 5 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates