working flash counter with i2c.