This is the second verison of the code Yao-li sent me. It is also not meant for Bamboo display, although it has less graphic features (such as add particles on the screen)