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 ?
M4 Express Lite w/DR Robot 485 Shield Error
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- DKDOTCOM
- Posts: 28
- Joined: Fri Nov 13, 2020 8:48 am
Re: M4 Express Lite w/DR Robot 485 Shield Error
Problem fixed. Required a change in the RS485.h RE/DE pin definition.
- Franklin97355
- Posts: 23940
- Joined: Mon Apr 21, 2008 2:33 pm
Re: M4 Express Lite w/DR Robot 485 Shield Error
Thanks for letting us know you resolved the problem. I'm glad I didn't have to research this. ;)
Please be positive and constructive with your questions and comments.