@@ -6,22 +6,20 @@ static int lua_wrapper_pinMode(lua_State *lua_state) {
6
6
int a = luaL_checkinteger (lua_state, 1 );
7
7
int b = luaL_checkinteger (lua_state, 2 );
8
8
pinMode (a, b);
9
+ return 0 ;
9
10
}
10
11
11
12
static int lua_wrapper_digitalWrite (lua_State *lua_state) {
12
13
int a = luaL_checkinteger (lua_state, 1 );
13
14
int b = luaL_checkinteger (lua_state, 2 );
14
15
digitalWrite (a, b);
16
+ return 0 ;
15
17
}
16
18
17
19
static int lua_wrapper_delay (lua_State *lua_state) {
18
20
int a = luaL_checkinteger (lua_state, 1 );
19
21
delay (a);
20
- }
21
-
22
- static int lua_wrapper_print (lua_State *lua_state) {
23
- String a = String (luaL_checkstring (lua_state, 1 ));
24
- Serial.println (a);
22
+ return 0 ;
25
23
}
26
24
27
25
static int lua_wrapper_millis (lua_State *lua_state) {
@@ -33,7 +31,6 @@ void setup() {
33
31
lua.Lua_register (" pinMode" , (const lua_CFunction) &lua_wrapper_pinMode);
34
32
lua.Lua_register (" digitalWrite" , (const lua_CFunction) &lua_wrapper_digitalWrite);
35
33
lua.Lua_register (" delay" , (const lua_CFunction) &lua_wrapper_delay);
36
- lua.Lua_register (" print" , (const lua_CFunction) &lua_wrapper_print);
37
34
lua.Lua_register (" millis" , (const lua_CFunction) &lua_wrapper_millis);
38
35
Serial.begin (115200 );
39
36
}
0 commit comments