It’s time to combine everything:

This is a setup with all the sensor interfaces documented in recent posts:
- a SHT11 to measure relative humidity (and temperature)
- a BMP085 sensor to measure barometric pressure (and temperature)
- PIR + LDR sensors to demonstrate reading digital and analog signals
- a Nunchuk with 2-axis joystick, 3-axis accelerometer, and 2 buttons
A new “combi_demo” has been added to the Ports library. The code is essentially the concatenation of the individual demo source files (you can browse the real thing here):

This example illustrates how the Ports library lets you mix and match drivers and ports at will. Note that two I2C interfaces are running in parallel at different speeds (sure, the BMP085 and the Nunchuk could also have been tied to a single port, running at 100 KHz).
Sample output;

This example compiles to 9114 bytes of code with the Arduino 13 IDE, so there is still plenty of room left to add, say, a wireless driver.