I am reading a voltage in analogRead on pin 0. I am serialWrite that value.
what I want is to use math in arduino to create a new variable that holds the value of the voltage that I am reading divided by 5 and then output to serial. can anyone please help me with this. Sorry if I am a noob and such
what I want is to use math in arduino to create a new variable that holds the value of the voltage that I am reading divided by 5 and then output to serial.
Are you asking for permission? If so, it's granted.
If not, then surely you know how to define a variable. After all, you had to do that to hold the value read from the pin. So, create another one. Dividing by 5 is a no-brainer.
ortonjon:
thank you guys im actually done. it was a no brainer. I was doing it just after I asked the question. Thanks for the permission though
Hopefully this means the next time you run into an issue, your first thought is "I'm a smart guy, I can figure this out!" rather than "I bet someone else knows how to do it."