Introduction: Export Data From Arduino to Excel Sheet

Picture of Export Data From Arduino to Excel Sheet

Many times i thought of a system that will track a sensor readings for specific time and save that data for future analysis after doing the same task for several days.

So i make a system using the arduino and the amazing 1sheeld to save a LDR readings in an excel sheet and that is what we are going to do now.

LDR is an acronym for "light dependent resistor" as it's a resistance but it's value changed with light in the environment.

*1Sheeld is a platform for Arduino that allows you to tap into your smartphone's sensors and capabilities and lets you use them in your Arduino projects.

Basically, It is a hardware shield that sits on top of your Arduino board and communicates over Bluetooth to this Android app, to transfer data between it and your smartphone.

You can check all 1sheeld's tutorials which will take you from the early beginning into more and more advanced projects from that link ." http://1sheeld.com/tutorials/ "

and you can order it from here " http://1sheeld.com/buy/ ".

Step 1: Needed Materials

Picture of Needed Materials

1x Arduino board

1x 1sheild board

1x LDR

3x jumpers

1x 10k resistance

1x Small bread board

1x Android phone

Step 2: Connect the 1sheeld Over the Arduino

Picture of Connect the 1sheeld Over the Arduino

Step 3: Download 1sheeld Library

Picture of  Download 1sheeld Library

You need to download and place 1sheeld library from here:-
https://github.com/Integreight/1Sheeld-Arduino-Li...

And then extract it to the location in libraries of arduino.

Step 4: Install 1sheeld App

Picture of Install 1sheeld App

Install 1Sheeld application on your android phone from here:-


" http://1sheeld.com/downloads/ "

Step 5: Design the Schematic of the Hardware

Picture of Design the Schematic of the Hardware

Step 6: Upload the Code to the Board

#define CUSTOM_SETTINGS

#define INCLUDE_CLOCK_SHIELD

#define INCLUDE_DATA_LOGGER_SHIELD

/* Include 1Sheeld library. */

#include

/* Define the ldr on pin A0. */

#define LDR A0

/* Define some variables for the time and ldr. */

int hour, minute, second, ldr;

/* Boolean to start logging. */

bool startFlag = false;

void setup(){

/* Start communication. */

OneSheeld.begin();

/* Save any previous logged values. */

Logger.stop();

/* Start the clock shield. */

Clock.queryDateAndTime();

}

void loop(){

/* Always get the time. */

hour = Clock.getHours();

minute = Clock.getMinutes();

second = Clock.getSeconds();

ldr = analogRead(LDR);

/* check If the seconds reaches zero. */

if (second == 0){

/* First insure to save previous logged values. */

Logger.stop();

/* Set a delay. */

OneSheeld.delay(500);

/* Start logging in a new CSV file. */

Logger.start("LDR values");

/* Set startFlag. */

startFlag = true;

}

/* Check logging started. */

if(startFlag) {

/* Add brightness level values as a column in the CSV file. */

Logger.add("Brightness",ldr);

Logger.log();

/* Delay for 2 seconds. */

OneSheeld.delay(2000);

}

}

Comments

mierta (author)2016-06-18

This is useful for data logging

About This Instructable

8,202views

178favorites

License:

More by ahmed-ismail:Export data from arduino to excel sheet Arduino report robbery with a photo on twitter using 1sheeld1sheeld control music volume and led bar with slider
Add instructable to: