arduino with HC-SR04 ultrasonic sensor(newping)

these are the error messages i have got

Arduino: 1.8.8 (Windows 7), Board: "Arduino/Genuino Uno"

Ultrasonic_Sensor_HC-SR04_with_NewPing:22:4: error: stray '\342' in program

    Serial.println(“cmâ€?);

    ^

Ultrasonic_Sensor_HC-SR04_with_NewPing:22:4: error: stray '\200' in program

Ultrasonic_Sensor_HC-SR04_with_NewPing:22:4: error: stray '\234' in program

Ultrasonic_Sensor_HC-SR04_with_NewPing:22:4: error: stray '\342' in program

Ultrasonic_Sensor_HC-SR04_with_NewPing:22:4: error: stray '\200' in program

Ultrasonic_Sensor_HC-SR04_with_NewPing:22:4: error: stray '\235' in program

C:\Users\home\AppData\Local\Temp\Temp1_Ultrasonic_Sensor_HC-SR04_with_NewPing.zip\Ultrasonic_Sensor_HC-SR04_with_NewPing\Ultrasonic_Sensor_HC-SR04_with_NewPing.ino: In function 'void loop()':

Ultrasonic_Sensor_HC-SR04_with_NewPing:22:22: error: 'cm' was not declared in this scope

    Serial.println(“cmâ€?);

                      ^

exit status 1
stray '\342' in program

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

this is the code that i want to upload. i have installed the new ping library for IDE library manager plz check about it

/*
 * Posted on http://randomnerdtutorials.com
 * created by http://playground.arduino.cc/Code/NewPing
*/

#include <NewPing.h>
 
#define TRIGGER_PIN 12
#define ECHO_PIN 11
#define MAX_DISTANCE 200
 
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance.
 
void setup() {
   Serial.begin(9600);
}
 
void loop() {
   delay(50);
   unsigned int uS = sonar.ping_cm();
   Serial.print(uS);
   Serial.println(“cm”);
}

Google “arduino stray ’ 342’ in program” to see how to fix the errors caused by hidden characters in your code. The hidden characters come from copying code from a web site.

Copy the code you posted and try that. It complies for me.

see if you can open an example sketch from the newping folder.

files > examples the scroll down to newping and see if there is an example.