The Magic 8 Ball application displays messages on the LCD when the touch sensor module is tapped. There are 20 statements out of which any one can appear randomly at each tap on the sensor. So ask away!
- DragonBoard 410c
- Power Supply
- Sensors Mezzanine
- Micro USB Cable
- Grove-LCD 16x2 RGB Backlight
- Grove Touch Sensor Module
To begin, connect the Sensors Mezzanine board onto the DragonBoard via the low-speed expansion connector on both boards. Use the Grove Universal 4 pin cables to connect the LCD to I2C0 and the Touch sensor module onto GPIO G3. You can find an image of the setup in the images folder. That’s it! We’re all set to run our application.
- MRAA Library
$ sudo apt-get install libupm-dev
- UPM Library
$ sudo apt-get install libmraa-dev
$ git clone https://github.com/96boards-projects/magic8.git
$ cd projects
$ cd magic8
$ make
$ ./magic8
When the executable is run, the application displays an initial message on the LCD and waits for the sensor to be tapped. With each tap, a new statement is displayed. These statements can be modified by the user in the code.