File tree 3 files changed +30
-1
lines changed
3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ fifo LED protocol as part of arcan >= 0.5.2.
11
11
i2c connection in order to control PWM adafruit
12
12
neopixel- LEDs.
13
13
14
+ testgen - simple stress-test to randomly flash lights,
15
+ make and run like ./test | g810-led --aled -
16
+
14
17
# Setup/Use
15
18
16
19
fifos can be configured via:
@@ -19,7 +22,7 @@ fifos can be configured via:
19
22
mkfifo /path/to/fifo2
20
23
21
24
and so on.
22
-
25
+
23
26
to tell arcan about the presence of the LED devices (scanned on startup):
24
27
25
28
arcan_db add_appl_kv arcan ext_led /path/to/fifo
Original file line number Diff line number Diff line change
1
+ test : test.c
2
+ gcc -o test test.c
Original file line number Diff line number Diff line change
1
+ #include <stdlib.h>
2
+ #include <stdio.h>
3
+ #include <unistd.h>
4
+
5
+ int main (int argc , char * argv [])
6
+ {
7
+ char rgb [3 ] = {'r' , 'g' , 'b' };
8
+ int i ;
9
+
10
+ while (1 ){
11
+ /* reset all, buffer/apply immediately randomly */
12
+ putchar ('A' ); putchar (0x00 ); putchar ('i' );
13
+ putchar (0x00 ); putchar ('c' ); putchar (rand () % 2 );
14
+
15
+ /* set one random channel to one random value */
16
+ for (i = 0 ;i < 127 ;i ++ ){
17
+ putchar ('a' ); putchar (i ); putchar (rgb [rand () % 3 ]);
18
+ putchar (rand () % 255 ); putchar ('c' ); putchar (rand () % 2 );
19
+ }
20
+ fflush (stdout );
21
+ // sleep(1);
22
+ }
23
+ return EXIT_SUCCESS ;
24
+ }
You can’t perform that action at this time.
0 commit comments