MagicCode Lesson 9
Using the onboard OLED Screen
Display text, simple logos and images on the OLED screen
- Using Adafruit OLED library
We create the content we need to print onto the screen using “Write [Text] on display” and “Draw [shape] on display” blocks. You can display your content where you want by giving the location with corresponding X and Y coordinates. In this display, the X coordinate is within the range of “0 to 128” and the Y coordinate has the “0 to 64” range. There are some other blocks to clear the display, set the font size, and set the shape size with Magicbit blocks.
Drag and Drop following blocks from the block palate and create the following Script.
This program starts by clicking the green flag on MagicCode interface. The second block clears the display. It means all the pixels are off. After that, the third block of the script set font size. The next box is responsible for writing the given text on the given location on the screen.
Note: Make a program to display the ADC value of the potentiometer on the OLED display.