Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/khanguslee/arduinodatalogger
Code created for placement
https://github.com/khanguslee/arduinodatalogger
Last synced: 18 days ago
JSON representation
Code created for placement
- Host: GitHub
- URL: https://github.com/khanguslee/arduinodatalogger
- Owner: khanguslee
- Created: 2017-07-30T02:34:34.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-25T23:53:23.000Z (over 6 years ago)
- Last Synced: 2024-10-02T11:41:09.659Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 96.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Arduino Data Logger
This project allows an Arduino Uno with a SW-420 tilt sensor to send a POST packet to a server. The packet contains information about:
- Machine name
- Start time
- End time
- Length time
- Whether it is day or night
- If the machine is currently activeThis project was created to log the uptime of a machine so that the customer was able to check how long their machine was in use everyday.
## Features
- Sends an HTTP POST request to a specified server
- Send an email to a specified email address after x amount of seconds the sensor has not been triggered
- Able to set day and times that the script sends you an email
- Set options on a webpage hosted by express on http://localhost:8080## Getting Started
### Hardware Required
* Arduino
* SW-420 Tilt Sensor or similar### Connecting the Tilt Sensor
Connect the Digital Out pin of the tilt sensor to Digital Pin 8 of the Arduino.### Installing StandardFirmata Library
You will need an Arduino with the standard firmata library uploaded onto it. This library is already included with the Arduino IDE.
```
File > Examples > Firmata > StandardFirmata
```
### Options Website
Options website can be accessed via http://localhost:8080## HTTP Request POST Body
### Vibration Start| Parameter | Value | Description |
| :---: | :---: | :---: |
| machine | Machine Name | Name of the machine/device |
| start_time | YYYY-DD-MM HH:MM:SS | Start time of the vibration |
| day_night | true/false | Whether the time qualifies as a day or night job |
| active | true | Tell server that machine is on |### Vibration End
| Parameter | Value | Description |
| :---: | :---: | :---: |
| machine | Machine Name | Name of the machine/device |
| end_time | YYYY-DD-MM HH:MM:SS | End time of the vibration |
| length_time | Time in seconds | Length of time the machine was on for |
| active | false | Tell server that machine is off |## Test Server
For testing, I would recommend using https://requestb.in/ to act as the receiving server.## Project History
This project was initially entirely ran on a single Arduino Mega. The Arduino Mega had multiple modules installed on it such as an Ethernet module, SD card shield, real-time clock and a tilt sensor. We removed all these modules as the power pack would cause the voltage regulator on the Arduino to overheat.Eventually, we moved to having a node.js application that can do the exact same thing whilst adding more functionality such as sending emails and hosting a website.