Im glad that you know what was wrong, I was about to lose my mind I only understand enough arduino code to do basic I/O so I'm not sure where to put that line of code. If I add it to the first line of KSPIODemo13 tab it returns an error
KSPIODemo13:61: error: expected identifier before 'unsigned'
unsigned long deadtime, deadtimeOld, controlTime, controlTimeOld;
^
KSPIODemo13:61: error: invalid type in declaration before ',' token
unsigned long deadtime, deadtimeOld, controlTime, controlTimeOld;
^
expected identifier before 'unsigned'
Any ideas?