Code won't compile on Feather 32u4

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jspring111
 
Posts: 11
Joined: Mon Nov 30, 2020 11:30 pm

Code won't compile on Feather 32u4

Post by jspring111 »

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
Attachments
Feather 32u4 RFM69 Errors.txt
(149.35 KiB) Downloaded 2 times

User avatar
dastels
 
Posts: 15658
Joined: Tue Oct 20, 2015 3:22 pm

Re: Code won't compile on Feather 32u4

Post by dastels »

There is some MCU specific code. Errors like:

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;
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

User avatar
jspring111
 
Posts: 11
Joined: Mon Nov 30, 2020 11:30 pm

Re: Code won't compile on Feather 32u4

Post by jspring111 »

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.

User avatar
dastels
 
Posts: 15658
Joined: Tue Oct 20, 2015 3:22 pm

Re: Code won't compile on Feather 32u4

Post by dastels »

There is 32u4 support. See RadioHead.h in the library:
- 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
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.

Dave

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

Return to “Arduino”