I can't see where you set a value for cData. You increment it but never reset it. Mind you by only posting a part of your code it is hard to tell.
As you have it in a loop you will rapidly exceed the maximum number of write cycles.
Do it all in the setup() while you are testing to avoid this.
// wait 10 milliseconds before the next loop
// for the analog-to-digital converter to settle
// after the last reading:
There is no need to do that.