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: 117
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

 
  Human Voice audio from SD card
Posted by:  raufjay - 25-10-2017, 02:07 34 - Forum: GD2UB - Replies (5)

Hello,
I am trying to play some human voice audio files already converted in 8 bit ulaw format. What I find in AN338 is very complex process to load the audio file from SDcard and play on FT811. 

I also tried the following code, I took out from James book and modified to work with GD2UB library. The noise.gd2 file is already copied on to SD card. The code compiles alright, but when I run the code, I see the message on LCD saying I need to copy *.gd2 file onto SD card. Whereas the noise.gd2 file is already on SD card root directory.

Any easier way to play the audio file on FT811 from the SD card?

NOTE: This I am trying out on STM32 bluepill board. On this board every thing is working, including FT811 built-in Audio, piano, organ etc.

Thanks,

Code:
# include <EEPROM.h>
# include <SPI.h>
# include <GD2UB.h>
# include "noisy_assets.h"
void setup()
{
 Serial.begin(115200);
GD.begin();
LOAD_ASSETS();
}
static void saydigit(byte n)
{
uint32_t base, len;
switch (n) {
case 0: base = DIGIT_0; len = DIGIT_0_LENGTH; break;
case 1: base = DIGIT_1; len = DIGIT_1_LENGTH; break;
case 2: base = DIGIT_2; len = DIGIT_2_LENGTH; break;
case 3: base = DIGIT_3; len = DIGIT_3_LENGTH; break;
case 4: base = DIGIT_4; len = DIGIT_4_LENGTH; break;
case 5: base = DIGIT_5; len = DIGIT_5_LENGTH; break;
case 6: base = DIGIT_6; len = DIGIT_6_LENGTH; break;
case 7: base = DIGIT_7; len = DIGIT_7_LENGTH; break;
case 8: base = DIGIT_8; len = DIGIT_8_LENGTH; break;
case 9: base = DIGIT_9; len = DIGIT_9_LENGTH; break;
}
GD.sample(base, len, 8000, ADPCM_SAMPLES);
}
void loop()
{
 byte d = GD.random(10);
 Serial.println(d);
 saydigit(d);
 //GD.random(10));
 delay(1000);
}

Print this item

  GD2UB with esp32
Posted by:  raufjay - 21-10-2017, 03:28 39 - Forum: GD2UB - Replies (6)

I just got esp32 board. It is amazing. 
I wanted to have your idea about, can this GD2UB library be used for esp32 as well?
I have a project, considering ample io ports with a lot of communication peripherals built into esp32 module, I am thinking to use esp32 standalone with FT810 or FT811 with 4" LCD.
I tried it but it seems not compiling.

I get following error message:

Arduino: 1.8.4 (Windows 10), Board: "ESP32 Dev Module, QIO, 80MHz, 4MB (32Mb), 921600, None"


In file included from C:\Users\AbdulRauf\Documents\Arduino\LargerFonts\LargerFonts.ino:1:0:

C:\Rauf\development\Arduino\Arduino1.8.4\libraries\GD2UB/GD2UB.h:17:19: fatal error: SdFat.h: No such file or directory

compilation terminated.

exit status 1
Error compiling for board ESP32 Dev Module.

But when I select STM32F boards, that error disappears and program compiles normally.


Any ideas?

Thanks,

Rauf

Print this item

  Some example derived from James Bowman's book
Posted by:  raufjay - 13-10-2017, 06:47 55 - Forum: GD2UB - Replies (8)

Code:
#include<GD2UB.h>
#define NBLOBS 128
#define OFFSCREEN -16384

String inst;

struct ab {
int x, y;
} blobs[NBLOBS];


void setup()
{
GD.begin();
for (int i = 0; i < NBLOBS; i++) {
blobs[i].x = OFFSCREEN;
blobs[i].y = OFFSCREEN;
}
}


void loop()
{
static byte blob_i;
GD.get_inputs();
if (GD.inputs.x != -32768)
 { blobs[blob_i].x = GD.inputs.x << 4;
   blobs[blob_i].y = GD.inputs.y << 4;
   inst = "";
 }
 else
   {inst="Touch the Screen";
    blobs[blob_i].x = OFFSCREEN;
    blobs[blob_i].y = OFFSCREEN;
   }
   
 blob_i = (blob_i + 1) & (NBLOBS - 1);
 GD.ClearColorRGB(0x000000);//e0e0e0);
 GD.Clear();
   GD.SaveContext();
   GD.ColorRGB(0xff8000);
   char txt[20];
   inst.toCharArray(txt,17);
   GD.cmd_text(100,30,30,0,txt); //"Touch on the screen");
   GD.RestoreContext();
 GD.Begin(POINTS);

 for (int i = 0; i < NBLOBS; i++)
 { GD.ColorA(i << 1);                          // Blobs fade away and swell as they age
   GD.PointSize((1024 + 16) - (i << 3));
   uint8_t j = (blob_i + i) & (NBLOBS - 1);    // Random color for each blob, keyed from (blob_i + i)
   byte r = j * 17;
   byte g = j * 23;
   byte b = j * 147;
   GD.ColorRGB(r, g, b);
   GD.Vertex2f(blobs[j].x, blobs[j].y);        // Draw it!
 }
GD.swap();
}

Print this item

  Ejemplo: manejo del magnetómetro GY-273
Posted by:  TFTLCDCyg - 11-10-2017, 01:27 55 - Forum: GD2UB - No Replies

El módulo GY-273 permite detectar campos magnéticos, se puede emplear para construir brújulas digitales; también puede usarse como detector de metales ferromagnéticos, ya que el sensor reacciona con metales magnetizados.

Es un dispositivo i2C, la dirección reportada es 0x1e. Se pueden emplear las librerías de adafruit o bien implementar una rutina para acceder a los registros directos del sensor.

En el ejemplo adjunto se usan las librerías de adafruit, se implementó una brújula digital, en la que se pueden graficar las señales de cada eje.

?mage





Attached Files
.zip   GY273_Graph.zip (Size: 88.78 KB / Downloads: 2)
Print this item

  Brightness of FT811CB 5" with CapTouch from Haoyu
Posted by:  raufjay - 09-10-2017, 16:48 53 - Forum: GD2UB - Replies (5)

Hello,
I am using a 5" 800x480 LCD with captouch, Model FT811CB from Haoyu. Previously I used their 4.3" 480x272 with ResTouch LCD. I find the FT811CB 5" LCD brightness is much lesser.
Is there any software control to increase the brightness?
Or is there any other way of increasing the brightness?
Thanks
Rauf

Print this item