JaapBraam / LoRaWanGateway

A LoRaWan Gateway in LUA
MIT License
223 stars 74 forks source link

I can not run your code on my board,plz help #6

Closed yuguangyu closed 8 years ago

yuguangyu commented 8 years ago

I am not familiar with nodemcu and I just followed your steps.

I encountered a problems: PANIC: unprotected error in call to Lua API (bad argument #1 to '?' (number expected, got nil))

and the nodemcu restart over and over. and I am confused.

JaapBraam commented 8 years ago

Do you have the hardware settings in init.lua? It looks like the pin assignments for DIO0 and DIO1 can't be found.

in init.lua you need to set the pins you connected the DIO0 and DIO1 lines of your SX1276 to:

-- hardware setup
GW_DIO0=1
GW_DIO1=2
yuguangyu commented 8 years ago

I got the source code from github and did not change them. I will check the wire connection.

yuguangyu commented 8 years ago

thanks a lot! I find the problem, the luaLoader I used uploaded the .lua wrongly, and I upload the .lua with ESPlorer again, and it runs quiete well.