Hello all,
Today I begin a new project, similar to the last project where 2 devices communicate with each other using 'some' packet structure.
Using logic analyzer and changing various serial settings, they are using standard serial settings at a baud rate of 9600.
Edit 7/12/2020: I have confirmed this to be 9600 baud, n81, LSB, non-inverted.
This is a host / slave setup. No need for addresses here.
Here is a packet -
Host sends this over and over when the slave is not connected..
0xF0 ; start of packet
0x5 ; not sure
0x1 ; data
0x4 ; data
0x1 ; data
0x2 ; data
0x44 ; data?
0x63 ; CHECKSUM!!
0xF3 ; End of packet
However, this seems wrong, because when I send the message above to the slave device, I get this response from the slave -
0xF0 ; Def is the start of packet
0x5
0x1
0x1
0x3
0x31
0x30
0x37
0xED
0xF5 ; CHECKSUM
0xF3 ; Def is the End of packet
More samples from host during a 'boot' process..
0xF0
0x05
0x00
0x02
0x01
0x00
0x34
0x8A ;CHECKSUM
0xF3
The slave device spins a big disc. Almost like a roulette wheel, and some lights.
I expect a data packet to contain things like -
motor speed,
R, G, B light colors (maybe up to 6 sections of light information),
possibly a byte where the host thinks the wheel is?
There is a speed-up and de-acceleration process.
The host tells the slave where to stop the disc. (go to location x)
Possible very chatty, dont know yet, this is as far as I have gotten before the 'high-voltage' side of the board gets really hot and I cut power.. working on fixing this.
Update 7/12/2020 - board got hot because of pull up resistors being wrong values causing excessive load on the voltage regulator, making it get hot. Change 100ohm resistors to 470ohm and the issue went away. Rise/fall times are fine.
Problem:
I am using an Uno with SoftwareSerial to read and try to replay the data out another interface, but it seems SoftwareSerial only let's one port work at a time... The last mySerialx.begin(9600); is the only one that ever works. Will probably move to a Mega but Uno was right there, and only 9600 baud, only reading..
Edit 7/12/2020 - Moved to Arduino Mega..
Thanks!
Eddiie