Initialize UART and FS

This commit is contained in:
Thomas Basler 2022-04-09 13:08:51 +02:00
parent c4d32b77a9
commit 893bd0c0d4
2 changed files with 19 additions and 1 deletions

3
include/defaults.h Normal file
View File

@ -0,0 +1,3 @@
#pragma once
#define SERIAL_BAUDRATE 115200

View File

@ -1,8 +1,23 @@
#include "defaults.h"
#include <Arduino.h>
#include <LittleFS.h>
void setup()
{
// put your setup code here, to run once:
// Initialize serial output
Serial.begin(SERIAL_BAUDRATE);
while (!Serial)
yield();
Serial.println();
Serial.println(F("Starting OpenDTU"));
// Initialize file system
Serial.print(F("Initialize FS... "));
if (!LITTLEFS.begin()) {
Serial.println(F("failed"));
} else {
Serial.println(F("done"));
}
}
void loop()