Arduino C# – HOME automation with pc and arduino (Open Source)

Hello world! Today i made a Open Source C# Windows application to control 8 relays, in the video i just used 4 relays because my 8 channel relays are in use. The code for arduino and the C# code are both coded to control 8 relays, you can add more yourself if you like because the source is open to modify.
The arduino code is very simple, You just build the arduino device upload the code and plug it into the usb, choose the com port on the windows app and connect it.

(I used visual studio 2013 for this.)

Files you modify in the C# source are the following.

To modify the look of the Application you simply double click on Form1.cs and the Form1.cs [Design] should pop up. You can now drag and drop buttons and whatever you want from the toolbox, and change background in the properties etc.
If adding a button for example, double click the button to give it a function, Double clicking it will bring you to the part of the code that belongs to the button. I made a few buttons that direct to my FB, instructables and YouTube channel as example.
You can find it at the bottom in Form1.cs

You can also change the about box by double clicking on the about box AboutBox1.cs, You can change background, font, colors etc.

To change company name, version etc. you can double click Properties in the [solution explorer]. And then at [application] click on [assembly information], you can also modify AssemblyInfo.cs directly.

Check the next steps for the source of the C# Windows app
and The arduino Parts list, Schematic and code.


Home automation c# arduino
Home automation c# arduino

Parts list.
1. Arduino Mega.
2. LCD Shield
3. 8 single relays or 8 channel relays.
4. Jumper wire set
5. Solderless BreadBoard
6. Lamp with lamp socket (optional)
7. BlueCore-Tech_Home_Automation.exe (no need to build if you don’t want to)
8. Visual Studio (for building your own app)
(There are active HIGH and Active LOW 8 channel relays, you might need to make small changes to the arduino code which is as easy as changing LOW to HIGH in the code)

You can find it at line 267 void turnLedOn(int pin)

and line 272 void turnLedOff(int pin)

Download the Windows app and C# Source code Below:
Download source.(zipped)

Arduino Code:

Subscribe to my ​YouTube channel for more projects!
Buy sensors here:

Danny van den Brande

Programmer, Game Designer, 3D Designer, Web Designer, Graphic Designer. Jup this website looks crappy.. :) But enjoy the projects! Everything you need is here.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.