Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uart module vs spi module ? #276

Closed
crapthings opened this issue Mar 13, 2015 · 2 comments
Closed

uart module vs spi module ? #276

crapthings opened this issue Mar 13, 2015 · 2 comments

Comments

@crapthings
Copy link

Which should i use ?

mqttClient:on("message", function(conn, topic, data)
uart.write(0, data)
end)

i've got this crashed by using uart.write

PANIC: unprotected error in call to Lua API (mqtt.lua:16: bad argument #2 to 'write' (

@nodemcu
Copy link
Collaborator

nodemcu commented Mar 14, 2015

I think maybe the data is nil, can you check it with

--uart.write(0, data)
if data then uart.write(0, data)

@crapthings
Copy link
Author

thanks will give a try ~

@nodemcu nodemcu closed this as completed Apr 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant