Bubble display example using NXP PCAL9555A GPIO expander

Dependencies:   mbed-dev

Fork of PCAL9555_Hello by InetrfaceProducts NXP

Committer:
nxp_ip
Date:
Thu Mar 19 04:22:27 2015 +0000
Revision:
1:15df36975a85
Parent:
0:26310705044b
Child:
2:ae0b95d42407
sample code with high-level API

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nxp_ip 1:15df36975a85 1 #include "mbed.h"
nxp_ip 1:15df36975a85 2 #include "PCAL9555.h"
nxp_ip 0:26310705044b 3
nxp_ip 1:15df36975a85 4 PCAL9555 gpio_exp( p28, p27, 0xE8 ); // SDA, SCL, Slave_address(option)
nxp_ip 1:15df36975a85 5 GpioBusOut mypins( gpio_exp, X0_0, X0_1, X0_2, X0_3 );
nxp_ip 1:15df36975a85 6
nxp_ip 1:15df36975a85 7 int main() {
nxp_ip 1:15df36975a85 8 while( 1 ) {
nxp_ip 1:15df36975a85 9 for( int i = 0; i < 16; i++ ) {
nxp_ip 1:15df36975a85 10 mypins = i;
nxp_ip 1:15df36975a85 11 wait( 0.1 );
nxp_ip 1:15df36975a85 12 }
nxp_ip 0:26310705044b 13 }
nxp_ip 0:26310705044b 14 }