sample code for gpio and i2c