Pages: 1 [2] 3 4 5   Go Down
Author Topic: New TFT Extension Library  (Read 9891 times)
0 Members and 1 Guest are viewing this topic.
Queens, New York
Offline Offline
Faraday Member
**
Karma: 84
Posts: 3423
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Radio button time track, 1 group of both types with 4 buttons each

Code:
#include <ITDB02_Graph16.h>
#include <ITDB02_Touch.h>
#include <TFT_Extension_old.h>
#include <math.h>
// Declare which fonts we will be using
extern uint8_t SmallFont[];

//
//myGLCD(RS,WR,CS,RST,ALE,mode);
ITDB02 myGLCD(A1,A2,A0,A3,A5,ITDB32S);
//myTouch(TCLK,TCS,DIN,DOUT,IRQ);
ITDB02_Touch  myTouch(13,10,11,12,A4);

TFT_Extension_old myTFT(&myGLCD, &myTouch, LANDSCAPE);

int cx, cy;
unsigned long timeStart, Total, timeCollect[9];
char * functs[11] = {
  "Setup TRB: ", "Setup TRCB: ", "Set RB colors: ", "Set RCB colors: ","1x RadioButton: ",
  "4x RadioButtons: ","1x RadioCircleButton: ",
  "4x RadioCircleButton: ", "Total Time: "};

void setup()
{
  myGLCD.InitLCD(LANDSCAPE);
  myGLCD.clrScr();
  myGLCD.setFont(SmallFont);
  myTouch.InitTouch(LANDSCAPE);
  myTouch.setPrecision(PREC_LOW);
  for(int line = 0; line <= 239; line++)
  {
    myGLCD.setColor(0, 0, line);//text color White 
    myGLCD.drawLine(0, line, 319, line);
  }
  Serial1.begin(9600);
  startup();
  getButton();
  myGLCD.clrScr();
  for(byte idx = 0; idx < 8; idx++)
  {
   myGLCD.print(functs[idx], 0, idx * 20);
   myGLCD.printNumF(timeCollect[idx], 200, idx * 20 );
   Total += timeCollect[idx] / 1000.00;
   myGLCD.printNumF(Total,3, 200, 200 );
  }
}

void loop() {}

void startup()
{
  myGLCD.setColor(255, 0, 0);//red box fill
  myGLCD.fillRect(0, 0, 319, 13);//text box
  myGLCD.setColor(255, 255, 255);//text color White
  myGLCD.setBackColor(255, 0, 0);//background of text red
  myGLCD.drawLine(0, 14, 319, 14);
  myGLCD.print("ARDUINO RADIOBUTTONS", CENTER, 1);
  myGLCD.setBackColor(0, 0, 0);
  myGLCD.print("Touch screen to start", CENTER, 119);

  for(int line = 0; line <= 239; line++)
  {
    myGLCD.setColor(0, 0, line);//text color White 
    myGLCD.drawLine(0, line, 319, line);
  }
 
  uint8_t nums[1] = {4}; // 4 buttons per group
 
  timeStart = micros();
  myTFT.TotalRadioButtons(nums,1);
  timeCollect[0] = micros() - timeStart;
  timeStart = micros();
 
  myTFT.TotalRadioCircleButtons(nums,1);
  timeCollect[1] = micros() - timeStart;
  timeStart = micros();
 
  myTFT.SetAll_RB_Outer_Color(BLACK);
  myTFT.SetAll_RB_Toggled_Color(GREEN);
  myTFT.SetAll_RB_Untoggled_Color(YELLOW);
  timeCollect[2] = micros() - timeStart;
  timeStart = micros();
 
  myTFT.SetAll_RCB_Outer_Color(PURPLE);
  myTFT.SetAll_RCB_Toggled_Color(BLUE);
  myTFT.SetAll_RCB_Untoggled_Color(RED);
  timeCollect[3] = micros() - timeStart;
}

