Giter Club home page Giter Club logo

Comments (10)

moononournation avatar moononournation commented on August 22, 2024

please get update the latest master branch to check is it ok now

from arduino_gfx.

KilimSerg avatar KilimSerg commented on August 22, 2024

Hello moononournation!

I updated the library as you recommended.
And I tried to compile the simplest example from the “Arduino GFX library”
"HelloWorld.ino" and got 2 errors.

I’ll give you a complete example so you can see, maybe I’m doing something wrong.
I set the pins of my board according to the example you give for the RTL8720DN
on the page: https://www.instructables.com/ArduinoGFX/

Connection summary:
RTL8720DN -> ILI9341
Vin -> Vcc
GND -> GND
GPIO 18 -> CS
GPIO 2 -> RESET
GPIO 17 -> D/C
GPIO 21(MOSI) -> SDI(MOSI)
GPIO 19(SCK) -> SCK
GPIO 23 -> LED

Sketch:
/*******************************************************************************

  • Start of Arduino_GFX setting
  • Arduino_GFX try to find the settings depends on selected board in Arduino IDE
  • Or you can define the display dev kit not in the board list
  • Defalult pin list for non display dev kit:
  • Arduino Nano, Micro and more: CS: 9, DC: 8, RST: 7, BL: 6, SCK: 13, MOSI: 11, MISO: 12
  • ESP32 various dev board : CS: 5, DC: 27, RST: 33, BL: 22, SCK: 18, MOSI: 23, MISO: nil
  • ESP32-C3 various dev board : CS: 7, DC: 2, RST: 1, BL: 3, SCK: 4, MOSI: 6, MISO: nil
  • ESP32-S2 various dev board : CS: 34, DC: 38, RST: 33, BL: 21, SCK: 36, MOSI: 35, MISO: nil
  • ESP32-S3 various dev board : CS: 40, DC: 41, RST: 42, BL: 48, SCK: 36, MOSI: 35, MISO: nil
  • ESP8266 various dev board : CS: 15, DC: 4, RST: 2, BL: 5, SCK: 14, MOSI: 13, MISO: 12
  • Raspberry Pi Pico dev board : CS: 17, DC: 27, RST: 26, BL: 28, SCK: 18, MOSI: 19, MISO: 16
  • RTL8720 BW16 old patch core : CS: 18, DC: 17, RST: 2, BL: 23, SCK: 19, MOSI: 21, MISO: 20
  • RTL8720_BW16 Official core : CS: 9, DC: 8, RST: 6, BL: 3, SCK: 10, MOSI: 12, MISO: 11
  • RTL8722 dev board : CS: 18, DC: 17, RST: 22, BL: 23, SCK: 13, MOSI: 11, MISO: 12
  • RTL8722_mini dev board : CS: 12, DC: 14, RST: 15, BL: 13, SCK: 11, MOSI: 9, MISO: 10
  • Seeeduino XIAO dev board : CS: 3, DC: 2, RST: 1, BL: 0, SCK: 8, MOSI: 10, MISO: 9
  • Teensy 4.1 dev board : CS: 39, DC: 41, RST: 40, BL: 22, SCK: 13, MOSI: 11, MISO: 12
    ******************************************************************************/
    #include <Arduino_GFX_Library.h>

#define GFX_BL DF_GFX_BL // default backlight pin, you may replace DF_GFX_BL to actual backlight pin

/* More dev device declaration: https://github.com/moononournation/Arduino_GFX/wiki/Dev-Device-Declaration */
#if defined(DISPLAY_DEV_KIT)
Arduino_GFX gfx = create_default_Arduino_GFX();
#else /
!defined(DISPLAY_DEV_KIT) */

/* More data bus class: https://github.com/moononournation/Arduino_GFX/wiki/Data-Bus-Class */
Arduino_DataBus bus = new Arduino_HWSPI(8 / DC /, 9 / CS */);

/* More display class: https://github.com/moononournation/Arduino_GFX/wiki/Display-Class */
Arduino_GFX gfx = new Arduino_ILI9341(bus, 6, 0 / rotation /, false / IPS */);

#endif /* !defined(DISPLAY_DEV_KIT) /
/
******************************************************************************

  • End of Arduino_GFX setting
    ******************************************************************************/

