I am trying to write code for my intel edison that after a certain time of not receiving any data from a sensor, the edison shuts off completely. I do know that linux has the "shutdown now" code if I am in command line but I can't seem to figure out past that.
I am using Intel XDK.
Thanks for any help!
If you are using Node.js, the best way to use a system command (like poweroff, which is used to shut down the board) is to use Child Process. I suggest you to read Node's manual section for Child Process, there you should be able to get more information about how to achieve this.
Let me know if this information helps you.
That's great to hear, I'm glad it's working. If you ever have any other doubts, please don't hesitate to come back to the community.