Home Automation with Arduino MKR1000 and Windows 10




Home Automation through Wi-Fi connectivity (Arduino MKR1000) and Windows 10.

Home Automation with Arduino MKR1000 and Windows 10

Things used in this project

Hardware components

Arduino MKR1000
Arduino MKR1000
× 1
Relay (generic)
Input: 3V
× 1
General Purpose Transistor NPN
General Purpose Transistor NPN
× 1
1N4007 – High Voltage, High Current Rated Diode
1N4007 – High Voltage, High Current Rated Diode
× 1
Resistor 10k ohm
Resistor 10k ohm
× 1
3.3k Ohm
× 1
Breadboard (generic)
Breadboard (generic)
× 1
Jumper wires (generic)
Jumper wires (generic)
× 1
Insulation Tape
× 1

Software apps and online services

Visual Studio 2015
Microsoft Visual Studio 2015
Arduino IDE
Arduino IDE

Story

Developing the Universal Windows App

For this part you will need to download and install Microsoft Visual Studio Community Edition.

  • Open Microsoft Visual Studio and create a new project (File -> New -> Project…). Then from the menu on the left choose Visual C# (It is located under Installed -> Templates) and click Blank App (Universal Windows). Give it a name (e.g. HomeAutomation) and click OK.

Screenshot_4

  • Go to “Package Manager Console”, write install-package ‘windows-remote-arduino’ and press Enter to add Windows Remote Arduino to your project.

Screenshot_5

  • From the “Solution Explorer” right click Package.appxmanifest and choose View Code. Under the Capabilities tag add Capabilities “internetClientServer” and “privateNetworkClientServer”.
<Capabilities>
    <Capability Name="internetClientServer" />
    <Capability Name="privateNetworkClientServer" />
</Capabilities>
  • Open MainPage.xaml in order to create the User Interface. From the Toolbox drag and drop as many ToggleSwitches as the number of the devices you want to control. For each one you need to edit the properties. So under the Properties tab, give the toggle switch a Name (e.g. lightBulb), under “Common” edit the Header (e.g. Light Bulb). Then switch tab by clicking the Event handlers button and fill in the “Toggled” cell with an appropriate method name (e.g. lightBulb_Toggled). For this part you should use a specific format in all your toggle switches in order to have homogeneity.
READ  Control the Position of a Continuous Rotation Servo via WiFi

ToggleSwitch format2

Extending the Project

In order to control more devices follow this schematic:

For each device you will need a relay, an NPN transistor, a 10k ohm and a 3.3k ohm resistor as well as a diode.

Schematics

Code

Home Automation using Arduino MKR1000 and Windows 10 — Read More

 




Leave a Comment

*
= 4 + 9

(Spamcheck Enabled)

Read previous post:
SOMO-II MP3 Player
SOMO-II MP3 Player

The Sound Module-II or the SOMO-II is a small and efficient audio module from 4D Systems that is able to...

Close
Scroll to top