Bienvenido a los foros de FT81x Manía. Te invitamos a regístrate totalmente gratis. Disfruta de tu experiencia con un grandes amigos y Staff.

Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 70
» Latest member: ikyeqg
» Forum threads: 151
» Forum posts: 510

Full Statistics

Online Users
There is currently 1 user online
» 0 Member(s) | 1 Guest(s)

Latest Threads
mleczyk
NODEMCU v1.0 with GPS BMP...

Forum: ESP8266
Last Post:  mleczyk
07-09-2018, 17:33 41
» Replies: 2
» Views: 171
hal2000
GD23ZU Library

Forum: Library GD23ZU
Last Post:  hal2000
18-08-2018, 23:22 13
» Replies: 3
» Views: 159
lightcalamar
Documentación STM32F407ZG...

Forum: STM32F407
Last Post:  lightcalamar
05-08-2018, 23:50 24
» Replies: 2
» Views: 118
TFTLCDCyg
Presentacion

Forum: Presentaciones y despedias
Last Post:  TFTLCDCyg
14-07-2018, 09:10 21
» Replies: 5
» Views: 112
ddwasil
Consejos para aprender a ...

Forum: Library GD23ZU
Last Post:  ddwasil
12-07-2018, 05:17 08
» Replies: 1
» Views: 58

 
  Toggle test
Posted by:  raufjay - 26-02-2018, 03:18 01 - Forum: Codigos - Replies (3)

Code:
# include <EEPROM.h>
# include <SPI.h>
# include <GD2UB.h>

uint16_t togchk=1,toggle=0;
bool btenm;

void setup()

{
Serial.begin(115200);
GD.begin();

}
void loop()
{
GD.cmd_gradient(0, 40, 0x282830,0, 272, 0x606040);
GD.cmd_text(240, 100, 31, OPT_CENTER, "Toggle Test");
//uint16_t val, range;

 GD.Tag(10);                                 // Wifi ON/OFF toggle switch
       if(togchk)
       toggle=65535;
       GD.cmd_toggle(240,260,80,30,0,toggle,"OFF" "\xff" "ON  "); // Wifi ON/OFF
       GD.cmd_track(240,320,80,40,10);
       toggle=0;

GD.get_inputs();
 switch (GD.inputs.track_tag & 0xff)
 {
   case 10:
   togchk = GD.inputs.track_val *2L /65536;  //value = GD.inputs.track_val;
   if (togchk != 0)
   btenm = 1;
   else
   btenm =0;
   break;
 }
 
GD.swap();
Serial.print("tagchk=");Serial.println(tagchk);
Serial.print("btenm"); Serial.println(btenm);
}
Hello, I tried with Toggle switch.

I wanted to read toggle switch and if it is ON, a flag btenm will become one. And if the toggle switch turns off, the flag btenm become zero.

I tried to code it, and it works ok. Can you please check and let me know if there is any impvoement possible?

Print this item

  microSD reader for ESP32
Posted by:  lightcalamar - 23-02-2018, 14:06 01 - Forum: ESP32 - No Replies

Hello everyone.

To be investigating to put microSD reader, to have in library for ESP32 and FT81x to make work the assets and images. At the moment go very well. I find from this link IoT Sharing a library to work very well with ESP32, also it is very configurable, we can put the analog pins in any of them to make the SPI bus constructor for the reader.

Until today the tests are very good. the reader module used is this;

?mage

?mage

Buy to this link manufactured by WareShare, good reader. Library running attached in post or https://github.com/nhatuan84/esp32-micro-sdcard

