Tinyscreen+ Circles

jgavlik

  • Sr. Member
  • ****
    • Posts: 68
    • View Profile
Is there a way to draw a circle on the Tinyscreen+ display?

-john


Volcanology

  • Newbie
  • *
    • Posts: 2
    • View Profile
Yes, there is a way to draw a circle on the Tinyscreen+ display, which is a color OLED display for the TinyDuino system https://learn.tinycircuits.com/Display/TinyScreen_TinyShield_Tutorial/. You can use the TinyScreen library, which is a library that supports both the OLED screen and the buttons on the board https://github.com/TinyCircuits/TinyCircuits-TinyScreenPlus-ASM2022/blob/master/examples/TinyScreenBasicExample/TinyScreenBasicExample.ino. The library has a function called drawCircle, which can draw a circle with a specified center, radius, and color. Here is an example code that can draw a circle on the Tinyscreen+ display:
geometry dash
#include <Wire.h>
#include <SPI.h>
#include <TinyScreen.h>

//Create a TinyScreen object
TinyScreen display = TinyScreen(TinyScreenPlus);

//Define the center, radius, and color of the circle
int centerX = 48; //The center x coordinate, from 0 to 95
int centerY = 32; //The center y coordinate, from 0 to 63
int radius = 20; //The radius of the circle, from 0 to 31
int color = TS_8b_White; //The color of the circle, using TS library color definitions

void setup() {
//Initialize the display
display.begin();
//Set the display to normal mode
display.setFlip(0);
//Clear the display
display.clearScreen();
//Draw a circle on the display
display.drawCircle(centerX, centerY, radius, color);
}

void loop() {
//Do nothing
}

I hope this helps.
« Last Edit: January 22, 2024, 09:48:20 PM by Volcanology »


mansikalra

  • Newbie
  • *
    • Posts: 0
    • View Profile
It is crucial that we honor all of your requests and accept all of your conditions. We give gorgeous girls who can truly enjoy life at Bhopal Escorts service , so you'll have a lot more fun.


yasminansari

  • Newbie
  • *
    • Posts: 0
    • View Profile
If you're in search of Call Girls near Hilton Garden Inn Hotel Delhi, be aware that some Agencies provide oral sex to their customers. If you don't know anything about it, visit the local club or restaurant that provides the service. When selecting a Escorts near Hilton Garden Inn Hotel New Delhi , ensure she is from the area - you could ask her family tree if she knows any details about it!


 

SMF spam blocked by CleanTalk