#include #include int main(void) { unsigned char byte, foo; FILE *GPIOMOD; GPIOMOD=fopen("/dev/gpiomod", "w"); setvbuf(GPIOMOD, &foo, _IONBF, 1); byte=1; while (byte==64) { printf("Byte value: %d\n", byte); fwrite(&byte, 1, 1, GPIOMOD); byte <<=1; if (byte == 0 ) byte = 1; sleep(1); } fclose(GPIOMOD); }