Skip to content
Snippets Groups Projects
Commit 3b754475 authored by dronus's avatar dronus
Browse files

LED-Anzahl, Farbkanal-Zurordnung, Timing, Schnittstelle eingestellt

parent 12bcf063
No related branches found
No related tags found
No related merge requests found
...@@ -7,5 +7,5 @@ mkfifo image_fifo ...@@ -7,5 +7,5 @@ mkfifo image_fifo
sleep 10000000 >image_fifo & sleep 10000000 >image_fifo &
# start the sender # start the sender
cat image_fifo | ./sender >/dev/ttyACM3 cat image_fifo | ./sender >/dev/ttyACM0
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
#define WIDTH 500 #define WIDTH 1024
#define HEIGHT 8 #define HEIGHT 8
int image[WIDTH*HEIGHT]; int image[WIDTH*HEIGHT];
...@@ -64,7 +64,8 @@ int fade(int b, int a, int t) ...@@ -64,7 +64,8 @@ int fade(int b, int a, int t)
int gc=(ga*t+gb*(255-t))/256; int gc=(ga*t+gb*(255-t))/256;
int bc=(ba*t+bb*(255-t))/256; int bc=(ba*t+bb*(255-t))/256;
return (rc<<0)+(gc<<8)+(bc<<16);
return (bc<<0)+(rc<<8)+(gc<<16);
} }
int main() { int main() {
...@@ -88,7 +89,7 @@ int main() { ...@@ -88,7 +89,7 @@ int main() {
fprintf(stderr,"Sender output written: %i \n", written); fprintf(stderr,"Sender output written: %i \n", written);
usleep(2000L); usleep(3000L);
} }
memcpy(image_old,image_new,sizeof(image_old)); memcpy(image_old,image_new,sizeof(image_old));
......
test1.png

3.97 KiB

test2.png

3.87 KiB

test3.png

3.6 KiB

test4.png

6.28 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment