Set more pixel in client

This commit is contained in:
Ollo 2023-05-17 21:15:26 +02:00
parent 7cb172f101
commit 43f193965c

View File

@ -6,8 +6,16 @@ const IMAGE_HEIGHT_BYTE : usize = 40;
fn send_package(ipaddress: String) { fn send_package(ipaddress: String) {
let mut image = [0; (IMAGE_WIDTH_BYTE*IMAGE_HEIGHT_BYTE)+1]; let mut image = [0; (IMAGE_WIDTH_BYTE*IMAGE_HEIGHT_BYTE)+1];
image[0] = 0xFF; // Brightnes
image[1] = 0xFF; image[0] = 0x80;
// row 0, led 0
image[1] = 1;
// row 0, led 8
image[2] = 1;
// row 0, led 16 and 17
image[3] = 3;
// row 0, led 24, 25, 26
image[4] = 7;
let socket = UdpSocket::bind("0.0.0.0:4242").expect("couldn't bind to address"); let socket = UdpSocket::bind("0.0.0.0:4242").expect("couldn't bind to address");
socket.send_to(&image, ipaddress + ":4242").expect("couldn't send data"); socket.send_to(&image, ipaddress + ":4242").expect("couldn't send data");
println!("Packet sent"); println!("Packet sent");