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
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
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
Cool. Thanks. That works.


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.
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]