Help Me Out Plzz

Arduino: 1.8.5 Hourly Build 2017/08/28 06:33 (Windows 7), Board: "Arduino/Genuino Uno"

sketch_oct14a:124: error: stray '\342' in program

double getTemp(){return (((analogRead(tmp) / 1024.0) * 5000.0) − 520.0) / 10.0;

^

sketch_oct14a:124: error: stray '\210' in program

sketch_oct14a:124: error: stray '\222' in program

F:\Final Project Research Papers\Simulation File\sketch_oct14a\sketch_oct14a.ino: In function 'void loop()':

sketch_oct14a:59: error: 'ightTimer' was not declared in this scope

ightTimer = 0; //reset timer

^

F:\Final Project Research Papers\Simulation File\sketch_oct14a\sketch_oct14a.ino: In function 'double getTemp()':

sketch_oct14a:124: error: expected ')' before numeric constant

double getTemp(){return (((analogRead(tmp) / 1024.0) * 5000.0) − 520.0) / 10.0;

^

sketch_oct14a:124: error: expected '}' at end of input

double getTemp(){return (((analogRead(tmp) / 1024.0) * 5000.0) − 520.0) / 10.0;

^

exit status 1
stray '\342' in program

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Please always use code tags (</> button on the toolbar) when you post error/warning messages.

Please always take the time to give your post a descriptive title. “Help Me Out Plzz” is not going to make anyone want to help you.

riteshmudicha:

sketch_oct14a:124: error: stray '\342' in program

double getTemp(){return (((analogRead(tmp) / 1024.0) * 5000.0) − 520.0) / 10.0;

Do you see those strange characters in the equation: “−”? You need to get rid of them, replaced with whatever mathematical operator was meant to be there.

ightTimer = 0; //reset timerLooks like it might be a typo in the program that you have not posted. Is the variable really named ightTimer ? If so, where is it declared ?

Google "C++ tutorial". Do a C++ tutorial.

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Thanks.. Tom... :slight_smile: