ni-c / heimcontrol.js

Home-Automation with node.js and Raspberry PI
MIT License
1.41k stars 297 forks source link

Changing arduino digital pin values (high/low) based upon sensor value #130

Open anno143 opened 8 years ago

anno143 commented 8 years ago

hi there! I m working on a home automation project. I slightly modified Arduino plugin and added some extra keys in arduino collection. these 2 keys are essentially arduino digital io pin numbers. I am also using a mq2 gas sensor in my project. Now based upon the value of sensor i need to change values of those digital io pins . can somebody guides me how i will do this? and also there is another issue that when i start heimcontrol, sometime arduino sensor shows value correctly and sometime it only shows 0 despite of correct hardware connections. Can somebody explain?

I'll appreciate your help! Thanks

tjanson commented 8 years ago

I’m afraid the sensor problem will be difficult to debug from afar. As for the other issue, can you tell us more details about what exactly you’re trying to do? And please show us the code (push it to your fork and paste a link to the relevant section), that will make it far easier for anyone trying to assist you.