I get a few errors in following file I'm including in the .yaml file in ESPHome:
#include "esphome.h"
class MyCustomComponent : public Component, public UARTDevice {
public:
MyCustomComponent(UARTComponent *parent) : UARTDevice(parent) {}
void setup() override {
// nothing to do here
}
void loop() override {
// Use Arduino API to read data, for example
String line = readString();
int i = parseInt();
while (available()) {
char c = read();
}
// etc
}
};
Can't upload to my Wemos D1 mini because of:
A) error : 'readString' is not declared in scope
B) ParseInt is not declared in scope
This is probably where I'm lost. I'm using ESPHome, where I have a yaml file that refers to a .h file. This .h file is located in my esphome folder. Like you said, the .h file is not using the arduino specific functions properly