i2c is working

added code to process i2c and a switch statement to run different
patterns