//###################################################
//Coded By Salar Amirsalari(D4viss) #
//And Amir Mohammad Roshanali(Quartz) #
//And Amir Hossein Bijanzadeh(Amiro) #
//###################################################
//crating a selection group for each select menue and things
#if 1
#include <Adafruit_GFX.h>
#include <MCUFRIEND_kbv.h>
#include <TouchScreen.h>
#include "Mainmenu.h"
#include "4OHMmenue.h"
#include "Tut.h"
#define MINPRESSURE 0.001
#define MAXPRESSURE 1000
//calibraation
const int XP = 8, XM = A2, YP = A3, YM = 9;
const int TS_LEFT = 919, TS_RT = 127, TS_TOP = 952, TS_BOT = 100;
TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300);
//button mapping section
const int ButtonUp = 23;
const int ButtonDown = 25;
const int ButtonLeft = 27;
const int ButtonRight = 29;
const int ButtonOk = 31;
const int ButtonReturn = 33;
int pixel_x, pixel_y;
int zone = 1;
int OHMZONE = 1;
int x = 0;
int y = 0;
int z = 0;
int line_indicator = 1;
int the_color_code = 0;
int tut_page = 1;
int resistor_line_control = 4;
int if_helpme = 1;
//ohm_interpreter = 0;
#define black 0x0000
#define blue 0x001F
#define red 0xF800
#define green 0x07E0
#define cyan 0x07FF
#define yellow 0xFFE0
#define white 0xFFFF
#define navy 0x000F
#define dgreen 0x03E0
#define dcyan 0x03EF
#define maron 0x7800
#define purple 0x780F
#define olive 0x7BE0
#define lgrey 0xC618
#define dgrey 0x7BEF
#define orange 0xFD20
#define gyellow 0xAFE5
#define pink 0xF81F
//void start
//start void for touch and hardware setup
bool Touch_getXY(void) {
TSPoint p = ts.getPoint();
pinMode(YP, OUTPUT); //restore shared pins
pinMode(XM, OUTPUT);
digitalWrite(YP, HIGH); //because TFT control pins
digitalWrite(XM, HIGH);
bool pressed = (p.z > MINPRESSURE && p.z < MAXPRESSURE);
if (pressed) {
pixel_x = map(p.x, TS_LEFT, TS_RT, 0, tft.width()); //.kbv makes sense to me
pixel_y = map(p.y, TS_TOP, TS_BOT, 0, tft.height());
}
return pressed;
}
void pinmake() {
pinMode(ButtonUp, INPUT_PULLUP);
pinMode(ButtonDown, INPUT_PULLUP);
pinMode(ButtonLeft, INPUT_PULLUP);
pinMode(ButtonRight, INPUT_PULLUP);
pinMode(ButtonOk, INPUT_PULLUP);
pinMode(ButtonReturn, INPUT_PULLUP);
}
void Draw_menue() {
draw_up_panel();
draw_right_panel();
window_top_left();
window_top_right();
window_down_left();
window_down_right();
draw_down_panel();
}
void reset_menue() { //a void to fill the screen with background color
tft.fillScreen(cyan);
Draw_menue();
}
void select_zone(int zone) { //creating a zone selectro to show the selected item and update the screen on each selection
if (zone == 1) {
tft.drawChar(10, 50, '#', white, lgrey, 3); // zone 1 top left
window_top_right();
window_down_left();
window_down_right();
}
if (zone == 2) {
tft.drawChar(215, 50, '#', white, dgreen, 3); // zone 2 top right
window_top_left();
window_down_left();
window_down_right();
}
if (zone == 3) {
tft.drawChar(10, 155, '#', white, red, 3); // zone 3 down left
window_top_left();
window_top_right();
window_down_right();
}
if (zone == 4) {
tft.drawChar(215, 155, '#', white, orange, 3); // zone 4 down right
window_top_left();
window_top_right();
window_down_left();
}
}
void use_menu() { //programming buttons to work with the zone_selection part
x = 0;
y = 0;
while (x < 1) {
while (y < 1) {
select_zone(zone);
y = 1;
}
Serial.println("now im inthe loop");
Serial.println(zone);
delay(50);
if (digitalRead(ButtonDown) == LOW) { //menue going down
if (zone == 1) {
zone = 3;
}
if (zone == 2) {
zone = 4;
}
if (zone == 3) {
zone = 3;
}
if (zone == 4) {
zone = 4;
}
Serial.println(zone);
Serial.println("down pressed");
select_zone(zone);
}
if (digitalRead(ButtonUp) == LOW) { //menue going down
if (zone == 1) {
zone = 1;
}
if (zone == 2) {
zone = 2;
}
if (zone == 3) {
zone = 1;
}
if (zone == 4) {
zone = 2;
}
Serial.println(zone);
Serial.println("up pressed");
select_zone(zone);
}
if (digitalRead(ButtonRight) == LOW) { //menue going down
if (zone == 1) {
zone = 2;
}
if (zone == 2) {
zone = 2;
}
if (zone == 3) {
zone = 4;
}
if (zone == 4) {
zone = 4;
}
Serial.println(zone);
Serial.println("right pressed");
select_zone(zone);
}
if (digitalRead(ButtonLeft) == LOW) { //menue going down
if (zone == 1) {
zone = 1;
}
if (zone == 2) {
zone = 1;
}
if (zone == 3) {
zone = 3;
}
if (zone == 4) {
zone = 3;
}
Serial.println(zone);
Serial.println("left pressed");
select_zone(zone);
}
pressed_enter();
}
}
void pressed_enter() {
if (digitalRead(ButtonOk) == LOW) { //listening for the ok button
if (zone == 1) {
tft.fillScreen(lgrey);
}
if (zone == 2) {
tft.fillScreen(dgreen);
}
if (zone == 3) {
Tut_Sel();
}
if (zone == 4) {
tft.fillScreen(black); // if chosed the menue will go into the buttons on ohm
BUTTONS_ON_OHM();
}
reset_menue();
x = 1;
}
}
void listen_for_back() { // its not fully fnctioning but its going to listen for back button press
while (true) {
if (digitalRead(ButtonReturn) == LOW) {
break;
} else {
;
;
}
}
}
void BUTTONS_ON_OHM() {
z = 0;
line_indicator = 1;
reset_OHM_MENUE();
draw_4OHM_Calc_menue();
while (z < 1) {
delay(50);
while (true) {
delay(150);
if (digitalRead(ButtonRight) == LOW) {
Serial.println("right pressed");
if (OHMZONE == 10) {
OHMZONE = 10;
} else {
OHMZONE = OHMZONE + 1;
}
s4OHM_Selector(OHMZONE);
Draw_4OHM_Calc_color_top_row();
break;
}
if (digitalRead(ButtonLeft) == LOW) {
Serial.println("left pressed");
if (OHMZONE == 1) {
OHMZONE = 1;
} else {
OHMZONE = OHMZONE - 1;
}
s4OHM_Selector(OHMZONE);
Draw_4OHM_Calc_color_top_row();
break;
}
if (digitalRead(ButtonOk) == LOW) {
help_me_in_if(line_indicator);
line_indicator = line_indicator +1;
Serial.println(line_indicator);
break;
}
if (digitalRead(ButtonReturn) == LOW) {
z = z + 2;
break;
}
}
}
}
void Tut_Sel() {
tut_printer(tut_page);
z = 0;
while (z < 1) {
while (true) {
if (digitalRead(ButtonRight) == LOW) {
Serial.println("right pressed");
if (tut_page == 5) {
tut_page = 5;
} else {
tut_page = tut_page + 1;
}
tut_printer(tut_page);
break;
}
if (digitalRead(ButtonLeft) == LOW) {
Serial.println("left pressed");
if (tut_page == 1) {
tut_page = 1;
} else {
tut_page = tut_page - 1;
}
tut_printer(tut_page);
break;
}
if (digitalRead(ButtonReturn) == LOW) {
z = z + 2;
break;
}
}
}
}
void help_me_in_if(int if_helpme) {
if (if_helpme == 1) {
first_row_of_4ohm(OHMZONE);
}
if (if_helpme == 2) {
second_row_of_4ohm(OHMZONE);
}
if (if_helpme == 3) {
third_row_of_4ohm(OHMZONE);
}
if (if_helpme == 4) {
forth_row_of_4ohm(OHMZONE);
ohm_calc_printed();
}
}
void setup(void) {
pinmake();
Serial.begin(9600);
tft.begin(0x9486);
tft.fillScreen(cyan);
tft.setRotation(3);
tft.invertDisplay(0);
}
void loop(void) {
Draw_menue();
use_menu();
}
#include <Adafruit_GFX.h>
#include <MCUFRIEND_kbv.h>
#include <TouchScreen.h>
#define MINPRESSURE 0.001
#define MAXPRESSURE 1000
#define black 0x0000
#define blue 0x001F
#define red 0xF800
#define green 0x07E0
#define cyan 0x07FF
#define yellow 0xFFE0
#define white 0xFFFF
#define navy 0x000F
#define dgreen 0x03E0
#define dcyan 0x03EF
#define maron 0x7800
#define purple 0x780F
#define olive 0x7BE0
#define lgrey 0xC618
#define dgrey 0x7BEF
#define orange 0xFD20
#define gyellow 0xAFE5
#define pink 0xF81F
void draw_4OHM_Calc_menue() { //drawing the ohm calc menue
tft.fillRect(5, 160, 95, 5, lgrey);
delay(50);
tft.fillRect(100, 115, 280, 100, orange);
delay(50);
tft.fillRect(380, 160, 95, 5, lgrey);
delay(50);
//start of colors
tft.fillRect(130, 115, 8, 100, black);
delay(50);
tft.fillRect(200, 115, 8, 100, black);
delay(50);
tft.fillRect(270, 115, 8, 100, black);
delay(50);
tft.fillRect(345, 115, 8, 100, black);
delay(75);
tft.fillRect(130, 115, 8, 100, white);
delay(50);
tft.fillRect(200, 115, 8, 100, white);
delay(50);
tft.fillRect(270, 115, 8, 100, white);
delay(50);
tft.fillRect(345, 115, 8, 100, white);
}
void draw_5OHM_Calc_menue() {
tft.fillRect(5, 160, 95, 5, lgrey);
delay(50);
tft.fillRect(100, 115, 280, 100, orange);
delay(50);
tft.fillRect(380, 160, 95, 5, lgrey);
delay(50);
//start of colors
tft.fillRect(128, 115, 8, 100, black);
delay(50);
tft.fillRect(184, 115, 8, 100, black);
delay(50);
tft.fillRect(240, 115, 8, 100, black);
delay(50);
tft.fillRect(296, 115, 8, 100, black);
delay(50);
tft.fillRect(346, 115, 8, 100, black);
delay(75);
tft.fillRect(128, 115, 8, 100, white);
delay(50);
tft.fillRect(184, 115, 8, 100, white);
delay(50);
tft.fillRect(240, 115, 8, 100, white);
delay(50);
tft.fillRect(296, 115, 8, 100, white);
delay(50);
tft.fillRect(346, 115, 8, 100, white);
}
void first_row_of_4ohm(int the_color_code) {
if (the_color_code == 0) {
tft.fillRect(130, 115, 8, 100, white);
}
if (the_color_code == 1) {
tft.fillRect(130, 115, 8, 100, black);
}
if (the_color_code == 2) {
tft.fillRect(130, 115, 8, 100, navy);
}
if (the_color_code == 3) {
tft.fillRect(130, 115, 8, 100, red);
}
if (the_color_code == 4) {
tft.fillRect(130, 115, 8, 100, orange);
}
if (the_color_code == 5) {
tft.fillRect(130, 115, 8, 100, yellow);
}
if (the_color_code == 6) {
tft.fillRect(130, 115, 8, 100, green);
}
if (the_color_code == 7) {
tft.fillRect(130, 115, 8, 100, blue);
}
if (the_color_code == 8) {
tft.fillRect(130, 115, 8, 100, purple);
}
if (the_color_code == 9) {
tft.fillRect(130, 115, 8, 100, lgrey);
}
if (the_color_code == 10) {
tft.fillRect(130, 115, 8, 100, white);
}
}
void second_row_of_4ohm(int the_color_code) {
if (the_color_code == 0) {
tft.fillRect(200, 115, 8, 100, white);
}
if (the_color_code == 1) {
tft.fillRect(200, 115, 8, 100, black);
}
if (the_color_code == 2) {
tft.fillRect(200, 115, 8, 100, navy);
}
if (the_color_code == 3) {
tft.fillRect(200, 115, 8, 100, red);
}
if (the_color_code == 4) {
tft.fillRect(200, 115, 8, 100, orange);
}
if (the_color_code == 5) {
tft.fillRect(200, 115, 8, 100, yellow);
}
if (the_color_code == 6) {
tft.fillRect(200, 115, 8, 100, green);
}
if (the_color_code == 7) {
tft.fillRect(200, 115, 8, 100, blue);
}
if (the_color_code == 8) {
tft.fillRect(200, 115, 8, 100, purple);
}
if (the_color_code == 9) {
tft.fillRect(200, 115, 8, 100, lgrey);
}
if (the_color_code == 10) {
tft.fillRect(200, 115, 8, 100, white);
}
}
void third_row_of_4ohm(int the_color_code) {
if (the_color_code == 0) {
tft.fillRect(270, 115, 8, 100, white);
}
if (the_color_code == 1) {
tft.fillRect(270, 115, 8, 100, black);
}
if (the_color_code == 2) {
tft.fillRect(270, 115, 8, 100, navy);
}
if (the_color_code == 3) {
tft.fillRect(270, 115, 8, 100, red);
}
if (the_color_code == 4) {
tft.fillRect(270, 115, 8, 100, orange);
}
if (the_color_code == 5) {
tft.fillRect(270, 115, 8, 100, yellow);
}
if (the_color_code == 6) {
tft.fillRect(270, 115, 8, 100, green);
}
if (the_color_code == 7) {
tft.fillRect(270, 115, 8, 100, blue);
}
if (the_color_code == 8) {
tft.fillRect(270, 115, 8, 100, purple);
}
if (the_color_code == 9) {
tft.fillRect(270, 115, 8, 100, lgrey);
}
if (the_color_code == 10) {
tft.fillRect(270, 115, 8, 100, white);
}
}
void forth_row_of_4ohm(int the_color_code) {
if (the_color_code == 0) {
tft.fillRect(345, 115, 8, 100, white);
}
if (the_color_code == 1) {
tft.fillRect(345, 115, 8, 100, black);
}
if (the_color_code == 2) {
tft.fillRect(345, 115, 8, 100, navy);
}
if (the_color_code == 3) {
tft.fillRect(345, 115, 8, 100, red);
}
if (the_color_code == 4) {
tft.fillRect(345, 115, 8, 100, orange);
}
if (the_color_code == 5) {
tft.fillRect(345, 115, 8, 100, yellow);
}
if (the_color_code == 6) {
tft.fillRect(345, 115, 8, 100, green);
}
if (the_color_code == 7) {
tft.fillRect(345, 115, 8, 100, blue);
}
if (the_color_code == 8) {
tft.fillRect(345, 115, 8, 100, purple);
}
if (the_color_code == 9) {
tft.fillRect(345, 115, 8, 100, lgrey);
}
if (the_color_code == 10) {
tft.fillRect(345, 115, 8, 100, white);
}
}
void Draw_4OHM_Calc_color_top_row() {
tft.fillRect(0, 0, 48, 45, black);
tft.fillRect(48, 0, 48, 45, navy); /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
tft.fillRect(96, 0, 48, 45, red);
tft.fillRect(144, 0, 48, 45, orange);
tft.fillRect(192, 0, 48, 45, yellow);
tft.fillRect(240, 0, 48, 45, green);
tft.fillRect(288, 0, 48, 45, blue);
tft.fillRect(336, 0, 48, 45, purple);
tft.fillRect(384, 0, 48, 45, lgrey);
tft.fillRect(432, 0, 48, 45, white);
tft.fillRect(0, 45, 480, 3, white);
}
void reset_OHM_MENUE() { //fillig the backgroudn with black for better vision
tft.fillScreen(black);
}
void s4OHM_Selector(int OHMZONE) {
tft.fillRect(0, 50, 480, 50, black);
if (OHMZONE == 1) {
tft.fillTriangle(24, 55, 12, 70, 36, 70, white);
}
if (OHMZONE == 2) {
tft.fillTriangle(72, 55, 60, 70, 84, 70, white);
}
if (OHMZONE == 3) {
tft.fillTriangle(120, 55, 108, 70, 132, 70, white);
}
if (OHMZONE == 4) {
tft.fillTriangle(168, 55, 156, 70, 180, 70, white);
}
if (OHMZONE == 5) {
tft.fillTriangle(216, 55, 204, 70, 228, 70, white);
}
if (OHMZONE == 6) {
tft.fillTriangle(264, 55, 252, 70, 276, 70, white);
}
if (OHMZONE == 7) {
tft.fillTriangle(312, 55, 300, 70, 324, 70, white);
}
if (OHMZONE == 8) {
tft.fillTriangle(360, 55, 348, 70, 372, 70, white);
}
if (OHMZONE == 9) {
tft.fillTriangle(408, 55, 396, 70, 420, 70, white);
}
if (OHMZONE == 10) {
tft.fillTriangle(456, 55, 444, 70, 468, 70, white);
}
}
void OHM_Type_SElelct_menu() {
tft.fillScreen(black);
tft.fillRect(5, 45, 200, 100, orange); //top left
tft.setCursor(10, 83);
tft.setTextColor(white);
tft.setTextSize(2);
tft.print("4 Color Resistor");
tft.fillRect(275, 45, 200, 100, orange); //top right
tft.setCursor(280, 83);
tft.setTextColor(white);
tft.setTextSize(2);
tft.print("5 Color Resistor");
}
void pressed_enter_in_4ohm_menue() {
delay(50);
}
void clear_resistor(int resistor_line_control) {
if (resistor_line_control == 4) {
tft.fillRect(345, 115, 8, 100, black);
tft.fillRect(270, 115, 8, 100, black);
tft.fillRect(200, 115, 8, 100, black);
tft.fillRect(130, 115, 8, 100, black);
}
if (resistor_line_control == 3) {
tft.fillRect(345, 115, 8, 100, black);
tft.fillRect(270, 115, 8, 100, black);
tft.fillRect(200, 115, 8, 100, black);
}
if (resistor_line_control == 2) {
tft.fillRect(345, 115, 8, 100, black);
tft.fillRect(270, 115, 8, 100, black);
}
if (resistor_line_control == 1) {
tft.fillRect(345, 115, 8, 100, black);
}
if (resistor_line_control == 4) {
delay(1);
}
}
void ohm_calc_printed() {
tft.setCursor(10, 265);
tft.setTextColor(white);
tft.setTextSize(2);
tft.print("OHM :4.7 K (tel = 10% > +- 0.47 K)");
}
#include <Adafruit_GFX.h>
#include <MCUFRIEND_kbv.h>
#include <TouchScreen.h>
#define MINPRESSURE 0.001
#define MAXPRESSURE 1000
MCUFRIEND_kbv tft;
#define black 0x0000
#define blue 0x001F
#define red 0xF800
#define green 0x07E0
#define cyan 0x07FF
#define yellow 0xFFE0
#define white 0xFFFF
#define navy 0x000F
#define dgreen 0x03E0
#define dcyan 0x03EF
#define maron 0x7800
#define purple 0x780F
#define olive 0x7BE0
#define lgrey 0xC618
#define dgrey 0x7BEF
#define orange 0xFD20
#define gyellow 0xAFE5
#define pink 0xF81F
void draw_right_panel() {
tft.fillRect(415, 5, 60, 310, purple); //righ panel
tft.setCursor(420, 10);
tft.setTextColor(white);
tft.setTextSize(2);
tft.print("CPU:");
tft.setCursor(420, 30);
tft.setTextSize(1);
tft.print("ATmegaCH");
tft.setCursor(420, 50);
tft.setTextSize(2);
tft.print("RAM:");
tft.setCursor(420, 70);
tft.setTextSize(1);
tft.print("8-KB");
tft.setCursor(420, 90);
tft.setTextSize(2);
tft.print("MEM:");
tft.setCursor(420, 110);
tft.setTextSize(1);
tft.print("256-KB");
tft.setCursor(420, 130);
tft.setTextSize(2);
tft.print("SWP:");
tft.setCursor(420, 150);
tft.setTextSize(1);
tft.print("0-KB");
}
void draw_down_panel() {
tft.fillRect(5, 255, 405, 60, purple); //down panel
tft.setCursor(10, 255);
tft.setTextSize(2);
tft.print("Creators:");
tft.setTextSize(1);
tft.setCursor(10, 275);
tft.println("Coded by:Mohammad Salar Amirsalari and Amirmohammad Roshanali");
tft.setCursor(10, 285);
tft.print("Electronics and QC :Amir Bijanzadeh & Mohammad Salar Amirsalari");
tft.setCursor(10, 295);
tft.print("Coded in Full Assembly ;)");
tft.setCursor(10, 305);
tft.print("Github: https://github.com/SalarAmirSalari");
}
void draw_up_panel() {
tft.fillRect(5, 5, 405, 35, pink); //up panel
tft.setCursor(10, 10);
tft.setTextColor(white);
tft.setTextSize(2);
tft.print("Welcome to THE-OHM Project!");
}
void window_top_left() {
tft.fillRect(5, 45, 200, 100, lgrey); //top left
tft.setCursor(20, 83);
tft.setTextColor(white);
tft.setTextSize(3);
tft.print("Simulator!");
}
void window_down_left() {
tft.fillRect(5, 150, 200, 100, red); //down left
tft.setCursor(25, 185);
tft.setTextColor(white);
tft.setTextSize(3);
tft.print("Tutorials");
}
void window_top_right() {
tft.fillRect(210, 45, 200, 100, dgreen); //top right
tft.setCursor(250, 83);
tft.setTextColor(white);
tft.setTextSize(3);
tft.print("Circuit");
}
void window_down_right() {
tft.fillRect(210, 150, 200, 100, orange); //down right
tft.setCursor(240, 185);
tft.setTextColor(white);
tft.setTextSize(3);
tft.print("OHM Calc");
}
#include <MCUFRIEND_kbv.h>
#include <TouchScreen.h>
#define MINPRESSURE 0.001
#define MAXPRESSURE 1000
#define black 0x0000
#define blue 0x001F
#define red 0xF800
#define green 0x07E0
#define cyan 0x07FF
#define yellow 0xFFE0
#define white 0xFFFF
#define navy 0x000F
#define dgreen 0x03E0
#define dcyan 0x03EF
#define maron 0x7800
#define purple 0x780F
#define olive 0x7BE0
#define lgrey 0xC618
#define dgrey 0x7BEF
#define orange 0xFD20
#define gyellow 0xAFE5
#define pink 0xF81F
void tut_page_1() {
tft.fillScreen(lgrey);
tft.fillRect(5, 5, 470, 310, black);
tft.setCursor(10, 10);
tft.setTextColor(white);
tft.setTextSize(2);
tft.print("Tutorial: Simulator!");
tft.setCursor(10, 30);
tft.setTextSize(2);
tft.println("In simulator Section we can calculate\n the OHM or Voltage or Amp by increasing each element");
tft.setCursor(10, 100);
tft.println("use Left or Right to change the element selection then use Up or Down to change the value of an element");
tft.setCursor(10, 170);
tft.println("by changing each element others will\n change based ov the OHM law\n that calculates by:");
tft.setTextSize(2);
tft.setCursor(10, 250);
tft.print("V = IR -> V>(volt) I>(Amp) R>(OHM)");
tft.setCursor(340, 300);
tft.setTextColor(green);
tft.print("Page 1 of 5");
}
void tut_page_2() {
tft.fillScreen(green);
tft.fillRect(5, 5, 470, 310, black);
tft.setCursor(10, 10);
tft.setTextColor(white);
tft.setTextSize(2);
tft.print("Tutorial: Circuit");
tft.setCursor(10, 30);
tft.setTextSize(2);
tft.println("In Circuit Section we can Watch\n How Resistors effect moving electrons");
tft.setCursor(10, 100);
tft.println("Insert a Resistor then relax and watch\n the electrons moving slower\n dependent on the resistor value");
tft.setCursor(340, 300);
tft.setTextColor(green);
tft.print("Page 2 of 5");
}
void tut_page_3() {
tft.fillScreen(orange);
tft.fillRect(5, 5, 470, 310, black);
tft.setCursor(10, 10);
tft.setTextColor(white);
tft.setTextSize(2);
tft.print("Tutorial: OHM Calc");
tft.setCursor(10, 30);
tft.setTextSize(2);
tft.println("We all forget things like the resistors colors");
tft.setCursor(10, 100);
tft.println("So thats why this device is here press\n left or right then choose the colors");
tft.setCursor(10, 170);
tft.println("Select colors and the magic hax will\n happen super fast");
tft.setTextSize(2);
tft.setCursor(10, 250);
tft.print("Avl/resis: 4 ring and 5 ring Resistors");
tft.setCursor(340, 300);
tft.setTextColor(green);
tft.print("Page 3 of 5");
}
void tut_page_4() {
tft.fillScreen(orange);
tft.fillRect(5, 5, 470, 310, black);
tft.setCursor(10, 10);
tft.setTextColor(white);
tft.setTextSize(2);
tft.print("Tutorial: Tutorial?");
tft.setCursor(10, 30);
tft.setTextSize(2);
tft.println("A Tutorial for Tutorial?");
tft.setCursor(10, 100);
tft.println("Theres is tons of ideas behind this project");
tft.setCursor(10, 170);
tft.println("use Tutorials and codes to find out more");
tft.setCursor(340, 300);
tft.setTextColor(green);
tft.print("Page 4 of 5");
}
void tut_page_5() {
tft.fillScreen(purple);
tft.fillRect(5, 5, 470, 310, black);
tft.setCursor(10, 10);
tft.setTextColor(white);
tft.setTextSize(2);
tft.print("Tutorial: Updates!!!");
tft.setCursor(10, 30);
tft.setTextSize(2);
tft.println("From Dev:");
tft.setCursor(10, 100);
tft.println("Yes we still working on this project(RN)");
tft.setCursor(10, 170);
tft.println("you can recive updates soon in my github and burn it into the arduino by arduino ide and you are good to go");
tft.setTextSize(2);
tft.setCursor(10, 250);
tft.print("Stay tuned and tnx for using this device");
tft.setCursor(340, 300);
tft.setTextColor(green);
tft.print("Page 5 of 5");
}
void tut_printer(int tut_page) {
if (tut_page == 1) {
tut_page_1();
}
if (tut_page == 2) {
tut_page_2();
}
if (tut_page == 3) {
tut_page_3();
}
if (tut_page == 4) {
tut_page_4();
}
if (tut_page == 5) {
tut_page_5();
}
}