void getButton()
{
  timeStart = micros();
  myTFT.RadioButton(10,10,50,50,0,0);
  timeCollect[4] = micros() - timeStart;
  myTFT.RadioButton(10,60,50,100,1,0 );
  myTFT.RadioButton(10,110,50,150,2,0 );
  myTFT.RadioButton(10,160,50,200,3,0 );
  timeCollect[5] = micros() - timeStart;
//=================================================
  timeStart = micros();
  myTFT.RadioCircleButton(80,30,20,0,0 );
  timeCollect[6] = micros() - timeStart;
  myTFT.RadioCircleButton(80,80,20,1,0 );
  myTFT.RadioCircleButton(80,130,20,2,0 );
  myTFT.RadioCircleButton(80,180,20,3,0 );
  timeCollect[7] = micros() - timeStart;
}

Output: Time in milliseconds
Quote
Setup TRB: 0.003
Setup TRCB: 0.007
Set RB colors: 0.027
Set RCB colors: 0.031
1x RadioButton: 66.895
4x RadioButton: 267.587
1x RadioCircleButton: 451.563
4x RadioCircleButton: 1806.251
Total Time: 2589.999
« Last Edit: April 01, 2014, 12:48:43 pm by HazardsMind » Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

Queens, New York
Offline Offline
Faraday Member
**
Karma: 84
Posts: 3423
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Both types of latching buttons.

Code:
#include <ITDB02_Graph16.h>
#include <ITDB02_Touch.h>
#include <TFT_Extension_old.h>
#include <math.h>
// Declare which fonts we will be using
extern uint8_t SmallFont[];

//myGLCD(RS,WR,CS,RST,ALE,mode);
ITDB02 myGLCD(A1,A2,A0,A3,A5,ITDB32S);
//myTouch(TCLK,TCS,DIN,DOUT,IRQ);
ITDB02_Touch  myTouch(13,10,11,12,A4);
TFT_Extension_old myTFT(&myGLCD, &myTouch, LANDSCAPE);

unsigned long timeStart, timeCollect[9];
char * functs[11] = {
  "Set TC color: ", "Setup LC color: ", "Set TB color: ", "Set LB color: ","TC_Draw: ",
  "LC_Draw: ","TB_Draw: ","LB_Draw: ", "Total Time: "};

boolean last = LOW, latch = false;

void setup()
{
  myGLCD.InitLCD(LANDSCAPE);
  myGLCD.clrScr();
  myGLCD.setFont(SmallFont);
  myTouch.InitTouch(LANDSCAPE);
  myTouch.setPrecision(PREC_LOW);
  Serial1.begin(115200);
  startup();
}

void loop() {}

void startup()
{
  myGLCD.setColor(255, 0, 0);//red box fill
  myGLCD.fillRect(0, 0, 319, 13);//text box
  myGLCD.setColor(255, 255, 255);//text color White
  myGLCD.setBackColor(255, 0, 0);//background of text red
  myGLCD.drawLine(0, 14, 319, 14);
  myGLCD.print("LatchButtons", CENTER, 1);
  myGLCD.setBackColor(0, 0, 0);
  myGLCD.print("Touch screen to start", CENTER, 119);
  myGLCD.clrScr();
  myGLCD.print("Latches", CENTER, 50);
  myGLCD.print("Buttons", CENTER, 170);
 
  timeStart = micros();
  myTFT.SetTouchCircleColors(0, ORANGE, PURPLE, FILL);        // ID number, Pressed Color, Released Color, FILL/NOFILL)
  timeCollect[0] = micros() - timeStart;
  timeStart = micros();
  myTFT.SetLatchCircleColors(1, WHITE, CYAN, FILL);          // ID number, Latched Color, UnLatched Color, FILL/NOFILL)
  timeCollect[1] = micros() - timeStart;
  timeStart = micros();
  myTFT.SetTouchButtonColors(0, GREEN, RED, FILL, ROUNDED);   // ID number, Pressed Color, Released Color, FILL/NOFILL,ROUNDED/NOTROUNDED)
  timeCollect[2] = micros() - timeStart;
  timeStart = micros();
  myTFT.SetLatchButtonColors(1, BLUE, YELLOW, FILL, ROUNDED); // ID number, Latched Color, UnLatched Color, FILL/NOFILL, ROUNDED/NOTROUNDED)
  timeCollect[3] = micros() - timeStart;
  getButton();
  myGLCD.clrScr();
  for(byte idx = 0; idx < 9; idx++)
  {
   myGLCD.print(functs[idx], 0, idx * 20);
   myGLCD.printNumF(float(timeCollect[idx]) / 1000.00,3, 200, idx * 20 );
  } 
}

