Giter Club home page Giter Club logo

afraz496 / luggauge Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 461 KB

This repository comprises of software developed for the 1st coursework of the Embedded Systems (EE3-24) Module at Imperial College London. An LIS3DH 3-axis accelerometer was used in tandem with an ESP8266 on a Node MCU and an LDR was also connected to the breadboard.

Home Page: https://kushdamji.wixsite.com/luggauge

License: MIT License

Python 100.00%
embedded-systems iot micro-python

luggauge's Introduction

Luggauge

An essential traveller needs to make sure that his luggauge is handled properly on his flight when he goes on vacation. To supplement this our team at Imperial College London created a smart IoT sensor that is able to use acceleration values from an accelerometer coupled with the added use of an LDR to broadcast impact values (above a certain threshold) and times when the suitcase was opened (light was shined on the LDR).

This repository includes all of the software required for the development of the IoT sensor. It assumes that any user has the following material:

  • An LIS3DH 3 axis (by default) Accelerometer. <----click me

  • An ESP8266 on a Node MCU. <-----click me

  • A light dependent resistor.

  • x6 Jumper Cables.

  • A USB to serial connection for the Node MCU to a laptop (included with the Node MCU on purchase).

  • A 4k7 ohms resistor, used as a potential divider for the LDR.

  • An LED (To indicate statuses of time retrieval from a broker and pushing of data to the web).

Usage

To utilise any elements of this repository you must have some familiarity with Git and Terminal.

Begin with a git clone of the repository by:

$ git clone https://github.com/Afrazinator/Luggauge.git

Then navigate into the repository with:

$ cd Luggauge

If you type:

$ ls

You will see all of the files:

  • main.py (the brains behind the code, which does everything. Reads the values and sends them to an MQTT Broker)
  • formattime.py (Displays the date and time as hh:mm:ss dd/mm/yy)
  • manipulatingdata.py (Performs a standardisation of the acceleration values and returns them in m/s^2)

All of these files need to be present on the NodeMCU. In fact the NodeMCU has a nifty feature which allows it to execute the 'main.py' file on startup. So after adding these files to the NodeMCU using a serial connection, the NodeMCU interfaced with the Accelerometer and an LDR should send the acceleration values to an MQTT Broker.

A good review of the board setup is available in this repository under 2 JPEG files that illustrate the correct connections that must be made.

To change the MQTT Broker you must examine the relevant line in 'main.py' which includes the method sta_if.connect('EEERover','exhibition') where the relevant params are sta_if.connect('NAME','PASSWORD')

Dependencies

None are required as upython once installed on the NodeMCU should include all of the relevant and required libraries.

luggauge's People

Contributors

afraz496 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.