Unsuccessfully run of Starter Kit Project 10, Ultrasonic Sensor

Thank you, in advance, for any assistance.

My son and I have worked through the first 9 projects successfully. Small bugs include needing to learn to load a library on one project and mismatch of wiring on another.

He completed projects 8 and 9 by himself and attempted 10. I've checked his wiring (From sensor to UNTO R3, Ground to Ground; VCC to 5V; Echo to 11; and Trig to 12).

From the CD, uploaded the program for lesson 10 and, from manage libraries, installed HCSOR4, selecting it through the "Include Library" tab. Code and error code shown below.

The code shown is:

#include <HCSR04.h>

//www.elegoo.com
//2016.12.08
#include "SR04.h"
#define TRIG_PIN 12
#define ECHO_PIN 11
SR04 sr04 = SR04(ECHO_PIN,TRIG_PIN);
long a;

void setup() {
Serial.begin(9600);
delay(1000);
}

void loop() {
a=sr04.Distance();
Serial.print(a);
Serial.println("cm");
delay(1000);
}

The error code is Arduino:
Arduino: 1.8.5 (Windows 7), Board: "Arduino/Genuino Uno"

C:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\arduino-builder -dump-prefs -logger=machine -hardware C:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\hardware -tools C:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\tools-builder -tools C:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\hardware\tools\avr -built-in-libraries C:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\libraries -libraries C:\Users\PBandJ\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10805 -build-path C:\Users\PBandJ\AppData\Local\Temp\arduino_build_308833 -warnings=none -build-cache C:\Users\PBandJ\AppData\Local\Temp\arduino_cache_906049 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\hardware\tools\avr -verbose C:\Users\PBandJ\AppData\Local\Temp\arduino_modified_sketch_148022\SR04_Example.ino
C:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\arduino-builder -compile -logger=machine -hardware C:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\hardware -tools C:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\tools-builder -tools C:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\hardware\tools\avr -built-in-libraries C:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\libraries -libraries C:\Users\PBandJ\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10805 -build-path C:\Users\PBandJ\AppData\Local\Temp\arduino_build_308833 -warnings=none -build-cache C:\Users\PBandJ\AppData\Local\Temp\arduino_cache_906049 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\hardware\tools\avr -verbose C:\Users\PBandJ\AppData\Local\Temp\arduino_modified_sketch_148022\SR04_Example.ino
Using board 'uno' from platform in folder: C:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\hardware\arduino\avr
Detecting libraries used...
"C:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\hardware\arduino\avr\cores\arduino" "-IC:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\hardware\arduino\avr\variants\standard" "C:\Users\PBandJ\AppData\Local\Temp\arduino_build_308833\sketch\SR04_Example.ino.cpp" -o "nul"
"C:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\hardware\arduino\avr\cores\arduino" "-IC:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\hardware\arduino\avr\variants\standard" "-IC:\Users\PBandJ\Documents\Arduino\libraries\HCSR04\src" "C:\Users\PBandJ\AppData\Local\Temp\arduino_build_308833\sketch\SR04_Example.ino.cpp" -o "nul"
"C:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\hardware\arduino\avr\cores\arduino" "-IC:\Users\PBandJ\Desktop\Downloads\arduino-1.8.5-windows\arduino-1.8.5\hardware\arduino\avr\variants\standard" "-IC:\Users\PBandJ\Documents\Arduino\libraries\HCSR04\src" "C:\Users\PBandJ\AppData\Local\Temp\arduino_build_308833\sketch\SR04_Example.ino.cpp" -o "C:\Users\PBandJ\AppData\Local\Temp\arduino_build_308833\preproc\ctags_target_for_gcc_minus_e.cpp"
C:\Users\PBandJ\AppData\Local\Temp\arduino_modified_sketch_148022\SR04_Example.ino:5:18: fatal error: SR04.h: No such file or directory

#include "SR04.h"

^

compilation terminated.

Using library HCSR04 at version 1.0.0 in folder: C:\Users\PBandJ\Documents\Arduino\libraries\HCSR04
exit status 1
Error compiling for board Arduino/Genuino Uno.

Can you see if the SR04.h file exist in the folder ?

fatal error: SR04.h: No such file or directory

This means you haven't installed the SR04 libiary correctly. You may think you have but the compiler thinks you have not, and it wins.

Thank you both. You posted, and I took a nap. Hoping that combo would work, but ...

When I tried again to add the library:

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

Sketch uses 2914 bytes (9%) of program storage space. Maximum is 32256 bytes.
Global variables use 211 bytes (10%) of dynamic memory, leaving 1837 bytes for local variables. Maximum is 2048 bytes.
avrdude: ser_open(): can't open device "\.\COM3": The system cannot find the file specified.

Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
A library named HC-SR04 already exists

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

So I totally accept that the compiler doesn't think I added it. And maybe I haven't. But having successfully added others, I'm at a loss.

ieee488, when you ask if I see the SR04.h file "in the folder", I want to make sure I'm looking in the correct place. Which folder are we looking for here? I'm sure I'm coming across very green here (because I am), but I don't want to answer your question without making sure I am looking in the right place.

Tarsier:
ieee488, when you ask if I see the SR04.h file "in the folder", I want to make sure I'm looking in the correct place. Which folder are we looking for here? I'm sure I'm coming across very green here (because I am), but I don't want to answer your question without making sure I am looking in the right place.

in C:\Users\PBandJ\Documents\Arduino\libraries\HCSR04

That other error is that your Arduino is not longer at COM3. Check Windows' Device Manager.

Good catch on the COM4 switch. Not sure when that happened, but I got it switched back.

That did it. I appreciate the help.