add missing library

This commit is contained in:
Luc
2019-10-07 17:19:07 +08:00
parent 3accd2a694
commit e7d71a43bf
70 changed files with 25036 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
#include <LuaWrapper.h>
LuaWrapper lua;
void setup() {
Serial.begin(115200);
}
void loop() {
String script = "";
char c = 0;
Serial.println();
Serial.println("# Enter the lua script and press Control-D when finished:");
while(1) {
if(Serial.available() > 0) {
c = Serial.read();
if(c == 4) {
break;
}
Serial.write(c);
script += c;
if(c == '\r') {
Serial.write('\n');
script += '\n';
}
}
}
if(script.length() > 0) {
Serial.println();
Serial.println("# Executing script:");
Serial.println(lua.Lua_dostring(&script));
}
}