ESP32 fatal error: Arduino.h (Led Matrix 64x64)

Posted on
  • Hello,
    I want to drive a 64×64 Ledmatrix (hub75e) with my esp32 via Espruino. Previously I used the smartmatrix library with arduino code.

    After some research I found no included function, or library to drive my display with Espruino. The article about writing my own C extension kept me thinking about a wrapper for the smartmatrix library. Finally, I successfully added my own module into the Espruino code.

    But here is my problem: The smartmatrix library needs the Arduino.h file to work property. There is a tutorial to include the Arduino driver (https://github.com/espruino/Espruino/tre­e/master/targets/esp32), but the build failures.
    My error is: “error: conflicting types for random”. I tried to change some versions (https://github.com/espressif/arduino-esp­32/issues/3201), but this generated more errors (maybe I did it wrong).

    ESP Template:
    Toolchain version: esp-2019r2
    Compiler version 8.2.0

    I would appreciate some help.
    Jonas

  • Sat 2020.03.07

    Hello Jonas @user110079 and thank you for your interest in Espruino!

    As it appears this is more of a build issue, wouldn't a title like:

    'Build error: conflicting types for random with 64x64 LED Matrix on ESP32'

    steer a more appropriate crowd? A simple title edit may draw a more specialized respondant.

    There are a few projects with minor modifications that may do what you need, without the overhead of the path currently on. Have these links been checked out?

    http://www.espruino.com/LED+Matrix
    http://www.espruino.com/Tiny+Word+Clock

  • Yes you are right with the headline. I also checked out this projects bevor. You can drive this led matrixes directly by the board (each led individually). I have a 64x64 matix (4.096 leds) with a hub75e interface !

    https://market.alibaba.com/snapshotDetai­l.htm?spm=a2756.order-detail-ta-bn-b.0.0­.7f4e2fc2xwO1E6&contentId=7602263053&ord­erType=tadBuyNow

    I could write my own driver for this type of ledmatrix, but I first want to try to use an existing library like smartmatrix (https://github.com/pixelmatix/SmartMatri­x/).

  • Did a quick glancing over related post/clip at https://www.youtube.com/watch?v=bu308tAq­yIw

    @Jonaswinz, I'm now curious what role Espruino plays in that scenario?
    I expect some parts use actual Espruino components..., and therefore, I assume you want to easily control the content of the display... and yes, for that, Espruino is an excellent choice... as long as you want an easy interface to put text and graphics out there with moderate speed.

    With all these scanning drivers, flickering or smooth, continuous change are the issues, because you have to feed the data between scan lines have to be put out. ESP32 w/ dual processor helps if you can control the behavior regarding timing between the participating processes or tasks or what ever you may call them.

    Espruino has a Graphics class with which you can create content into a buffer. From that buffer you have to get the data out onto he panel. This Graphics (reference link) class is implemented natively - in the Espruino firmware in C - to secure speed, and has many options on creation to store the data suitable for simple pumping out. You might get away with a simple, low lever, data pump in assembler / C that you drive on a timer to have a nice running of the display, similar to something I did for reading out the data of such a buffer and feed into neopixel strings of a particular arrangement: Efficiently moving things around in zig-zag Graphics buffer visualized w/ 24/32 bpp displays / neopixel strings. You may not even need to do a specific build... using an Espruino board. Using an ESP32, you most likely need to do something for compiling the inline c compiling for the upload before the upload for the application that you write in JavaScript.

  • Yes, you are right! I use Espruino for all other functions.
    I could use the Graphics Library and build my own driver, but first I want to try It with smartmatrix. It is an awesome libraray with all the function I need.

    At the moment I face the problem, that I need the Arduino.h file for the library to work. I fixed the conflicting types error by using the arduino-esp32 builder. But I think, I am not doing It right.
    The firmware make crashes with:

    fatal error: Arduino.h: No such file or directory

    Where do I have to include the Arduino Drivers? I used this tutorial:

    https://github.com/espruino/Espruino/tre­e/master/targets/esp32

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

ESP32 fatal error: Arduino.h (Led Matrix 64x64)

Posted by Avatar for Jonaswinz @Jonaswinz

Actions