the main.c code main.c
the main.c code main.c
You will need to provide a lot more information than this. 1000 lines of copy pasted code is not easy for us to debug.
Latest version of the S132 can be found here.
Latest version of the S132 can be found here.