Arduino bugging out

Post both lots of code the c# and the c/c++.

Mark