Update main.c

Updated for STK1160 support copied from shjackal