All Projects → ericbenwa → POST-Arduino-Data-Wireless

ericbenwa / POST-Arduino-Data-Wireless

Licence: other
A simple way to send data from an Arduino and save it to a database (MySQL) over WiFi.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to POST-Arduino-Data-Wireless

DigiOS
Mini OS emulator for Digispark (an Attiny85 based microcontroller).
Stars: ✭ 46 (+6.98%)
Mutual labels:  arduino-sketch
ESPShaker
ESP8266 interactive serial command processor via Arduino core.
Stars: ✭ 24 (-44.19%)
Mutual labels:  arduino-sketch
BadUSB
Personal implementation of the BadUSB exploit with an Atmel 8-bit AVR ATTiny85 acting as a HID keyboard
Stars: ✭ 63 (+46.51%)
Mutual labels:  arduino-sketch
Arduino-Beginners-EN
Code repository for the "Arduino for beginners" YouTube videos
Stars: ✭ 27 (-37.21%)
Mutual labels:  arduino-sketch
arduino-primo-tutorials
Here some tutorials to explain and show how to make use of the new features of the Arduino Primo and Arduino Primo Core, such as Wifi, BLE, NFC, InfraRed and various sensors. Hope you can find this helpful to create amazing stuff, save the planet or make a cool project to look smart at the dinning table with your uncles.
Stars: ✭ 12 (-72.09%)
Mutual labels:  arduino-sketch
Doorbell-via-Wemos-and-optocoupler
Digital version of my "analog" doorbell project to determine if the doorbell was pressed.
Stars: ✭ 55 (+27.91%)
Mutual labels:  arduino-sketch
Arduino
🚀 Proyectos de todo tipo para arduino utilizando sus sensores y actuadores. 🤖
Stars: ✭ 27 (-37.21%)
Mutual labels:  arduino-sketch
arduino-projects
Arduino Sketches
Stars: ✭ 22 (-48.84%)
Mutual labels:  arduino-sketch
arduino-id-guard
Tiny library to avoid deploying your sketch to wrong device.
Stars: ✭ 21 (-51.16%)
Mutual labels:  arduino-sketch
Magic-Leap-Gesture-IoT-Example
Control lights in the physical world from the augmented world using hand gestures. Using Magic Leap Hand Poses (Gestures) and PubNub.
Stars: ✭ 18 (-58.14%)
Mutual labels:  arduino-sketch
Sim800L-Arduino-Library-revised
HIGH SCHOOL PROJECT - The purpose of this Arduino library is to allow the use of the SIM800L module in a simple and transparent way.
Stars: ✭ 81 (+88.37%)
Mutual labels:  arduino-sketch
coro2sens
Build a simple device that warns if CO₂ concentration in a room becomes a risk for COVID-19 aerosol infections.
Stars: ✭ 32 (-25.58%)
Mutual labels:  arduino-sketch
OpenSimButtonBox
Modular Open Sim Racing Buton Box
Stars: ✭ 33 (-23.26%)
Mutual labels:  arduino-sketch
Regulator
DIY Arduino consumption regulator build to use excess solar power for auxiliary 'summer' heating. The solar power data are retrieved over SunSpec Modbus TCP. IoT monitoring with Blynk and local Web server.
Stars: ✭ 32 (-25.58%)
Mutual labels:  arduino-sketch
good-arduino-code
Frontend for goodarduinocode.com - A curated collection of Arduino coding examples
Stars: ✭ 22 (-48.84%)
Mutual labels:  arduino-sketch
azure-iothub-pubsub-esp8266
Using Arduino PubSub library with Azure IoT Hub on an ESP8266
Stars: ✭ 17 (-60.47%)
Mutual labels:  arduino-sketch

POST-Arduino-Data-Wireless

In less than 60 minutes, this repo will give you the ability to record data on the Arduino, wirelessly send (POST) and store that data into a MySQL database, and then retrieve and display that data in the browser.

Items You'll Need

Arduino (Uno or similar)
Arduino WiFi Shield
USB cable for Arduino

Getting Started

Setup MySQL Database

  1. Create MySQL Database (I used my web hosts GUI)
  2. Create MySQL User
  3. Give newly created MySQL User access to your newly created MySQL Database
  4. Give newly created MySQL User full privileges to your newly created MySQL Database
  5. Create a table for your database (I used my web hosts phpMyAdmin GUI)
  6. Add 2 columns to your table: yourdata, timestamp
  7. For timestamp column, change the type to DATETIME and the index to PRIMARY

Edit INSERT script

  1. Download insert_mysql.php
  2. Edit the $username, $password, $database, and $tablename to match your setup
$username = "test_user";
$password = "test_password";
$database = "test_db_name_here";
$tablename = "test_table_name_here";
$localhost = "localhost";
  1. Upload insert_mysql.php to your web host (remember this URL for later)

POST Arduino data to MySQL Database

  1. Download arduino_post/arduino_post.ino
  2. Edit yournetwork (wireless network name) and yourpassword (wireless password) to connect to your router
char ssid[] = "yournetwork";  // wireless network name
char password[] = "yourpassword"; // wireless password
  1. Edit www.yourdomain.com (for char server[]) to the domain you are hosting insert_mysql.php (not the full path to the file)
char server[] = "www.yourdomain.com"; // This could also be 192.168.1.18/~me if you are running a server on your computer on a local network.
  1. Edit the POST url to match the path to insert_mysql.php
client.println("POST /insert_mysql.php HTTP/1.1");
  1. Edit www.yourdomain.com for ("Host: www.yourdomain.com"); to the domain you are hosting insert_mysql.php (not the full path to the file)
  2. Connect the Arduino WiFi shield to your Arduino
  3. Connect your Arduino to your computer using your USB cable
  4. Upload your sketch to your Arduino
  5. You should now be POSTing data from your Arduino to your MySQL database. Yippee!

Edit DISPLAY script

  1. Download display_mysql.php
  2. Edit the $db_user, $db_pwd, $database, and $table to match your setup
$db_user = 'yourdbuser';
$db_pwd = 'yourpassword';
$database = 'yourdatabase';
$table = 'yourtable';
  1. Upload display_mysql.php to your web-host (remember this URL for later)
  2. You should now be able to view your database in the browser

Enhancements

POST multiple data points into database
Update Strings in arduino_post

Credits

Dhaval Karwa
Ben Salinas
Tom Igoe's WiFiWebClientRepeating sketch
Display MySQL Tutorial
1% to me.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].