I'm trying to send a signal to a Toto washlet to raise the seat in response to a foot tap on a pressure sensor. I've had this working for a couple of years now but had to change pressure sensors, lost the Arduino code, and am having to reprogram it. I can't for the life of me remember how exactly I captured the IR code.
I've verified that my hardware is working by capturing a TV-POWER ON code from a remote and playing it back successfully.
The code I'm using is:
uint32_t tRawData[]={0xB7800802, 0x37}; //this figure suggestged by IR reader
Serial.flush();
// IrSender.sendNEC(0x4, 0x8, 2); // This was a demo, it turns the TV on and off
IrSender.sendPulseDistanceWidthFromArray(38, 5950, 2900, 600, 1600, 600, 500, &tRawData[0], 39, PROTOCOL_IS_LSB_FIRST, 0, 0);
The output from ReceiveDemo.cpp is below. Any assistance most welcome!
Protocol=PulseDistance Raw-Data=0x37 39 bits LSB first
Send with:
uint32_t tRawData[]={0xB7800802, 0x37};
IrSender.sendPulseDistanceWidthFromArray(38, 5950, 2900, 600, 1600, 600, 550, &tRawData[0], 39, PROTOCOL_IS_LSB_FIRST, <RepeatPeriodMillis>, <numberOfRepeats>);
rawData[82]:
-3276750
+5950,-2900
+ 600,- 500 + 600,-1600 + 600,- 500 + 600,- 500
+ 600,- 500 + 600,- 550 + 550,- 550 + 550,- 500
+ 600,- 500 + 600,- 550 + 550,- 550 + 550,-1650
+ 550,- 550 + 550,- 550 + 550,- 550 + 550,- 550
+ 600,- 500 + 550,- 550 + 550,- 550 + 550,- 550
+ 600,- 500 + 600,- 500 + 550,- 550 + 600,-1600
+ 600,-1600 + 600,-1650 + 550,-1600 + 600,- 550
+ 550,-1650 + 550,-1650 + 550,- 550 + 550,-1650
+ 600,-1600 + 600,-1600 + 600,-1600 + 600,- 500
+ 600,-1600 + 600,-1650 + 550,- 550 + 550
Sum: 67850
Protocol=PulseDistance Repeat gap=30650us Raw-Data=0x37 39 bits LSB first
rawData[82]:
-30650
+5900,-2950
+ 550,- 550 + 550,-1650 + 600,- 500 + 600,- 500
+ 600,- 500 + 550,- 550 + 600,- 500 + 600,- 500
+ 600,- 500 + 600,- 550 + 550,- 550 + 550,-1600
+ 600,- 550 + 550,- 550 + 550,- 550 + 550,- 550
+ 550,- 550 + 550,- 550 + 550,- 550 + 550,- 550
+ 600,- 500 + 550,- 550 + 550,- 550 + 550,-1650
+ 600,-1600 + 550,-1650 + 600,-1600 + 600,- 550
+ 550,-1650 + 550,-1650 + 550,- 550 + 550,-1650
+ 600,-1600 + 550,-1650 + 600,-1600 + 600,- 500
+ 550,-1650 + 600,-1600 + 600,- 550 + 550
Sum: 67850
Protocol=UNKNOWN Hash=0x0 1 bits (incl. gap and start) received
Received noise or an unknown (or not yet enabled) protocol
rawData[2]:
-3276750
+ 200
Sum: 200