USB Host Relay board: Keyboard example

 
 
 
 
 


 

Example control relays using USB Keyboard.

For project you need USB Host Relay board, 12VDC power and USB Keyboard.

Select from Tools -> Arduino AVR Boards -> Arduino Mega ADK

Then select com port.

After upload sketch when you press key '8' first relay turn ON, when press key '2' turn OFF.

 

 


Using keyboard you can control all relays using one key, or using combinations.

Some ideas:
-   When you type "1234" and ENTER this to turn ON relay 1. Using this you can make simple Door Opener.
-   When you press "1" board execute combination for simple automation. Turn ON relay 1, after 10 sec turn OFF and turns ON relays 2 and 3… When you press button "2" this run other combination.
-   Build universal relay timer. When you type "45" and ENTER relay 1 turn ON and turn OFF after 45 seconds
-   and many more

 
 
Downloads:
Example code
 
Library:
Tools -> Manage Libraries and search for "USB Host Shield Library 2.0"
 
 
 
Library from GitHub:
 
Read 8739 times