pericent67 / homeeasyhacking

Automatically exported from code.google.com/p/homeeasyhacking
0 stars 0 forks source link

TX a message? #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Can you explain how to TX a message with the latest update of the lib please?
Your use of interrupts is a bit over my head!!

The 2nd problem I have is that as far as I can see you TX on pin 13.  The
problem I have is I want to use this with the Ethernet Shield which already
uses the same pin.  Is it possible to change the lib to use a different pin?

Original issue reported on code.google.com by dgrhous...@gmail.com on 1 Apr 2010 at 10:28

GoogleCodeExporter commented 8 years ago
From r22 onwards, there is a now degree of configurability for the transmission 
pin.  We use PORTB, so you must choose a pin on that PORT (PB*) from http://
www.arduino.cc/en/Hacking/PinMapping168

To configure the transmitter data pin, define HETXPIN to the pin of choice from 
PB*

The following snippet demonstrates sending a simple message :

-- BEGIN SNIPPET --

#include "HomeEasy.h"

HomeEasy homeEasy;

void setup()
{
    homeEasy = HomeEasy();
        homeEasy.init();
        int house = 1; // Represents the rotary dial on simple remotes, 0 = A ... 15 
= P
        int unit = 1; // The unit number, 0 - 15
        int isOn = 1; // 1 = On, 0 = Off
        homeEasy.sendSimpleProtocolMessage(sender, recipient, isOn);
}

-- END SNIPPET --

Original comment by lstg7...@gmail.com on 21 Apr 2010 at 5:29