ni-c / heimcontrol.js

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

Serial comms #22

Closed thebadger412 closed 10 years ago

thebadger412 commented 10 years ago

Has anyone made a plug in or some example code which just takes a button and sends out a command through the serialport..

I don't want to use an arduino but another processor and would love to use heim control to just send out my own strings out the port..

ni-c commented 10 years ago

Hey!

I don't know any serialport plugins for heimcontrol.js.

If you can control your microcontroller over I2C, there is a node module for communication over the I2C ports of the Rasperry PI: https://github.com/ni-c/node-rasp2c. It should be easy to create an I2C plugin for heimcontrol.js based on this module, if you copy the GPIO plugin and use this as a template for the new plugin.

There is also an example project for I2C communication between a RaspberryPI and an ATTiny2313 MCU: https://github.com/ni-c/raspberry2c