According to your description, it seems to be a known issue reported in the latest Yocto image. This means that the issue is neither in the Arduino sketch nor the libraries you use, but in the Yocto image version.
I recommend you to re-flash your Edison with the following Yocto image and check if the issue is resolved: Intel Edison Software Release 2.1
Yes, you are right! I re-flash my Edison with the Yocto image you link and it works! However, I thought it would start to work and display things as long as I plug the external power. In fact, I have to connect the two micro USB and the external power first, then it starts to work. After that, I can unplug the two micro USB and only keep the power cable.