Changing screen color

Changing screen color

Now that you're accustomed to every type of block, it's time to learn how to use them!

Let's begin!

Example #1

Let's kick things off as simply as possible.

The main component on Nibble is definitely the screen since working without one would be pretty much impossible.

What we want to do as a test is to change the screen color of our program.
The default screen color is black, or as it is known in our library, TFT_BLACK.

First, include the "begin nibble variant" block from the "I/O" section:

All colors from this library are labeled with TFT_ prefix because they are made to be used on TFT screens.

Now let's move to the code generated by the blocks.
The first thing we need to take is the "Loop forever" block from the "Loops" block section. This block will ensure your code is run all the time.

In the "Display" block section find the "Fill frame with" block and place it inside the purple block. You can choose any color you want by clicking on the color part of the block. 

For this example, we chose cyan.

Click on the Run button.

Nibble's screen should now be cyan. It's really as simple as that.

This is just a beginning but you can imagine that the possibilities of this screen are countless.  

random image

If you want to put the stock firmware back onto your device, you can click the Restore firmware button in the top right corner on CircuitBlocks.