Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9882 Discussions

Can you use a digital input to run a program?

NHoop
Beginner
1,025 Views

Hello all!

This is my first post here, and I'm sorry if the question has been asked and answered before, but I'm curious to know is there a way to make one of the digital input pins start a node server? As it is currently I use the command line to start and terminate the node, but would it be possible to make a button input that could run the file? Any help is much appreciated and if this has been resolved before please send me a link to the thread.

Thanks in advance!

0 Kudos
2 Replies
idata
Community Manager
140 Views

Hi Mrsockyman,

 

 

Thanks for your interest in the Intel Galileo platform.

 

 

I think that it is possible to do this by creating and running a program that is waiting for a digital input, maybe using a Galileo interrupt pin, and then execute your node program after the input change has been detected. You could run this program in the Linux terminal and also, it is possible to run it in the background, in order to do it you can add "&" to the command line, for example # node my_code.js &

 

 

Additionally, you can find useful information regarding the Galileo interrupts here: /message/231257# 231257 https://communities.intel.com/message/231257# 231257.

 

 

Hope this information helps.

 

 

Regards,

 

-Yermi A.

 

idata
Community Manager
140 Views

Hi Mrsockyman,

 

 

I would like to know if you have any other question or still need help in this case.

 

 

Regards,

 

-Yermi A.

 

Reply