Chat freely about anything...

User avatar
By alonewolfx2
#5176 i cant make it work. i follow instruction and i am getting
Code: Select allNodeLua 1.0.20141219 (With liblua 5.1.5) Copyright (C) 2014 NodeLua.org free mem=32912
Node:10221

in putty. but i am getting this in web ide.
Code: Select all Your Node is offline, you may need to reset it manually. If you are running it for the first time, please follow the instructions
but i set wifi parameters and i cant check this. print(wifi.sta.getip()) not working. i think its not implemented yet.
User avatar
By Harold L.
#5187
alonewolfx2 wrote:i cant make it work. i follow instruction and i am getting
Code: Select allNodeLua 1.0.20141219 (With liblua 5.1.5) Copyright (C) 2014 NodeLua.org free mem=32912
Node:10221

in putty. but i am getting this in web ide.
Code: Select all Your Node is offline, you may need to reset it manually. If you are running it for the first time, please follow the instructions
but i set wifi parameters and i cant check this.


Yep, you noticed that problem:) I'll implement the automatic reloading in the next release. For now, you need to reset the Node manually after clicking "Save & Run" ;)

alonewolfx2 wrote: print(wifi.sta.getip()) not working. i think its not implemented yet.


The API for getting node's ip addr was a little different with another project named nodemcu, try this:

print(wifi.getip())

Btw, Here is the API-refs: http://nodelua.org/doc/api-references/wifi/ (Timer's API has much more different, NodeLua supports multiple timers)
User avatar
By alonewolfx2
#5188 can you explain how I can add or implement new functions for getting chipid?i take a quick look on the code and i tried adding function in lnode_node.c but i cant worked :) and finally how can i compile code to one flash.fw? (i can compile on linux and i tried gen_misc.sh. i have flash.bin and iromtext.bin. how can i compile one bin ?
thank you for your work. this project changed the game :)
User avatar
By Harold L.
#5191
alonewolfx2 wrote:can you explain how I can add or implement new functions for getting chipid?i take a quick look on the code and i tried adding function in lnode_node.c but i cant worked :) and finally how can i compile code to one flash.fw? (i can compile on linux and i tried gen_misc.sh. i have flash.bin and iromtext.bin. how can i compile one bin ?
thank you for your work. this project changed the game :)


Thank you for trying it out :) I planned to add APIs for reading node’s status, such as free heap spaces, chipid, SPI Flash chip ID, etc. The related module is ‘node’ (still undocumented), codes are in this file: /app/lua/lnode_node.c
For now you can see a entry 'free' in lnode_node.c, call it like this: print(node.free()). If you added another entry, just call it the same way.


To put the two separated bin files into one, you can check my Makefile which calls gen_flashbin.py to do the real job:
../tools/gen_flashbin.py ../bin/eagle.app.v6.flash.bin ../bin/eagle.app.v6.irom0text.bin


It simply writes “eagle.app.v6.flash.bin” to the offset 0x0, and writes eagle.app.v6.irom0text.bin to offset 0x10000, fill gaps between them with 0xFF :)