void setup(void)
{
Serial.begin(115200);
// Serial.setDebugOutput(true);
// while(!Serial);
Serial.println("Arduino_GFX Hello World example");

#ifdef GFX_EXTRA_PRE_INIT
GFX_EXTRA_PRE_INIT();
#endif

// Init Display
if (!gfx->begin())
{
Serial.println("gfx->begin() failed!");
}
gfx->fillScreen(BLACK);

#ifdef GFX_BL
pinMode(GFX_BL, OUTPUT);
digitalWrite(GFX_BL, HIGH);
#endif

gfx->setCursor(10, 10);
gfx->setTextColor(RED);
gfx->println("Hello World!");

delay(5000); // 5 seconds
}

void loop()
{
gfx->setCursor(random(gfx->width()), random(gfx->height()));
gfx->setTextColor(random(0xffff), random(0xffff));
gfx->setTextSize(random(6) /* x scale /, random(6) / y scale /, random(2) / pixel_margin */);
gfx->println("Hello World!");

delay(1000); // 1 second
}

But still, even with such a simple example, I get two errors !!!!!

C:\Program Files (x86)\Arduino\libraries\Arduino_GFX-master\src\databus\Arduino_HWSPI.cpp: In member function 'virtual bool Arduino_HWSPI::begin(int32_t, int8_t)':
C:\Program Files (x86)\Arduino\libraries\Arduino_GFX-master\src\databus\Arduino_HWSPI.cpp:184:17: error: 'SPI_MODE2' was not declared in this scope
_dataMode = SPI_MODE2;
^~~~~~~~~
exit status 1
Error compiling for board Ai-Thinker BW16 (RTL8720DN).

And I must say that I looked through the “Arduino_HWSPI.cpp” file, I did not find those lines that are indicated in the errors “Arduino_HWSPI::begin(int32_t, int8_t)” and “SPI_MODE2”.

Best regards, Sergei.

from arduino_gfx.

moononournation avatar moononournation commented on August 22, 2024

I think you should report to realtek not defined SPI_MODE2

from arduino_gfx.

KilimSerg avatar KilimSerg commented on August 22, 2024

But there are many examples on the Internet of repeating the wi-fi analyzer on the RTL8720DN, and you too, where everything works fine, how did the wi-fi analyzer work normally before?

from arduino_gfx.

moononournation avatar moononournation commented on August 22, 2024

that's why I suggest you report this error to Realtek latest board package have this error.

from arduino_gfx.

KilimSerg avatar KilimSerg commented on August 22, 2024

Okay, I’ll try to get in touch, but I have a few more questions for you:

You can indicate a specific address where to contact, I received the BW16-kit (RTL8720DN) boards only 2 weeks ago and did not expect to encounter such problems when trying to repeat the finished ones. proven and working examples from the Internet.
Therefore, I simply don’t know where to send my request.
And the second question.
Maybe you can tell me where I can get older software that did not have this error yet.
Since the request itself and its corrections may take some time, and it is not known how long, I would not want to sit and just wait.

from arduino_gfx.

moononournation avatar moononournation commented on August 22, 2024

use previous version is a quick solution, you can use board manager select previous version to install

from arduino_gfx.

KilimSerg avatar KilimSerg commented on August 22, 2024

Can you tell me the address where to send a bug report?

from arduino_gfx.

KilimSerg avatar KilimSerg commented on August 22, 2024

Hello moononournation!
Thank you for your advice, rolling back to an older version really helped.
True, the rollback was not without problems.
I first tried to roll back through the Arduino IDE board manager and the problem with “Arduino GFX Library” went away, but the problem with “lwip_netconf.h” remained, I tried to roll back to a lower version again, after that the “Arduino GFX Library” stopped working altogether.
After several reinstallations, I finally figured out that I need to completely delete the “realtek” folder (C:\Users\User\AppData\Local\Arduino15\packages\realtek) and only after that install the old version through the board manager, as if you were installing it the first time and then everything worked great. It is enough to roll back to version 3.1.6.
I am attaching a photo:

IMG_20240320_124905_1
IMG_20240321_144617_1

from arduino_gfx.

moononournation avatar moononournation commented on August 22, 2024

Good to see that.

You may report the Ameba latest release issue at their repository:
https://github.com/ambiot/ambd_arduino

from arduino_gfx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.