The construtor is:
Code:
Class SD:
- SD.begin(uint8_t cs , int8_t mosi , int8_t miso , int8_t sck): initialize library with SPI pins
for example,
Code:
 while (!card.init(SPI_HALF_SPEED, 17, 27, 26, 16)) {                                   
  //ATENCION A LA DEFINICION DE LOS PINES // 17=CS, 27=MOSI, 26=MISO y 16=SCLK

100% recommended. I will carry out tests to adapt to the GD2ESP library



Attached Files
.zip   mySD.zip (Size: 58.35 KB / Downloads: 3)
Print this item

Thumbs Up New library GD2ESP32 for FT810
Posted by:  lightcalamar - 20-02-2018, 20:56 50 - Forum: ESP32 - Replies (7)

Library for MCU ESP32.

This new library does NOT support microSD reader at the moment, it is an initial phase to make it work with the example and see that it works with any type of the many that there is in the market.

The tests have been satisfactory with ESP32, models DOIT and NODEMCU ESP32-S (v1.1)



Soon to implement new functions in the library.
More changes to repository https://github.com/lightcalamar/GD2_ESP32

Greetings.  Sleepy



Attached Files
.zip   GD2ESP32.zip (Size: 276.48 KB / Downloads: 4)
Print this item

  [SOLVED] Test playback video with error
Posted by:  lightcalamar - 16-02-2018, 15:06 09 - Forum: Teensy - Replies (1)

Este video demuestra que Teensy 3.5 puede reproducir videos sobre pantallas FT81x.

Es el comienzo...



Seguirá ...

Print this item

  Problem with calling another screen
Posted by:  raufjay - 16-02-2018, 02:50 01 - Forum: Codigos - Replies (3)

Hello,
I am trying to open another screen by clicking on a button at previous screen.

For Example I have a button on screen1. When I click on that button, I want Screen2 should be opened.

But what happens when I clicked the button, the Screen2 shows up for a glance and I am back on Screen1. The display does not stay on Screen2.

I tried several options, but it seems I am missing something here.

Please have a look at the code and advise. Thanks.

Code:
// // //  Screen1 // // //

void commands()
{
        GD.cmd_dlstart();
        GD.Clear(1,1,1);
       
        GD.ColorRGB(255,100,0);// Red color shadow 255,255);
        GD.cmd_text(10, 6, 31, 0, "Commands");




// Buttons      
        GD.cmd_fgcolor(0xc0c0c0);
        GD.ColorA(170);
 
         tagval = GD.rd( REG_TOUCH_TAG);        //Reading TAG Number from REG_TOUCH_TAG into 32bit tagval variable.
         tagoption = 0;                                    // tagoption will be used to show on the screen that the button is pressed or not
 
 if(tagval==30)                                 // TAG=30, Patient data requested by sending PID
 { tagoption = OPT_FLAT;//1 ;
  GD.cmd_fgcolor(0x000080);
  reqPID=1;
  //key_board();
  //GD.swap();
 // GD.finish();
  IsPenDown();
 }
        GD.Tag(30);
        GD.cmd_button(660,106,120,90,28,tagoption,"data by  PID");
        GD.cmd_fgcolor(0xc0c0c0);
        tagoption = 0;

///////////////////////////////////////////////////
 
if(tagval==31)                                 // TAG=31, Patient data requested by sending last name
 { tagoption = OPT_FLAT;//1 ;
  GD.cmd_fgcolor(0x000080);
  reqlname=1;
 // key_board();
  //GD.swap();
  //GD.finish();
  IsPenDown();
 }
        GD.Tag(31);
        GD.cmd_button(660,106+110,120,90,28,tagoption,"data by  lname");
        GD.cmd_fgcolor(0xc0c0c0);
        tagoption = 0;

///////////////////////////////////////////////////

//GD.swap();//end the display list
GD.finish();
GD.End();


if(reqPID)          // if button was pressed to request patient data by sending PID to the host.
{
  reqPID=0;
  key_board();
}

else if(reqlname)
{
  reqlname=0;
  key_board();
}

}


// ===Screen1 END ===========


// // //  Screen2 // // //
// -------------------------

void key_board()
{        int x = 0, w = 700, h = 65;
         uint16_t options = 0;
         uint8_t key = 0;      
         String kbstring ="";

         GD.cmd_dlstart();
 //        GD.SaveContext();
         GD.Clear(1,1,1);
         GD.ColorRGB(60,60,255);    // Top label strip

  // Show keys

  int y = 240;
  const char *rows[4] = { "0123456789", "QWERTYUIOP", "ASDFGHJKL", "@ZXCVBNM,."};

         tagval = GD.rd( REG_TOUCH_TAG);        //Reading TAG Number from REG_TOUCH_TAG into 32bit tagval variable.

         kbstring += tagval;
         sysser.println(kbstring);
         IsPenDown();
          
for (int i = 0; i < 4; i++)
  {
   //GD.cmd_keys(x, y, w, h, 24, options | OPT_CENTER | key, rows[i]);
    GD.cmd_keys(x, y, w, h, 24, 0, rows[i]);
    y += (h + 5);
  }

  
//GD.RestoreContext();

//GD.swap();
 GD.finish();
 GD.End();
 }

// ===Screen2 END ===========

Print this item