As an Amazon Associate I earn from qualifying purchases.
I have previously shown how to use the Arduino Fio and the mini12864 graphical LCD to create a simple oscilloscope. For this post, I wanted to demonstrate the u8glib console demo because I plan on using the GLCD to debug some of my projects and to provide a visual interface for experiments with the Microchip RN-171-XV.
More information on the project, a video of it in operation, and its code after the break.
A little while ago, I picked up an Arduino Fio (available on Amazon.com) and the mini12864 graphical LCD (available on dx.com & Amazon.com) for some microcontroller tinkering. It turned out that a great graphical LCD library was available — u8glib — that supports the mini12864’s controller (the UC1701).
Using u8glib, the Arduino and the GLCD communicate flawlessly. Thankfully, the mini12864 is 3.3V compatible, so there are no issues setting it up with the Arduino Fio and the simple SPI connection makes setup surprisingly easy. As mentioned, I was able to use u8glib to port my oscilloscope code from CCS C to the Arduino:
In addition to all of the functions u8glib provides, the library also comes with a nice little serial console/terminal demonstration program. The current u8glib console code can be found here.
I added four functions that would allow me to quickly and easily debug my applications u8g_print, u8g_println, u8g_print_P, and u8g_println_P. u8g_print allows one to print a character array, u8g_println does the same, but then adds a new line to the end of the string, u8g_print_P allows you to print a character array saved in program memory, and u8g_println_P does the same but adds a new line. Here are the new functions:
This allowed me to create this simple demo of the GLCD debug console code:
And last but not least, here is the Arduino Sketch used to produce the above output:
Amazon and the Amazon logo are trademarks of Amazon.com, Inc, or its affiliates.