Lua1.0编译通过,但无法烧写的问题
RT我修改了Lua1.0的部分代码,然后在Arduino的IDE中完成了编译
但是却不能烧写HEX成功,请问大家这是什么原因呢~
大家可以下载附件中的源码自己试下~有解决的了同学,欢迎回帖指教~
#include "lua.h"
static void sayhello()
{
lua_Object obj = lua_getparam (1);
if(lua_isstring(obj)) {
Serial.println(lua_getstring(obj));
} else {
Serial.println("Exception: arg is not a string");
}
}
void setup ()
{
Serial.begin(9600);
lua_register("sayhello", sayhello);
}
void loop()
{
lua_dostring("sayhello(\"Hi, this is a message from lua script code\")");
delay(1000);
}
页:
[1]