Trying to move project->FreeRTOS (WIP)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
cmake_minimum_required(VERSION 3.5.0)
|
||||
|
||||
set(APP_NAME "Yeller")
|
||||
|
||||
add_executable(${APP_NAME}
|
||||
./main.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(${APP_NAME} LINK_PUBLIC
|
||||
pico_stdlib
|
||||
FreeRTOS
|
||||
)
|
||||
|
||||
pico_enable_stdio_usb(${APP_NAME} 1)
|
||||
pico_enable_stdio_uart(${APP_NAME} 0)
|
||||
|
||||
pico_add_extra_outputs(${APP_NAME})
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
#include "Config/FreeRTOSConfig.h"
|
||||
#include "FreeRTOS.h"
|
||||
#include <pico/stdlib.h>
|
||||
#include <RadioLib/RadioLib.h>
|
||||
#include <RadioLib/Module.h>>
|
||||
|
||||
int main() {
|
||||
// Currently written as numbered 1-40th pin on Pico
|
||||
SX1262 radio = new Module(5, 26, 20, 4);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user