Arduino+C#App+OneDrive Cloud=IOT

by Dynofighter in Circuits > Microsoft

6650 Views, 26 Favorites, 0 Comments

Arduino+C#App+OneDrive Cloud=IOT

1.png

An Arduino Temperature Control System managed whit C# App & one
drive cloud.

this demonstration is a project that detecting Temperature
and print et on a LCD via C# "windows form Application" by making
your own Temperature data-base and Upload it to windows One Drive cloud and download it from One Drive cloud
any time any were and making your (Temperature data-base)

And........ BINGO you are into IOT (internet of things)

PS: the point of this instractabel is NOT just teaching you
how to make a weather station …. But give you the tools to develop your skills
in code and bring you to the world of “internet of things” with no need to an expansive
tools like (Intel Galileo, Intel Edison, raspberry pi….)

Just an Arduino and a collection the greatest Microsoft
developer tools ever :D

If you are not familiar whit C# and control Arduino whit it I
Healy recommend this (Microsoft virtual Academy) courses.

- http://www.microsoftvirtualacademy.com/training-courses/programming-robotic-systems-with-visual-studio

- http://www.microsoftvirtualacademy.com/training-courses/c-fundamentals-for-absolute-beginners

you
just need to sing in and let the learn begin
;)

The System Design

2.png

-There is 2 spare part in this project: Arduino & software.

The Arduino:

3.png

We will need:

1 - Arduino (UNO) board

2 - Wires.

3 - LCD screen 16 * 2(liquid Crystal)

4 - Temperature sensor (LM35)

5 - Potentiometer

6 - Bread board

The Software

4.jpg
5.jpg

Software:

- Microsoft windows (7 / 8 / 8.1) Operating System

- Arduino IDE

- Visual studio community 2013 (recommended)

This is the link for download it:

https://www.visualstudio.com/products/visual-studio-community-vs

- One Drive cloud

Connect the Arduino

6.png
7.png

We connect the LCD and the heat sensor with Arduino as follows:

the Heat Sensor in the Roof

8.jpg
9.jpg

Putting the heat sensor in the roof for detecting the temperature

Connecting the Wire

10.jpg
11.png

Connecting the wire to the Arduino into your room

.

.

.

and Connecting the wire to Arduino

The (Arduino) Code

#include

int sensorValue = 0;

byte num[2] = {0, 0};

int cel = 0;

LiquidCrystal lcd(12,
11, 5, 4, 3, 2);

void setup() {

lcd.begin(16, 2);

Serial.begin(9600);

//clearScreen();

lcd.setCursor(0, 1);

// put your setup code here, to run once:

}

void loop() {

gettemp();

Serial.println(cel);

/*while(Serial.available()>0)

{

Serial.readBytes(num,Serial.available());

Serial.write(cel);

}

*/

// delay(1000);

//clearScreen();

while (Serial.available() > 0)

{

//clearScreen();

lcd.print(char(Serial.read()));

//delay(1000);

}

//lcd.print("hello:");

//clearScreen();

//delay(1000);

// put your main code here, to run
repeatedly:

}

void gettemp()

{

sensorValue = analogRead(A0) ;

cel = (sensorValue * 0.0049) * 100 ;

}

void clearScreen()

{

lcd.setCursor(0, 0) ;

lcd.print(" ") ;

lcd.setCursor(0,
1);


lcd.print("
") ;

}// end clear code

//////////////// And then copy the code on the Arduino, and keep USB link connected to the board /////

The C# Application

Download the App to your computer

from my cloud : https://onedrive.live.com/redir?resid=61CA31D2FB412DBC%21794

One Drive Account

onedrive.jpg

Go to your pc setting and log whit your Microsoft account

.....

13.png
14.png
15.png
16.png
17.png
18.png

And automatically the Operating system will create your (one drive)

Folder that will sync automatically to the cloud

PS: One Drive give you 15GB of free space in the clouds ;)

Starting the App

19.png
20.png

And then test the App by clicking the file solution

After you open the App click (ctrl+F5) to debug

Share Your Date

21.png
22.png
23.png

(After you finish collecting data the App will create & upload the file automatically)

:D

24.jpg
25.jpg

photo of the LCD controlled by the App