Hi everybody,
I’m using a HC SR04 ultrasonic sensor and a Nucleo F411RE for my current school project and I decided to use a library for the sensor to simplify things. The library I used was the one from EJ Teb:
But I have an issue with the classes in the .h file (I have the same issue in other self-made library’s within my project). When I try to build the code (I use the Mbed online compiler) the compiler gives me an error back saying it expects a ) after the first PinName, see below.
class ultrasonic
{
public:
/iniates the class with the specified trigger pin, echo pin, update speed and timeout/
class ultrasonic (PinName trigPin, PinName echoPin, float updateSpeed, float timeout);
//Error: Expected ‘)’ in “HC_SR04_Ultrasoon/HC_SR04_Ultrasoon.h”, Line: 13, Col: 35
// Other code after this
Can somebody please help me figure out what I’m doing wrong?