<commit_before>## node-picubes   

Node.js module for Pi-Cubes.
Pi Cubes is Modular DIY/Hobby HVAC Automation system based on the Raspberry Pi. 
Supports up to 24 I/Os and 4 Thermostats.

More information: [www.cube-controls.com/pi-cubes.html](http://www.cube-controls.com/pi-cubes.html)

## Installation

    $ npm install node-picubes

I2C has to be configured on Raspberry Pi :

[www.cube-controls.com/blog/how-to-enable-i2c-on-raspberry-pi](http://www.cube-controls.com/blog/how-to-enable-i2c-on-raspberry-pi)

## Control Pi-Cubes DO4 Module

```js
var pic = require('picubes');

pic.writeDO(1,1,value,function(err){
	            if (err) console.log(err);
   	          });
```

### picubes.writeDO(module, output, value, callback)

- module - Module address(1 - 6)
- output - Output number(1 - 4)
- value  - Digital output value :
            0 = Off
			1 = On
- callback - The callback gets one argument (err).

## Control Pi-Cubes UO4 Module

```js
var pic = require('picubes');

pic.writeUO(1,1,0,value,function(err){
	              if (err) console.log(err);
   	             });
```

### picubes.writeUO(module, output, type, value, callback)

- module - Module address(1 - 6)
- output - Output number(1 - 4)
- type   - Universal output type :
			 0 = Digital Output(0 / 12VDC)
			 1 = Modulation(0 - 10VDC)
			 2 - 255 = Digital otput PWM with this period in sec.
- value  - Universal output value :
             0 / 1 = For digital type
			 0 - 100 % = for Modulation / PWM
- callback - The callback gets one argument (err).<commit_msg>Readme update !<commit_after>## node-picubes   

Node.js module for Pi-Cubes.
Pi Cubes is Modular DIY/Hobby HVAC Automation system based on the Raspberry Pi. 
Supports up to 24 I/Os and 4 Thermostats.

More information: [www.cube-controls.com/pi-cubes.html](http://www.cube-controls.com/pi-cubes.html)

## Installation

    $ npm install node-picubes

I2C has to be configured on Raspberry Pi :

[www.cube-controls.com/blog/how-to-enable-i2c-on-raspberry-pi](http://www.cube-controls.com/blog/how-to-enable-i2c-on-raspberry-pi)

## Control Pi-Cubes DO4 Module

```js
var pic = require('picubes');

pic.writeDO(1,1,value,function(err){
	            if (err) console.log(err);
   	          });
```

### picubes.writeDO(module, output, value, callback)

- module - Module address(1 - 6)
- output - Output number(1 - 4)
- value  - Digital output value :
			0 = Off
			1 = On
- callback - The callback gets one argument (err).

## Control Pi-Cubes UO4 Module

```js
var pic = require('picubes');

pic.writeUO(1,1,0,value,function(err){
	              if (err) console.log(err);
   	             });
```

### picubes.writeUO(module, output, type, value, callback)

- module - Module address(1 - 6)
- output - Output number(1 - 4)
- type   - Universal output type :
			 0 = Digital Output(0 / 12VDC)
			 1 = Modulation(0 - 10VDC)
			 2 - 255 = Digital otput PWM with this period in sec.
- value  - Universal output value :
             0 / 1 = For digital type
			 0 - 100 % = for Modulation / PWM
- callback - The callback gets one argument (err).
{'fraction_non_alphanumeric': 0.13555483662245227, 'fraction_numerical': 0.026528631510837918, 'mean_word_length': 2.7342995169082127, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1001139', 'n_tokens_mistral': 1176, 'n_tokens_neox': 1049, 'n_words': 299}