#include #include #include #include #include #include int main() { PicoHal* pico = new PicoHal( spi0, PICO_LORA_MISO, PICO_LORA_MOSI, PICO_LORA_SCK ); // Currently written as numbered 1-40th pin on Pico SX1262 radio = new Module( pico, PICO_LORA_SPI_CS, PICO_LORA_SPI_DIO1, PICO_LORA_RST, PICO_LORA_BUSY ); ConfigLoRa_t config; config.frequency = 915; int state = radio.begin(config); if (state == RADIOLIB_ERR_NONE){ printf("LoRa module initialized\n"); while(true) { state = radio.startTransmit("Howdiddly doo"); if (state == RADIOLIB_ERR_NONE) { printf("Transmitted properly!\n"); } else { printf("Transmission failed\n"); } sleep_ms(2000); } } else { printf("Could not initialize LoRa module\n"); while(true) { printf("Fuuuuuck\n"); sleep_ms(2000); } } }