Hi all,
I'm using a FS1000A transmitter, a MX-RM-5V Receiver and attempt to switch on a 433Mhz plug (remote included) but failed switch on and off.
The code is from this link:
Having the receiver code uploaded to Arduino Uno (1st), open Serial Monitor, then press button On (switch 1) below is what shown in serial monitor:
On 1:
Decimal: 349491 (24Bit) Binary: 000001010101010100110011 Tri-State: 00FFFFFF0101 PulseLength: 170 microseconds Protocol: 1
Raw data: 5308,152,528,156,528,156,528,152,532,148,536,492,188,152,532,496,188,152,532,492,192,152,528,496,188,156,532,492,188,152,532,496,188,152,528,156,528,496,188,496,192,148,532,152,532,492,192,492,192,
For button off (switch1):
Off 1:
Decimal: 349500 (24Bit) Binary: 000001010101010100111100 Tri-State: 00FFFFFF0110 PulseLength: 170 microseconds Protocol: 1
Raw data: 5304,156,532,152,540,136,548,136,548,132,548,472,204,144,532,496,200,136,552,472,216,124,556,468,212,132,552,476,204,136,548,476,204,140,548,128,556,128,552,128,556,124,552,140,544,140,540,140,544,
Fill in the Binary Numbers for On and OFF, PulseLength =170, Protocol=1, to the transmitter code as
shown below:
/*
Based on the SendDemo example from the RC Switch library
*/
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
void setup() {
Serial.begin(9600);
// Transmitter is connected to Arduino Pin #10
mySwitch.enableTransmit(10);
// Optional set pulse length.
mySwitch.setPulseLength(170);
// Optional set protocol (default is 1, will work for most outlets)
mySwitch.setProtocol(1);
// Optional set number of transmission repetitions.
// mySwitch.setRepeatTransmit(15);
}
void loop() {
// Binary code - button 3
mySwitch.send("000001010101010100110011");
delay(1000);
mySwitch.send("000001010101010100111100");
delay(1000);
}
Upload the code to 2nd Arduino.
Open the Serial monitor of the receiver(1st Arduino board), picture link below:
The serial monitor of the receiver prints what is sent from the transmitter but why the plug isn't switching on and off as it supposed to??
Thanks,
Freddy