This program is tested on Raspberry Pi 2 with Pixel image. It can also run on other Raspberry Pi variants. But, if you are using Raspberry Pi 3, make sure that you first visit this link: https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=151454 to configure the UART of Raspberry Pi 3.
This demo was tested on a Raspberry Pi 2 running Raspbian with PIXEL. It can also run on other Raspberry Pi variants. However, if you are using the Raspberry Pi 3, make sure to visit this link first to properly configure the UART port: