Go Down

Topic: Defining a serial port (Read 327 times) previous topic - next topic

fjramirez

Hello,
I have two libraries, Pollserial and OBD

In my program I want to work with Pollserial serial port, but obd library works with port SerialO.

Obd.cpp:
 
Quote
#ifndef OBDUART
#define OBDUART Serial
#endif 


And to state the serial port I use (Serial0) M ain.cpp:

Quote
#include <pollserial.h>
pollserial pserial;


What do I have to do to use the port obd.cpp pserial?

¿?
 
Quote
#ifndef OBDUART
#include <pollserial.h>
pollserial pserial;
#define OBDUART pserial
#endif 

Alone with or duplicate definition errors.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy