Hello guy,
after i read and try to understand how to use all this stuff together i m here to ask for your help
i do have at home several appliance working with x10 protocol (marmitek) and decieded to upgrade with a web interface using arduino and the xm10 module
i tryed several libraries and managed to make the xm10 module working with simple sketch of X10 example like this
// include the X10 library files:
#include <x10.h>
const int rxPin = 3; // data receive pin
const int txPin = 4; // data transmit pin
const int zcPin = 2; // zero crossing pin
void setup() {
// begin serial:
Serial.begin(9600);
x10.begin(rxPin, txPin, zcPin);
// Turn off all lights:
x10.beginTransmission(A);
x10.write(ALL_UNITS_OFF);
x10.endTransmission();
}
void loop() {
x10.beginTransmission(A);
// Turn on first module:
x10.write(UNIT_1);
x10.write(ON);
// Turn off second module:
x10.write(UNIT_2);
x10.write(OFF);
delay(500);
// Turn off first module:
x10.write(UNIT_1);
x10.write(OFF);
// turn on second module:
x10.write(UNIT_2);
x10.write(ON);
delay(500);
x10.endTransmission();
}
then i found in net some sketch to have an web interface with my arduino and try to send command trough a web page but witought big success i used 2 different library, the classic x10.h and x10ex.h
i don't have very good experience in programming and can t understand where is my mistake
for x10.h i used this kind of command line
x10.beginTransmission(A);
x10.write(ALL_UNITS_OFF);
x10.endTransmission();
and x10ex.h i used this
myHouse.write(HOUSE_P, UNIT_1, 3);