I think you need to show us your demo sketch that's failing to compile as well.
--Phil.
Hey Phil, The code is *seriously* simple. Nothing more than firing the constructor and requesting begin
#include <URMSerial.h>
URMSerial urm
void setup() {
Serial.begin(9600); // Sets the baud rate to 9600
urm.begin(2,3,9600);
//urm.requestMeasurement();
Serial.print("Hey");
delay(200); //Give sensor some time to start up --Added By crystal from Singapo, Thanks Crystal.
}
void loop()
{
/*urm.requestMeaurement();
bool flag = true;
while(flag)
{
if(urm.hasReading())
{
Serial.println(urm.getDistance());
}
}
*/
}
@mikalhart
Ah thanks a lot, I forgot to de-reference serial (my C++ is VERY rusty, .NET and Java have spoiled me!
I haddent thought of deriving from SS, that may be a good idea considering the URM has a bunch of additional functions you may want to manually request.
At the moment, I want to brush up on my C++ and then I'll focus on the elegance and performance.
How would you suggest initalising that command, seems odd considering you can't initalise in the header.
Oh final node: what library is "delay" in. stdlib?