improved and tested demo code.
added support for i2c version of atomic counter.