tele_player wrote:I don't want to get into figuring out what version you have installed, and I don't know what may or may not have changed, but here's the relevant function grabbed from somewhere on Github.
I've added comments showing what I changed to transmit 7 bits, no start, no stop. My comments will start with ***
Caveat: I haven't compiled this, or tested it, and I have little confidence that this will be of any use to you.Code: Select all
size_t SoftwareSerial::write(uint8_t b) {
if (!m_txValid) return 0;
if (m_invert) b = ~b;
// Disable interrupts in order to get a clean transmit
cli();
if (m_txEnableValid) digitalWrite(m_txEnablePin, HIGH);
unsigned long wait = m_bitTime;
digitalWrite(m_txPin, HIGH);
unsigned long start = ESP.getCycleCount();
// Start bit;
// digitalWrite(m_txPin, LOW); // *** disable START bit
// WAIT; // *** disable START bit
for (int i = 0; i < 7; i++) {. // *** Was 8
digitalWrite(m_txPin, (b & 1) ? HIGH : LOW);
WAIT;
b >>= 1;
}
// Stop bit
// digitalWrite(m_txPin, HIGH); // *** disable STOP bit
// WAIT; // *** disable STOP bit
if (m_txEnableValid) digitalWrite(m_txEnablePin, LOW);
sei();
return 1;
}
Dear tele_player,
thanks a lot for the modification! I will be able to test it after 10 hours approximately and I will let you know !