Hey all,
I'm working on a large scale LED project with about 190000 LEDs driven by various Teensy 3.6 boards with the OctoWS2811 library each driving 8600 LEDs. This is working very well at max 29fps.
Now, the LED displays are distributed to different places on an area. 4 Teensies are grouped together and drive one wall. Those groups sync over ethernet due to the long distances between them. But I also need to transfer the videos via Ethernet to them if i want to change the content (not realtime). They are about 5 to 10 minutes long and the Teensies should put them on their µSDCard. That means, that one teensy needs to receive about 194Mb for 5Min Video in the OctoWS2811 binary format. I was hoping that the WIZ820io or WIZ850io could handle this. But the transfer performance is very slow. I only get 66KByte/sec transfer rates and I couldn't find any hints so far what is going wrong. I also don't understand how I could try different SPI libs as suggested in other quite old posts.
I'm working with Arduino 1.8.2 with Teensyduino 1.36. I connected the WIZ820io directly to the Teensy 3.6 (no adapter)
I reduced the whole prog to a test sketch based on the DHCP Chat server example. The video is send by a python script.
Teensy sketch
Python Sender
I really need AT LEAST 10MBit transfer rates to make this whole thing practical.
If this is not possible via WIZ820/850io could you make any suggestions for a board to make the transfer and then using Video2Serial to send it to the 4 grouped teensies? Or any other suggestions to make this work?!
Thanks for your help!
I'm working on a large scale LED project with about 190000 LEDs driven by various Teensy 3.6 boards with the OctoWS2811 library each driving 8600 LEDs. This is working very well at max 29fps.
Now, the LED displays are distributed to different places on an area. 4 Teensies are grouped together and drive one wall. Those groups sync over ethernet due to the long distances between them. But I also need to transfer the videos via Ethernet to them if i want to change the content (not realtime). They are about 5 to 10 minutes long and the Teensies should put them on their µSDCard. That means, that one teensy needs to receive about 194Mb for 5Min Video in the OctoWS2811 binary format. I was hoping that the WIZ820io or WIZ850io could handle this. But the transfer performance is very slow. I only get 66KByte/sec transfer rates and I couldn't find any hints so far what is going wrong. I also don't understand how I could try different SPI libs as suggested in other quite old posts.
I'm working with Arduino 1.8.2 with Teensyduino 1.36. I connected the WIZ820io directly to the Teensy 3.6 (no adapter)
I reduced the whole prog to a test sketch based on the DHCP Chat server example. The video is send by a python script.
Teensy sketch
Code:
#include <SPI.h>
#include <Ethernet.h>
// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network.
// gateway and subnet are optional:
byte mac[] = {
0x00, 0xAA, 0xBB, 0xCC, 0xDE, 0x02 //0xC3, 0x23, 0x6B, 0xAC, 0xDE, 0x12
};
IPAddress ip(192, 168, 1, 177);
// listen to port 60000
EthernetServer server(60000);
boolean gotAMessage = false; // whether or not you got a message from the client yet
void setup() {
pinMode(9, OUTPUT);
digitalWrite(9, LOW); // begin reset the WIZ820io
delay(100);
digitalWrite(9, HIGH); // end reset pulse
// Open serial communications and wait for port to open:
Serial.begin(9600);
// start the Ethernet connection:
Serial.println("Trying to get an IP address using DHCP");
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
}
// print your local IP address:
Serial.print("My IP address: ");
ip = Ethernet.localIP();
for (byte thisByte = 0; thisByte < 4; thisByte++) {
// print the value of each byte of the IP address:
Serial.print(ip[thisByte], DEC);
Serial.print(".");
}
Serial.println();
// start listening for clients
server.begin();
}
void loop() {
// wait for a new client:
EthernetClient client = server.available();
// when the client sends the first byte, say hello:
if (client) {
if (!gotAMessage) {
Serial.println("We have a new client");
client.println("Hello, client!");
gotAMessage = true;
}
// read the bytes incoming from the client:
char thisChar = client.read();
Ethernet.maintain();
}
}
Python Sender
Code:
import socket # Import socket module
import time
s = socket.socket() # Create a socket object
host = "192.168.188.116" # Get local machine name
port = 60000 # Reserve a port for your service.
s.connect((host, port))
s.send("Hello server!")
while True:
filename='VIDEO.BIN'
f = open(filename,'rb')
l = f.read(1024)
bs = 0;
start = time.time()
while (l):
s.send(l)
bs+=1024
if(time.time() - start > 1.0):
print('Byte/s: ', bs)
bs = 0
start = time.time()
l = f.read(1024)
print()
f.close()
print('Done sending')
s.send('Thank you for receiving!')
s.close()
I really need AT LEAST 10MBit transfer rates to make this whole thing practical.
If this is not possible via WIZ820/850io could you make any suggestions for a board to make the transfer and then using Video2Serial to send it to the 4 grouped teensies? Or any other suggestions to make this work?!
Thanks for your help!