M4 Express Lite w/DR Robot 485 Shield Error

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
DKDOTCOM
 
Posts: 26
Joined: Fri Nov 13, 2020 8:48 am

M4 Express Lite w/DR Robot 485 Shield Error

Post by DKDOTCOM »

I wrote a web server that pulls data over a Modbus network using a Metro Express M0, DR Robot 485 Shield and a WiFi shield. Works great.

I need to reduce the footprint so I purchased an M4 Express Airlift Lite

I changed the CPU to the M4 Express Airlift Lite and did a compile
The compiler throws an error on the RS485 library

In file included from C:\Users\Dave\Documents\Arduino\libraries\ArduinoRS485\src\RS485.cpp:20:

C:\Users\Dave\Documents\Arduino\libraries\ArduinoRS485\src\RS485.h:35:30: error: 'A6' was not declared in this scope; did you mean 'A5'?

35 | #define RS845_DEFAULT_DE_PIN A6

| ^~

C:\Users\Dave\Documents\Arduino\libraries\ArduinoRS485\src\RS485.cpp:169:62: note: in expansion of macro 'RS845_DEFAULT_DE_PIN'

169 | RS485Class RS485(SERIAL_PORT_HARDWARE, RS485_DEFAULT_TX_PIN, RS845_DEFAULT_DE_PIN, RS845_DEFAULT_RE_PIN);

| ^~~~~~~~~~~~~~~~~~~~

I tried an M4 Express and it compiles just fine.

Any idea why it throws an error with the M4 Airlift Lite ?

User avatar
DKDOTCOM
 
Posts: 26
Joined: Fri Nov 13, 2020 8:48 am

Re: M4 Express Lite w/DR Robot 485 Shield Error

Post by DKDOTCOM »

Problem fixed. Required a change in the RS485.h RE/DE pin definition.

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: M4 Express Lite w/DR Robot 485 Shield Error

Post by Franklin97355 »

Thanks for letting us know you resolved the problem. I'm glad I didn't have to research this. ;)

Locked
Please be positive and constructive with your questions and comments.

Return to “Metro, Metro Express, and Grand Central Boards”