LOL, PaulS has some of the best comments out there, most of them when you look at your code you smack you head and go oops that was dumb..
- use the put your code in the code brackets, makes it easier for use to read
- As Paul said, you will notice that your sendValue function is within the loop
you have a } that is after the void loop that should be before it.
as the error said: sketch_apr25d:130: error: a function-definition is not allowed here before '{' token
- Declare all your pins before the setup and use proper names so that you can follow them through the code.
so if you read the error, it tells you that sendValue
sketch_apr25d.ino: In function 'void loop()':
sketch_apr25d:97: error: 'sendValue' was not declared in this scope
sketch_apr25d:104: error: 'sendValue' was not declared in this scope