void getButton()
{
  timeStart = micros();
  myTFT.TouchCircle_Draw(55,180,50,0); // (x,y,radius, ID number)
  timeCollect[4] = micros() - timeStart;
  timeStart = micros();
  myTFT.LatchCircle_Draw(265,55,50,1); // (x,y,radius, ID number)
  timeCollect[5] = micros() - timeStart;
  timeStart = micros();
  myTFT.TouchButton_Draw(220,135,310,225,0);// (x1,y1,x2,y2, ID number)
  timeCollect[6] = micros() - timeStart;
  timeStart = micros();
  myTFT.LatchButton_Draw(10,10,100,100,1);// (x1,y1,x2,y2, ID number)
  timeCollect[7] = micros() - timeStart;
  timeCollect[8] = micros() - timeCollect[0];
}

Output time in milliseconds
Quote
Set TC color: 0.011
Setup LC color: 0.007
Set TB color: 0.011
Set LB color: 0.011
TC_Draw: 1795.851
LC_Draw: 1795.851
TB_Draw: 167.507
LB_Draw: 167.515
Total Time: 3923.999

Both types of triangles:
Code:
#include <ITDB02_Graph16.h>
#include <ITDB02_Touch.h>
#include <TFT_Extension_old.h>
#include <math.h>
// Declare which fonts we will be using
extern uint8_t SmallFont[];

//myGLCD(RS,WR,CS,RST,ALE,mode);
ITDB02 myGLCD(A1,A2,A0,A3,A5,ITDB32S);
//myTouch(TCLK,TCS,DIN,DOUT,IRQ);
ITDB02_Touch  myTouch(13,10,11,12,A4);
TFT_Extension_old myTFT(&myGLCD, &myTouch, LANDSCAPE);

unsigned long timeStart, timeCollect[5];
char * functs[11] = {
  "Set TT color: ", "Setup LT color: ", "TT_Draw: ",
  "LT_Draw: ", "Total Time: "};

void setup()
{
  myGLCD.InitLCD(LANDSCAPE);
  myGLCD.clrScr();
  myGLCD.setFont(SmallFont);
  myTouch.InitTouch(LANDSCAPE);
  myTouch.setPrecision(PREC_LOW);
  Serial1.begin(115200);
  startup();
}

void loop() {}

void startup()
{
  myGLCD.setColor(255, 0, 0);//red box fill
  myGLCD.fillRect(0, 0, 319, 13);//text box
  myGLCD.setColor(255, 255, 255);//text color White
  myGLCD.setBackColor(255, 0, 0);//background of text red
  myGLCD.drawLine(0, 14, 319, 14);
  myGLCD.print("LatchButtons", CENTER, 1);
  myGLCD.setBackColor(0, 0, 0);
  myGLCD.print("Touch screen to start", CENTER, 119);
  myGLCD.clrScr();
  myGLCD.print("Latches", CENTER, 50);
  myGLCD.print("Buttons", CENTER, 170);
 
  timeStart = micros();
  myTFT.SetTouchTriangleColors(0, ORANGE, PURPLE, FILL);        // ID number, Pressed Color, Released Color, FILL/NOFILL)
  timeCollect[0] = micros() - timeStart;
  timeStart = micros();
  myTFT.SetLatchTriangleColors(1, WHITE, CYAN, FILL);          // ID number, Latched Color, UnLatched Color, FILL/NOFILL)
  timeCollect[1] = micros() - timeStart;
  getButton();
  myGLCD.clrScr();
  for(byte idx = 0; idx < 5; idx++)
  {
   myGLCD.print(functs[idx], 0, idx * 20);
   myGLCD.printNumF(float(timeCollect[idx]) / 1000.00,3, 200, idx * 20 );
  } 
}

void getButton()
{
  timeStart = micros();
  myTFT.TouchTriangle_Draw(55,180,50,up, 0, 0); // (x,y,radius, ID number)
  timeCollect[2] = micros() - timeStart;
  timeStart = micros();
  myTFT.LatchTriangle_Draw(265,55,50,up, 0, 1); // (x,y,radius, ID number)
  timeCollect[3] = micros() - timeStart;
  timeCollect[4] = micros() - timeCollect[0];
}

Output:
Quote
Set TT color: 0.007
Set LT color: 0.011
TT_Draw: 419.235
LT_Draw: 417.835
Total Time: 838.088?
« Last Edit: April 01, 2014, 12:53:56 pm by HazardsMind » Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

Queens, New York
Offline Offline
Faraday Member
**
Karma: 84
Posts: 3423
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here are the times for the radio button color functions.
Code:
#include <ITDB02_Graph16.h>
#include <ITDB02_Touch.h>
#include <TFT_Extension_old.h>
#include <math.h>
// Declare which fonts we will be using
extern uint8_t SmallFont[];

//myGLCD(RS,WR,CS,RST,ALE,mode);
ITDB02 myGLCD(A1,A2,A0,A3,A5,ITDB32S);
//myTouch(TCLK,TCS,DIN,DOUT,IRQ);
ITDB02_Touch  myTouch(13,10,11,12,A4);
TFT_Extension_old myTFT(&myGLCD, &myTouch, LANDSCAPE);

unsigned long timeStart, timeCollect[13];
char * functs[13] = {
  "Set RBO color: ", "Set RCBO color: ", "Set RBT color: ", "Set RCBT color: ",
  "Set RBUT color: ", "Set RCBUT color: ", "Set RBO_BG color: ", "Set RCBO_BG color: ",
  "Set RBT_BG color: ","Set RCBT_BG color: ", "Set RBUT_BG color: ","Set RCBUT_BG color: ",
  "Total Time: "};
void setup()
{
  myGLCD.InitLCD(LANDSCAPE);
  myGLCD.clrScr();
  myGLCD.setFont(SmallFont);
  myTouch.InitTouch(LANDSCAPE);
  myTouch.setPrecision(PREC_LOW);
  Serial1.begin(115200);
  startup();
}

void loop() {
}

void startup()
{
  myGLCD.setColor(255, 0, 0);//red box fill
  myGLCD.fillRect(0, 0, 319, 13);//text box
  myGLCD.setColor(255, 255, 255);//text color White
  myGLCD.setBackColor(255, 0, 0);//background of text red
  myGLCD.drawLine(0, 14, 319, 14);
  myGLCD.print("LatchButtons", CENTER, 1);
  myGLCD.setBackColor(0, 0, 0);
  myGLCD.print("Touch screen to start", CENTER, 119);
  myGLCD.clrScr();
  myGLCD.print("Latches", CENTER, 50);
  myGLCD.print("Buttons", CENTER, 170);

  timeStart = micros();
  myTFT.RB_Outer_Color(0,1,WHITE);
  timeCollect[0] = micros() - timeStart;
 
  timeStart = micros();
  myTFT.RCB_Outer_Color(0,1,WHITE);
  timeCollect[1] = micros() - timeStart;
 
  timeStart = micros();
  myTFT.RB_Toggled_Color(0,1,WHITE);
  timeCollect[2] = micros() - timeStart;
 
  timeStart = micros();
  myTFT.RCB_Toggled_Color(0,1,WHITE);
  timeCollect[3] = micros() - timeStart;
 
  timeStart = micros();
  myTFT.RB_Untoggled_Color(0,1,WHITE);
  timeCollect[4] = micros() - timeStart;
 
  timeStart = micros();
  myTFT.RCB_Untoggled_Color(0,1,WHITE);
  timeCollect[5] = micros() - timeStart;
 
  timeStart = micros();
  myTFT.RB_Outer_Color_By_Group(1, GREEN);
  timeCollect[6] = micros() - timeStart;
 
  timeStart = micros();
  myTFT.RCB_Outer_Color_By_Group(1, GREEN);
  timeCollect[7] = micros() - timeStart;
 
  timeStart = micros();
  myTFT.RB_Toggled_Color_By_Group(1, GREEN);
  timeCollect[8] = micros() - timeStart;
 
  timeStart = micros();
  myTFT.RCB_Toggled_Color_By_Group(1, GREEN);
  timeCollect[9] = micros() - timeStart;
 
  timeStart = micros();
  myTFT.RB_Untoggled_Color_By_Group(1, GREEN);
  timeCollect[10] = micros() - timeStart;
 
  timeStart = micros();
  myTFT.RCB_Untoggled_Color_By_Group(1, GREEN);
  timeCollect[11] = micros() - timeStart;
  timeCollect[12] = micros() - timeCollect[0];
  myGLCD.clrScr();
  for(byte idx = 0; idx < 13; idx++)
  {
    myGLCD.print(functs[idx], 0, idx * 16);
    myGLCD.printNumF((float(timeCollect[idx]) / 1000.00),6, 200, idx * 16 );
  } 
}

Output:
Quote
Set RBO color:  .00799
Set RCBO color: 0.00799
Set RBT color: 0.00799
Set RCBT color: 0.00799
Set RBUT color: 0.00799
Set RCBUT color: 0.00799
Set RBO_BG color: 0.00399
Set RCBO_BG color:  0.00799
Set RBT_BG color: 0.00399
Set RCBT_BG color: 0.00399
Set RBUT_BG color: 0.00799
Set RCBUT_BG color: 0.00399
Total Time: 0.07988
« Last Edit: April 01, 2014, 12:55:15 pm by HazardsMind » Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

Queens, New York
Offline Offline
Faraday Member
**
Karma: 84
Posts: 3423
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Small update, I changed TouchDelay to TouchDelayButton and added two new functions, TouchDelayCircle and TouchDelayTriangle.

I'm still working on the TextButton function, I am able to display text in the center with no problem, but I am trying to make the button be able to rotate (Still no problem). However, getting the text to rotate and still stay centered is proving to be a bit more challenging then expected. I will hopefully get that function working soon.

EDIT: There was a slight hiccup with the Portrait vs Landscape modes. Its fixed now.

* TFT_Extension.zip (37.69 KB - downloaded 13 times.)
« Last Edit: April 11, 2014, 06:07:47 pm by HazardsMind » Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

Queens, New York
Offline Offline
Faraday Member
**
Karma: 84
Posts: 3423
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

UPDATE:
Both types of radio buttons now are able to have text in the center of them. Please note that the text will NOT be cutoff or the buttons size will NOT be altered if the text is larger than the button.

Newest version as of 4/11/2014


I am open to new function ideas if anyone has any. I will of course add your name or username to the functions description.

I am currently working on a star function and I should be done with it soon. As well as a polygon function which will allow the user to enter a number 3 - 10, and it will make the shape with the given sides. Filled in color may be difficult so for now it will just be unfilled.

Added: I finished both of them. They will be in the next update.

* TFT_Extension.zip (38.37 KB - downloaded 13 times.)
« Last Edit: April 14, 2014, 11:47:20 am by HazardsMind » Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

Queens, New York
Offline Offline
Faraday Member
**
Karma: 84
Posts: 3423
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

UPDATE: 4/14/2014

Ok this update has the new polygon and drawStar functions, as well as a new version of the all the Triangle functions.

The polygon and drawStar functions need a single X,Y coordinate, the polygon function, also needs a number of sides(3 - 360) anything more and the function doesn't work. You can also give it a color (still working on how to fill the polygon) and a degree if needed. The drawStar function needs a diameter, a color and a factor (1.0 - 4.0) which is preset to 2.0. This factor controls the thickness of the star. The higher the number, the thinner the star gets, and the factor will not go lower than 1.0 or higher than 4.0

Now with the triangle functions, you don't need to specify a direct like "up, down ,left or right" and also give a degree. The new functions only need the X,Y coords, a base length and a degree. I did leave in the up, down, left and right as degrees, so up = 0 deg, left = 90 deg, down = 180, and right = 270. You can also use these as " up + 45" which is just 45 degrees, or "down - 27" which equals 153 deg.

Example:
myTFT.drawStar(160, 120, 30, WHITE);
myTFT.drawStar(160, 120, 30, WHITE, 3.0); // this star is thinner than the one above.

myTFT.Polygon(50, 50, 3, 20, BLUE); // X, Y, sides, diameter

myTFT.drawTriangle(160, 120, 50, up + 45);
myTFT.drawTriangle(160, 120, 50, right);
myTFT.drawTriangle(160, 120, 50, down - 27);



I am still working on being able to fill in the star and polygon shapes, but for now this should do.

* TFT_Extension.zip (40.17 KB - downloaded 11 times.)
« Last Edit: April 14, 2014, 08:53:51 pm by HazardsMind » Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

Queens, New York
Offline Offline
Faraday Member
**
Karma: 84
Posts: 3423
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have three more functions on the way, two are already done and one i'm still working on.
The two that are done are drawArc and TouchArc.

drawArc(int cx, int cy, int radius, int start, int stop, int thickness, byte R, byte G, byte B);
Like my circle function, it needs a X/Y coordinate, a radius, and now it needs a start and stop angle, a thickness (will not exceed the radius value or below 0) and finally, a color.

TouchArc(int cx, int cy, int radius, int start, int stop, int thickness);
This function returns a percentage of where you touch the arc from right to left. 0  - 100%

And the last function is a Slider, it can either be horizontal or vertical, and it too will return the percentage of it's level.
It can be mapped to any size or thickness, and I must insist you use a stylist or something with a soft point.
Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


I am open to new function ideas if anyone has any. I will of course add your name or username to the functions description.
...
do you have
- rounded_square(x,y,h,w, radius, color)  // radius is of the rounded corners by default this is min(w ,h) /4;
- moon(x, y, size, phase)   // if you have stars you should have a moon
- smiley(mood);  // simplified -  yellow circle with some basic lines.
- text-balloon(position, size, pointer angle, text)
- hourglass (position, size, percentage)
- Greek alphabet and math symbols?
- Currency symbols $ €
- music bar & notes -> e.g. display MIDI
-..
enough to keep you busy I think smiley-wink
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

North Queensland, Australia
Offline Offline
Edison Member
*
Karma: 65
Posts: 2107
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

- smiley(mood);  // simplified -  yellow circle with some basic lines.

I've designed a manuscript with notes, however a smiley interface is not one I've thought of. Might inspire a chat program of sorts.

Logged


Queens, New York
Offline Offline
Faraday Member
**
Karma: 84
Posts: 3423
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I can make the rounded_square, maybe the moon, smiley faces, text-balloon, hourglass and music bar + notes.

The Greek, math and currency symbols would be easy to make if I could get into the original character table, but I'll try.

Do you want to hourglass to flip over?

Added:
Rounded_Square : DONE (with fill)
Moon + phases : DONE (also added craters)
Faces : DONE (9 types of eyes and 7 types of mouths. I also added preset combinations)
HourGlass : DONE (EDIT: Capable from 1 second to about 1 year, give or take a few hours; Or until the millis function rolls over and screws up the time. And NON Blocking);
« Last Edit: April 22, 2014, 01:23:41 am by HazardsMind » Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

Queens, New York
Offline Offline
Faraday Member
**
Karma: 84
Posts: 3423
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Related to HourGlass function.

Does anyone know how long it takes for the millis function to rollover?
Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

Greenville, IL
Offline Offline
Edison Member
*
Karma: 15
Posts: 1328
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 Excellent work with your project!  Would it be practical to have a "analog" style gauge function? I am thinking of round speedometers, or tachometers that start at zero and finish at a higher value. The user would enter a zero point and span. Then, enter the size and location of the gauge.

Thanks for your work!
Logged


Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Related to HourGlass function.

Does anyone know how long it takes for the millis function to rollover?
49 d, 17 h, 2 m, 47 s, and 297 millis .
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Queens, New York
Offline Offline
Faraday Member
**
Karma: 84
Posts: 3423
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, Great then the HourGlass function, will be accurate to that length of time.
Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

Queens, New York
Offline Offline
Faraday Member
**
Karma: 84
Posts: 3423
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok here is the current version of my library.

The speech bubble is a pain in the butt. I can get it to display text in the center just fine, but when I want to divide the text to use the whole bubble, that's when things go wrong.

I will get it eventually.

* TFT_Extension.zip (51.07 KB - downloaded 12 times.)
« Last Edit: April 26, 2014, 02:36:48 pm by HazardsMind » Logged

Created Libraries:
NPV2 (NewPasswordV2),  TFT_Extension, OneWireKeypad, SerialServo.
Will provide libraries if asked in PM or forum.

Pages: 1 [2] 3 4 5   Go Up
Jump to: