change to support pebble 2.0

1.include
2.main
3.dynamic memory allocation