Arduino 433mhz RF Network Controller

From SifWiki
(Difference between revisions)
Jump to: navigation, search
Line 4: Line 4:
 
The sketch can be checked out of GitHub by [https://github.com/Siftah/Wiki/ clicking this link]: [https://github.com/Siftah/Wiki/ https://github.com/Siftah/Wiki/].
 
The sketch can be checked out of GitHub by [https://github.com/Siftah/Wiki/ clicking this link]: [https://github.com/Siftah/Wiki/ https://github.com/Siftah/Wiki/].
  
== Usage ==
+
== Arduino Setup ==
 
In order to use the sketch, you will need to have an Arduino with a 433mhz sender connected to pin 10 (by default, but configurable in the sketch).
 
In order to use the sketch, you will need to have an Arduino with a 433mhz sender connected to pin 10 (by default, but configurable in the sketch).
  
The sketch also makes use of an "[http://dx.com/p/66908?Utm_rid=65939668&Utm_source=affiliate Arduino Ethernet Shield v1.1]" using the ENC28J60 chipset. These are about the cheapest way of connecting an Arduino to ethernet and you can pick up the shield for less than $10 (€8) from [http://dx.com/p/66908?Utm_rid=65939668&Utm_source=affiliate Deal Extreme].
+
The sketch also makes use of an "[http://dx.com/p/66908?Utm_rid=65939668&Utm_source=affiliate Arduino Ethernet Shield v1.1]" using the ENC28J60 chipset. These are about the cheapest way of connecting an Arduino to ethernet and you can pick up the shield for less than $10 (€8) delivered from [http://dx.com/p/66908?Utm_rid=65939668&Utm_source=affiliate Deal Extreme].
 +
 
 +
I'm using the Jee Labs library, available here; [https://github.com/jcw/ethercard https://github.com/jcw/ethercard]
 +
 
 +
The script also makes use of the RCSwitch library, available here; [https://code.google.com/p/rc-switch/ https://code.google.com/p/rc-switch/]
 +
 
 +
== To Use ==
 +
In order to call the Arduino and ask it to change the status of a connected device, you simply need to send a UDP packet to the Arduino with the command embedded. A simple way to do this from a Linux command line is using [http://nmap.org/ncat/ ncat], which you'll likely already have installed.
 +
 
 +
Example to turn my heating off;
 +
echo heat:0:|ncat -u 192.168.1.99 1337 --send-only
 +
 
 +
"--send-only" is needed so the command exits back to the command line. You'll also notice I added an additional ":" at the end of the command to ensure the Arduino doesn't parse the string as having a linebreak at the end.

Revision as of 12:02, 7 May 2014

Overview

As per the work on this page and the overview here, I have created a generic Arduino sketch which allows control of various 433mhz devices from a network connected Arduino.

The sketch can be checked out of GitHub by clicking this link: https://github.com/Siftah/Wiki/.

Arduino Setup

In order to use the sketch, you will need to have an Arduino with a 433mhz sender connected to pin 10 (by default, but configurable in the sketch).

The sketch also makes use of an "Arduino Ethernet Shield v1.1" using the ENC28J60 chipset. These are about the cheapest way of connecting an Arduino to ethernet and you can pick up the shield for less than $10 (€8) delivered from Deal Extreme.

I'm using the Jee Labs library, available here; https://github.com/jcw/ethercard

The script also makes use of the RCSwitch library, available here; https://code.google.com/p/rc-switch/

To Use

In order to call the Arduino and ask it to change the status of a connected device, you simply need to send a UDP packet to the Arduino with the command embedded. A simple way to do this from a Linux command line is using ncat, which you'll likely already have installed.

Example to turn my heating off;

echo heat:0:|ncat -u 192.168.1.99 1337 --send-only

"--send-only" is needed so the command exits back to the command line. You'll also notice I added an additional ":" at the end of the command to ensure the Arduino doesn't parse the string as having a linebreak at the end.

Personal tools
Namespaces

Variants
Actions
Navigation
Tools
Google AdSense