Skip to content

compilation error with hardware serial #2

@virgafox

Description

@virgafox

Hi,

I'm trying to use your library with an Adafruit Bluefruit LE Micro, which is very similar to an Arduino Micro. It has a usb serial interface (Serial) and an Hardware UART serial on pins 0,1 (Serial1). I'm trying to compile the simple_measurement example without changing anything, (it already declares Serial1 as the interface for communication with the ut390b), but I get this error on compilation:

In file included from /Users/virgafox/Documents/Arduino/libraries/UT390B_Arduino_Library-master/examples/Simple_Measurement/Simple_Measurement.ino:5:0:
/Users/virgafox/Documents/Arduino/libraries/UT390B_Arduino_Library-master/UT390B.h:18:37: error: could not convert 'Serial' from 'Serial_' to 'HardwareSerial&'
     UT390B(HardwareSerial &serial = Serial) : serial(&serial) {
                                     ^
exit status 1

I'm sure it is an hardware serial, how can I solve this? Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions