O'Reilly logo

Mastering Arduino by Jon Hoffman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Rounded rectangle

The rectangle functions take five parameters. The first two are the X/Y coordinates of the upper left corner of the rectangle. The next two parameters are the X/Y coordinates of the lower right-hand corner of the rectangle, and the last parameter is the color to draw the rectangle and the color to fill the rectangle for the fillRect() function.

The next two examples show how we can draw rounded rectangles with the Adafruit library:

display.drawRoundRect(15,15,30,15,4,BLACK);

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required