Initialize UART and FS
This commit is contained in:
parent
c4d32b77a9
commit
893bd0c0d4
3
include/defaults.h
Normal file
3
include/defaults.h
Normal file
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#define SERIAL_BAUDRATE 115200
|
||||
17
src/main.cpp
17
src/main.cpp
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user