alanswx / WebPixelFrame

Code to control a ESP8266 and a matrix of ws2812b pixels
20 stars 7 forks source link

Compiling error "expected unqualified-id before string constant" #3

Open kmattim opened 6 years ago

kmattim commented 6 years ago

I am not able to compile the project on a freshly installed Arduino 1.8.6 with all referenced libs.

Environment:

Error:

WebPixelFrame:933:15: error: expected unqualified-id before string constant static void _u0_putc(char c) { ^

WebPixelFrame:940:9: error: expected unqualified-id before string constant void saveConfigCallback () { ^

WebPixelFrame:958:9: error: expected unqualified-id before string constant void initSerial() { ^

WebPixelFrame:968:9: error: expected unqualified-id before string constant void setup() { ^

WebPixelFrame:1092:9: error: expected unqualified-id before string constant void loop() { ^

exit status 1 expected unqualified-id before string constant

alanswx commented 6 years ago

I moved this function up: //Use the internal hardware buffer static void _u0_putc(char c) { while (((U0S >> USTXC) & 0x7F) == 0x7F); U0F = c; } to right before: class DisplayHandler: public AsyncWebHandler {

Then it seemed to compile, but I ran into problems with the ESPAsyncWiFiManager.cpp -- it wasn't compiling until I commented out //WiFi.beginWPSConfig(); in startWPS

I need to go back to the ESPAsyncWifiManager and try to fix that. Did you build a pixel frame?

kmattim commented 6 years ago

I'm trying ;)

  1. Web UI -> piskel gallery -> completely empty so I tried to create a new one but got an error during save with a web message "unknown error" and a ESP crash with stacktrace on serial console and reboot

    Fatal exception 9(LoadStoreAlignmentCause) ctx: sys [...] Soft WDT reset

  2. Web UI ->file editor -> Web UI is loading but on serial instant ESP crash with stacktrace and ESP reboot -> because Web UI is still trying to async load data this ends in an ESP crashing loop until I close the file editor UI

  3. Web UI -> display clock -> shows message "clock started" but no reaction on LEDs

  4. Web UI -> show GIFs -> shows message "starting gif loop" and serial is clearly in the gif loop because of "gif finished" messages but no reaction on LEDs

  5. Web UI -> Text with color -> shows message "Setting scroll to: Hello" but no reaction on LEDs

alanswx commented 6 years ago

Do you have a 3 to 5 V converter in place? on my D1 Mini it is labeled as the RX pin or 21.

In the code it is 2, but for ESP8266 it is ignored, see: https://github.com/Makuna/NeoPixelBus/blob/e13f9599c80bc5872f614d7cc184547b11aa225c/examples/NeoPixelTest/NeoPixelTest.ino#L17

This is because of the way they use the DMA to make it fast and not use much processor.

kmattim commented 6 years ago

Yes I am using a 74AHCT125 shifter for the data line. Changing to the RX pin did the trick and now text, clock and GIFs are shown in the LED matrix ... only issue, all is mirrored?

Tested pliskel and file editor again but they've got the same ESP crash with stacktrace on serial debug.

alanswx commented 6 years ago

We are getting closer!

Did you upload the files to the spiffs storage?

Not sure why they are mirrored. I think there are some settings in the led code to switch the order. Or you might need to rewire the pixels.

kmattim commented 6 years ago

Yes I uploaded the data folder to the spiffs without an error and the web ui is available too; also pliskel web ui and the GIFs within the data folder are directly accessible - until I save in pliskel or try to access the spiffs editor.

The LED grid is manufacturer premade, so no chance of rewiring. I tried some manual reading from a bmp to LED matrix and the orientation was correct ... maybe something within neopixelbus and modes - I will have a look into that.

alanswx commented 6 years ago

Please post a link to the LED grid. Thanks!

alanswx commented 5 years ago

This should work now. you might need to update.