// या कोडचा उद्देश आहे तुमच्या ILI9341 डिस्प्लेवर रेनबो अॅनिमेशन दाखवणे
// www.mr.langford.co/pixelpy
// Adafruit_ILI9341 लायब्ररी आयात करा
#include <Adafruit_GFX.h>
#include <Adafruit_ILI9341.h>
// डिस्प्लेचे आकार निर्धारित करा
#define TFT_WIDTH 320
#define TFT_HEIGHT 240
// डिस्प्लेचे रंग निर्धारित करा
#define TFT_BLACK 0x0000
#define TFT_WHITE 0xFFFF
// डिस्प्लेचे पिन निर्धारित करा
#define TFT_CS 10
#define TFT_DC 9
#define TFT_RST 8
// डिस्प्लेचा ऑब्जेक्ट तयार करा
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);
// या एका मार्गाने तुम्ही u8g लायब्ररीसाठी चित्रे व्यक्त करू शकता
const uint8_t upir_logo[] U8G_PROGMEM = {
B00010101, B11010111, // ░░░█░█░███░█░███
B00010101, B01000101, // ░░░█░█░█░█░░░█░█
B00010101, B10010110, // ░░░█░█░██░░█░██░
B00011001, B00010101 // ░░░██░░█░░░█░█░█
};
const uint8_t img_bubble_tip[] U8G_PROGMEM = {
B01111100, //░█████░░
B00111000, //░░███░░░
B00010000 //░░░█░░░░
};
int potentiometer_value = 0;
int center_x = TFT_WIDTH / 2;
int center_y = TFT_HEIGHT / 2;
int radius_pixel = TFT_HEIGHT / 2 - 10;
int radius_line = TFT_HEIGHT / 2 - 20;
int radius_text = TFT_HEIGHT / 2 - 30;
float start_x = 0;
float start_y = 0;
float end_x = 0;
float end_y = 0;
float text_x = 0;
float text_y = 0;
float angle = 0;
int value_min = 0;
int value_max = 1000;
int tick_value = 0; // value for the current tickmark
byte precalculated_x_radius_pixel[150]; // lookup table to prevent expensive sin/cos calculations
byte precalculated_y_radius_pixel[150]; // lookup table to prevent expensive sin/cos calculations
byte precalculated_x_radius_line[150]; // lookup table to prevent expensive sin/cos calculations
byte precalculated_y_radius_line[150]; // lookup table to prevent expensive sin/cos calculations
byte precalculated_x_radius_text[150]; // lookup table to prevent expensive sin/cos calculations
byte precalculated_y_radius_text[150]; // lookup table to prevent expensive sin/cos calculations
float fps; // FPS measurement for performance optimizations
unsigned long millis_time; // fps
unsigned long millis_time_last; // fps
char knob_value[20]; // big value on top of the screen
int string_width;
void setup() {
tft.begin(); // डिस्प्लेला सुरुवात करा
tft.setRotation(3); // डिस्प्लेचा ओळख बदला
tft.fillScreen(TFT_BLACK); // डिस्प्लेला काळा रंगाने भरा
// रेडियस_पिक्सेलसाठी x आ