nickskethisnikske
New Member
- Joined
- Aug 27, 2020
- Messages
- 31
I did a first attempt in trying communication with the valence battery. But no luck, I loaded your code straight to the arduino Mega.
I see serial output on my scope before the RS485 ic, I use pin 2 to be able to transmit the messages. I noticed that on my arduino Mega the RX1 an TX1 are the other way around... I also have data on my A-B lines, but I got 5V signal blocks followed by 1.5V data so something is wrong in my converter circuit, I think.
It's possible the enable function is not working properly, it stays high when sniffing pin2.
I did comment out the following things because they don't make a change.
//#define hasAutoTxEnable // Comment this out if the underlying serial does not have automatic transmitterEnable
// Serial out to RS485
//#define RS485Tx 1 // 1 or 5 for Serial1, 10 or 31 for Serial2, 8 for Serial3
// Serial in from RS485
//#define RS485Rx 0 // 0 or 21 for Serial1, 9 or 26 for Serial2, 7 for Serial3
// RS485.setTX(RS485Tx);
// RS485.setRX(RS485Rx);
Tommorow is another day.![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
I see serial output on my scope before the RS485 ic, I use pin 2 to be able to transmit the messages. I noticed that on my arduino Mega the RX1 an TX1 are the other way around... I also have data on my A-B lines, but I got 5V signal blocks followed by 1.5V data so something is wrong in my converter circuit, I think.
It's possible the enable function is not working properly, it stays high when sniffing pin2.
I did comment out the following things because they don't make a change.
//#define hasAutoTxEnable // Comment this out if the underlying serial does not have automatic transmitterEnable
// Serial out to RS485
//#define RS485Tx 1 // 1 or 5 for Serial1, 10 or 31 for Serial2, 8 for Serial3
// Serial in from RS485
//#define RS485Rx 0 // 0 or 21 for Serial1, 9 or 26 for Serial2, 7 for Serial3
// RS485.setTX(RS485Tx);
// RS485.setRX(RS485Rx);
Tommorow is another day.