#BEE Board Board and teh DAISY-22 I2C Expander

How to expand pinout using i2c bus

## Multiple GPIO Expander can be driven simultaneously

<p class="abstract" >A total of 8 I2C Expander can be used simultaneousl, for a total of 64 additional GPIO </p>

<td><img src="./beeboard_8_i2c_exp.png"/></td>

*Note: In this image Daisy Flat Cable is connected to W4 but you can also connect to W1*

## Library to mange Daisy-22 with BEE Board

This library is a simple way to expand pinout using DAISY-22.

* Download and Install it by following [this guide](http://www.acmesystems.it/beeboard_add_libraries_to_ide).
* Plug Ribble Cable on Wings W1 or W4.
* Configure DIP-Switch by following [this page](/DAISY-22)
* open IDE and iclude Dasiy22 Library.

## Write Single Pin

<span class="github" user="Madefree" project="playground" file="WriteSinglePin/WriteSinglePin.pde">WriteSinglePin.pde
</span>

The function *Daisy22::digitalWrite()* accepts as a parameter the port number and the state to write

<img src="./daisy22_scope.png" width="320" height="240"/>

## Write All Pins

<span class="github" user="Madefree" project="playground" file="WriteAllPins/WriteAllPins.pde">WriteAllPins.pde
</span>

The function *Daisy22::digitalWrite()* accepts as a parameter 1Byte to write the all P0-P7 pins

## Read Single Pin

<span class="github" user="Madefree" project="playground" file="ReadSinglePin/ReadSinglePin.pde">ReadSinglePin.pde
</span>

The function *Daisy22::digitalRead()* accepts as a parameter the port number to read

## Read All Pins

<span class="github" user="Madefree" project="playground" file="ReadAllPins/ReadAllPins.pde">ReadAllPins.pde
</span>

The function *Daisy22::digitalRead()* returns a byte corresponding to the state of all pins

<img src="./daisy22_serial.png"/>

## Related links

* [Madefree web site](http://beeboard.madefree.eu/doku.php/fly_on_daisy:daisy22_i2c_expander)
* [BEE Board PINOUT](http://www.acmesystems.it/beeboard_pinout)

@shop='BEEBOARD'
@shop='BEEKIT-1'
@shop='DAISY-22'
@shop='FC-19818-10P-FF'
@shop='JJ-02291-10P-F'
@shop='FC-3754-1M'
