Skip to content

This is an example of using the Arduino and ASP.NET. You can use this project as the core of your Home automation / Internet of things.

Notifications You must be signed in to change notification settings

dy-sh/arduino-asp-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is an example of using the Arduino and ASP.NET.
You can use this project as the core of your Home automation / Internet of things.


The Arduino connects to the network using an Ethernet Shield.
ASP.NET project runs on a windows (IIS).
This repository contains two projects.

IRControl allows you to control any devices from the Internet.
This requires the Arduino to connect the IR Reciever and IR Transmitter.
The Arduino can memorize any code of remote control in the learning mode.

Temperature refers to the Arduino every minute, requests the temperature and humidity from DTH11 sensor and stores the data in the database.
Then you can see a nice graph of temperature and humidity.

You can use two of these projects simultaneously with a single Arduino Board.

Connect the IR Reciever to pin 5, IR Transmitter to pin 3, DTH11 to pin 2. Ethernet shield uses pins 10, 11,12,13.

In ArduinoASP_Device.ino file you need to configure the ip address of the Arduino:
IPAddress ip(192, 168, 1, 20);
IPAddress gateway(192, 168, 1, 1);

Then this IP address must be specified in the file ArduinoIRControl.cs and ArduinoTemperatureSensor.cs:
private string arduinoAddress = "http://192.168.1.20";

In Web.config files you need to specify the connection string to the SQL server:
add name="DbConnection" ... User ID=username;Password=password"

I am using hangfire to background task worked without user activity.
You need to configure IIS, otherwise the web application will be unloaded from memory spontaneously.
Instructions here: http://docs.hangfire.io/en/latest/deployment-to-production/making-aspnet-app-always-running.html

About

This is an example of using the Arduino and ASP.NET. You can use this project as the core of your Home automation / Internet of things.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published