I wrote code which compiles and runs fine on a 328P Nano. But when I tried to compile it for a Feather 32u4 RFM69HCW it won't compile. And yes I did change the board in the Arduino IDE Feather 32u4. Any idea why the problems? The errors are attached: (sorry if I posted the errors in the wrong way)
There are so many and I don't know which one made it fail.
Thanks for looking at this
Code won't compile on Feather 32u4
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- jspring111
- Posts: 11
- Joined: Mon Nov 30, 2020 11:30 pm
Code won't compile on Feather 32u4
- Attachments
-
- Feather 32u4 RFM69 Errors.txt
- (149.35 KiB) Downloaded 2 times
- dastels
- Posts: 15658
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Code won't compile on Feather 32u4
There is some MCU specific code. Errors like:
OCR2A is a hardware level detail. The 328 and 32u4 are different MCUs.
See https://forum.arduino.cc/t/move-from-32 ... ues/348294 for more discussion.
Dave
Code: Select all
C:\Users\jspri\Documents\Arduino\libraries\RadioHead\RH_ASK.cpp:444:5: error: 'OCR2A' was not declared in this scope
OCR2A = nticks;
See https://forum.arduino.cc/t/move-from-32 ... ues/348294 for more discussion.
Dave
- jspring111
- Posts: 11
- Joined: Mon Nov 30, 2020 11:30 pm
Re: Code won't compile on Feather 32u4
My project has a Feather 32u4 RFM69HCW running at 433mhz. I wrote my sketch using the Radiohead library as Directed in the Adafruit instructions. Are you telling me the Feather 32u4 RFM69HCW is not compatible with the Radiohead Library because it's not a 328P processor? Adafruit does not make a Feather 328P RFM69HCW as far as I know.
- dastels
- Posts: 15658
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Code won't compile on Feather 32u4
There is 32u4 support. See RadioHead.h in the library:
Dave
Is everything up to date (board support and libraries)? You installed the Adafruit fork of the RadioHead library: https://github.com/adafruit/RadioHead/a ... master.zip? It looks like it doesn't know it's compiling for a 32u4.- Adafruit Feather. These are excellent boards that are available with a variety of radios. We tested with the
Feather 32u4 with RFM69HCW radio, with Arduino IDE 1.6.8 and the Adafruit AVR Boards board manager version 1.6.10.
https://www.adafruit.com/products/3076
Dave
Please be positive and constructive with your questions and comments.