Didn't want to post this due to all the other topics about the same thing, but I couldn't find my problem anywhere else. I'm trying to make a 433mhz transmitter on a Nano Every.
My code is as follows:
// Include RadioHead Amplitude Shift Keying Library
#include <RH_ASK.h>
// Include dependant SPI Library
#include <SPI.h>
// Create Amplitude Shift Keying Object
RH_ASK rf_driver;
void setup()
{
// Initialize ASK Object
rf_driver.init();
}
void loop()
{
const char *msg = "Chilling n' grilling";
rf_driver.send((uint8_t *)msg, strlen(msg));
rf_driver.waitPacketSent();
delay(1000);
}
The error message is as follows:
/tmp/ccFjz7s8.ltrans0.ltrans.o: In function `main':
/home/builder/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/main.cpp:43: undefined reference to `setup'
/home/builder/.arduino15/packages/arduino/hardware/megaavr/1.8.7/cores/arduino/main.cpp:46: undefined reference to `loop'
collect2: error: ld returned 1 exit status
Error during build: exit status 1
My sketch name is not "main", and the obligatory setup/loop functions are present.
I can't figure out what's causing the issue.