SparkFun Forums 

Where electronics enthusiasts find answers.

General MicroView Support area - You have questions, find your answers here.

Moderators: marcus@geekammo, Help@GeekAmmo

By ryemac3
#188635
I have a small clock interface that I'm working on. In order to set the clock, I have a button that steps the user through the various fields: hours, minutes, month, day, year, etc. Another push button increments the value. In order to let the user know what value they are setting, I wanted to invert the value being displayed. So far all I've been able to do is invert the entire display. I thought that passing oled.invert(hours); for example, would do the trick, but it just inverts the whole display.

How do you invert just a single portion of the display, or a single value on screen?

Or do I have to create an inverted font and swap out the characters?
By scotta
#188644
I haven't tried it, but I think using some combination of setColor() and setDrawMode(), before writing your text, should allow you to write inverted text, or any other object.

You may find that the area that you want to write to has to be cleared or inverted before writing the text. You could do that with a filled rectangle, or writing text spaces before the actual text you want to display.
By ryemac3
#188656
Cool. Thanks. That works.

Image

You can see how I've inverted the month in one image and minutes in the other. Although the font does leave something to be desired, it's progress nonetheless. Thanks.