极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10313|回复: 0

Lua1.0编译通过,但无法烧写的问题

[复制链接]
发表于 2014-2-25 10:52:00 | 显示全部楼层 |阅读模式
RT
我修改了Lua1.0的部分代码,然后在Arduino的IDE中完成了编译
但是却不能烧写HEX成功,请问大家这是什么原因呢~
大家可以下载附件中的源码自己试下~有解决的了同学,欢迎回帖指教~

  1. #include "lua.h"

  2. static void sayhello()
  3. {
  4.     lua_Object obj = lua_getparam (1);
  5.     if(lua_isstring(obj)) {
  6.         Serial.println(lua_getstring(obj));
  7.     } else {
  8.         Serial.println("Exception: arg is not a string");
  9.     }
  10. }
  11. void setup ()
  12. {   
  13.     Serial.begin(9600);
  14.     lua_register("sayhello", sayhello);
  15. }   

  16. void loop()
  17. {
  18.     lua_dostring("sayhello("Hi, this is a message from lua script code")");
  19.     delay(1000);
  20. }

复制代码


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|联系我们|极客工坊

GMT+8, 2026-6-15 13:09 , Processed in 0.084295 second(s), 19 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表