Skip to content

Instantly share code, notes, and snippets.

@Osmosis311
Created April 27, 2014 03:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Osmosis311/96a8a946448ae95919a2 to your computer and use it in GitHub Desktop.
Save Osmosis311/96a8a946448ae95919a2 to your computer and use it in GitHub Desktop.
X10_H
/* Arduino interface to the CM17A Wireless X10 'Firecracker' dongle.
BroHogan 7/19/08
DaveK AC0KG Dec/08
*/
#ifndef X10Firecracker_h
#define X10Firecracker_h
#include <stdint.h>
enum HouseCode { hcA, hcB, hcC, hcD, hcE, hcF, hcG, hcH,
hcI, hcJ, hcK, hcL, hcM, hcN, hcO, hcP };
enum CommandCode { cmdOn, cmdOff, cmdBright, cmdDim };
class X10Firecracker {
public:
int RTS_pin; // RTS line for C17A - DB9 pin 7
int DTR_pin; // DTR line for C17A - DB9 pin 4
int Bit_delay; // mS delay between bits (0.5mS min.)
X10Firecracker();
void init( int RTS_Pin, int DTR_Pin, int Bit_Delay );
void sendCmd(HouseCode house, int device, CommandCode cmnd);
};
extern X10Firecracker X10;
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment