Hello my name is Scott, I am starting to get more in depth into the Arduino IDE and I wanted to make a class for my Range Finder
I keep receiving the error below
Arduino: 1.6.1 (Windows 8.1), Board: "Arduino Uno"
Range_Test.ino:1:19: fatal error: Range.h: No such file or directory
compilation terminated.
Error compiling.
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
The Range.h class is below
/*
Range.cpp - Library used to convert analog range into digital
inches. Written by Scott J. Spitler II
*/
#include "Arduino.h"
#include "Range.h"
Range::Range(int pin)
{
_sensor = analogRead(pin);
}
int Range:: getRange()
{
inches = sensor/2;
return inches;
}
The Range.cpp class is found below
/*
Ramge.h - Library for taking the analog output from
the lv-maxsonar-ez1 and converting it into inches.
Created by Scott J. Spitler II May 14, 2015.
Released into the public domain
*/
#ifndef Range_h
#define Range_h
#include "Arduino.h"
class Range
{
public:
Range(int pin);
int getRange();
private:
int _sensor;
int _inches;
};
#endif
any input is helpful (even if it is to tell me I am going in the wrong direction) thanks!
Scott