cconstantine
Member
Hello,
I'm trying to write an LED controller that receives OPC (http://openpixelcontrol.org/) over ethernet and I've run into a weird problem that I don't think is in my code (but certainty could be!).
My setup:
Desktop PC running ubunt 16.06, arduino 1.8.5, and teensyduino 1.40
Teensy 3.1 with WIZ820io & Micro SD Card Adaptor from the pjrc store and a WIZ850io.
Client code: https://github.com/cconstantine/wiz850io_poc
Server code: https://github.com/cconstantine/teensy_opc
When I run those together I get the following output very quickly:
In the above, the first 2 message frames come in correctly, but it looks like the 3rd one starts in the middle of the last message frame. The previous frame's color bytes are all ones, and it appears to be leaking into the next frame's header.
If I set the desired fps on the client to something big like 120 (optional 2nd argument) OR if I set the 'fixup_delay' in the server to something like 8 the problem goes away. This makes me think it's a timing issue in the ethernet code.
Help?
I'm trying to write an LED controller that receives OPC (http://openpixelcontrol.org/) over ethernet and I've run into a weird problem that I don't think is in my code (but certainty could be!).
My setup:
Desktop PC running ubunt 16.06, arduino 1.8.5, and teensyduino 1.40
Teensy 3.1 with WIZ820io & Micro SD Card Adaptor from the pjrc store and a WIZ850io.
Client code: https://github.com/cconstantine/wiz850io_poc
Server code: https://github.com/cconstantine/teensy_opc
When I run those together I get the following output very quickly:
My IP Address: 192.168.1.120
header (4):
0
0
30
0
channel: 0
command: 0
length : 12288
first byte : 0
command_read : 12292
available : 0
receive time :9
header (4):
0
0
30
0
channel: 0
command: 0
length : 12288
first byte : 1
command_read : 12292
available : 54268
receive time :9
header (4):
1
1
1
1
channel: 1
command: 1
length : 257
In the above, the first 2 message frames come in correctly, but it looks like the 3rd one starts in the middle of the last message frame. The previous frame's color bytes are all ones, and it appears to be leaking into the next frame's header.
If I set the desired fps on the client to something big like 120 (optional 2nd argument) OR if I set the 'fixup_delay' in the server to something like 8 the problem goes away. This makes me think it's a timing issue in the ethernet code.
Help?