Hi Marian,
Can you paste the screenshot or log of how you are compiling the C code and the output that you get. Can you also run the troubleshooting script from here:https://www.youtube.com/watch?v=MJu8k-_UQgg and attach the logs here on the forums.
I have just bought a GoPiGo and I have installed the GoPiGo libraries on Raspian using git.
I have exactly the same behavior with the LEDs, please see the following :
pi@raspberrypi:~/GoPiGo/Software/C $ ./gopigo
Error writing to GoPiGo
Enter cmd: v
Firmware Version: 16
Enter cmd: lo
Enter 1 for left led and 0 for right led:
0 Error writing to GoPiGo
I have to say that the Python code is able to open/close the LEDs, so I guess it must come from the C lib.