Arduino Programming: Advanced Methods and Strategies to Learn Arduino Programming by Nicholas Stuart

Arduino Programming: Advanced Methods and Strategies to Learn Arduino Programming by Nicholas Stuart

Author:Nicholas, Stuart [Nicholas, Stuart]
Language: eng
Format: epub
Published: 2020-12-24T16:00:00+00:00


Filled Shape

display.fillCircle(display.width()/2, display.height()/2, 6, BLACK);

Four parameters are required in the circle function. The first and second parameters, the X and Y coordinates, are for the circle's center. In the above-written codes, the center of the screen is considered as the center of the circle. The radius of the circle is the third parameter. And the last and the fourth parameter of the circle function is the color of the circle. This parameter is also considered as the color to fill the circle for the function fillCircle ( ).

Rectangle

In this section, we will look at codes that correspond to displaying different types of rectangles. For instance, we will see how to display a rectangle that is internally filled with pixels, a rectangle whose corners are smoothly rounded off instead of being sharp and pointed, and finally, a rounded corner rectangle that is internally filled with pixels.

To display a standard rectangle, we use the following code

display.drawRect(15,15,30,15,BLACK);



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.