DesignSpark Electrical Logo

Innovation for Every Engineer

  • Brought to you by
  • RS Components
  • Allied Electronics
14050561

January 10, 2017 10:35

Blind Control Using IOT-Hardware Setup (Part2)

This is part two in a series of articles where I will be showing you how to create a home automation system using Components and hardware which can be purchased from the RS Components website- For Part One - see here

Part Two - Programming

Download the Sketch below/attached ,open up the sketch and upload it onto the Arduino Board.

* Make sure to close the command window before uploading the sketch, so whenever you have an updated sketch, close the command window first.

If you do not want to keep typing (‘cayenne-ser.bat -c COM1...’) every time you open the command window. Locate ‘documents’> ‘Arduino’> ‘libraries’> ‘cayenne file’>” extras”>” Scripts” > ‘cayenne-ser’.

 Right click ‘cayenne-ser’ and go ‘edit’.

Change the COM number to the com port that your USB is connected to on your Arduino Board.

After saving it, close the notepad.

Aafter you have upload your sketch, just double click “cayenne-ser” and the command window will open automatically connecting Arduino with the Cayenne dashboard.

Lastly connect your power supply clippers to the power block you have set up on the stepper motor shield. Turn it on and test it out with the cayenne dashboard.

When you click the Forward button, the motor should rotate clockwise and when you click the Forward button again, the motor should stop running. The same is true when clicking the Backward button, the motor will run anti-clockwise, and when you click it again the motor will stop running.

You could also use your smart phone to test this out. Just download the Cayenne application, and sign in with the same account you have and test it out. But remember that because cayenne uses a computer as the main communication point, make sure the Arduino board is connected, with cayenne dashboard. So, your Command window must still be opened.

Next Part :Designing an enclosure

After everything is set up, the next part uses The DesignSpark Mechanical software to create the casing for your hardware, and the gear used to drive the blinds.

Downloads

14050561

Bio coming soon