Comments (2)
It's unclear to me from what you write what you tried to do, and what the problem was. Perhaps you can insert some snippets of code you tried to use, and explain what you thought it would do, and what happened instead. Then based on that, perhaps somebody can help you!
from rc-switch.
Hello,
I was trying to implement 32 bit signal on OpenMQTTGateway based on this great library. I encountered problem when trying to work with other length than the traditional 24 that we are seeing on the examples.
Let's see the test I have done.
I modified this code to have some traces:
void RCSwitch::send(const char* sCodeWord) {
// turn the tristate code word into the corresponding bit pattern, then send it
unsigned long code = 0;
unsigned int length = 0;
for (const char* p = sCodeWord; *p; p++) {
code <<= 1L;
if (*p != '0')
code |= 1L;
length++;
}
Serial.println (code);
Serial.println(length);
this->send(code, length);
}
"test 1"
mySwitch.send("101000000010101010100");
from the trace I see --> code 1312084 length 21 --> KO plug state doesn't change
mySwitch.send("101000000010101010001");
from the trace I see --> code 1312081 length 21 --> KO plug state doesn't change
"test 2"
mySwitch.send(1312084,21);
--> KO plug state doesn't change
mySwitch.send(1312081,21);
--> KO plug state doesn't change
"test 3"
mySwitch.send(1312084,24);
--> OK plug state change
mySwitch.send(1312081,24);
--> OK plug state change
"test 4"
mySwitch.send("000101000000010101010100");
code 1312084 length 24 --> OK plug state change
mySwitch.send("000101000000010101010001");
code 1312081 length 24 --> OK plug state change
It seems that when we are not with a length of 24 we are not having the expected behavior. Do you have some infos about this?
from rc-switch.
Related Issues (20)
- Add protocol with 12 bits preamble
- Pairing RF Remotes with Arduino without change in code
- can't decode 433mhz with esp32 HOT 5
- Problems with an old library 2013 but with an important modification
- Adding new protocol to RCSwitch.cpp
- Esp32 issue... another one, yes... HOT 1
- How to implement a custom protocol?
- Which pin for Arduino pro mini AtMega328P 5V
- control with more than one command
- Problem with recieved value HOT 1
- How to send()? HOT 1
- How the ISR function handle the filtering out first high pulse in SYNC bit
- void RCSwitch::disableReceive()
- ReceiveDemo_Advanced work with Platform.IO and VSCode HOT 1
- How can i modify this protocol? HOT 5
- Cant receive anything with receive demo HOT 1
- Small contribution
- SURNICE: receiver and transmitter HOT 1
- Protocol 6 optimization doubt
- A modest proposal - expose the interrupt so a user can write a callback function.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rc-switch.