Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kmattim opened this issue Sep 25, 2018 · 8 comments
Open

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

kmattim opened this issue Sep 25, 2018 · 8 comments

Comments

@kmattim
Copy link

kmattim commented Sep 25, 2018

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

Environment:

  • Arduino 1.8.6
  • NeoPixelBus 2.3.4
  • NTPClient 3.1.0
  • ESPAsyncTCP 1.2.0
  • ESPAsyncWebServer 1.2.0
  • ESPAsyncWiFiManager 0.1.6
  • ESP8266 community board definition 1.6.22
  • Board type: wemos d1 mini
  • wemos usb driver installed
  • SPIFFS uploader installed and functional

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
Copy link
Owner

alanswx commented Sep 25, 2018

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
Copy link
Author

kmattim commented Sep 26, 2018

I'm trying ;)

  • with the mentioned changes it will compile successfully
  • because I have a 16x16 LED (should be ws2812 but I think its a sk clone) grid, I changed the configuration in DisplayPixel.h
const uint8_t PanelWidth = 16;
const uint8_t PanelHeight = 16;
const uint8_t TileWidth = 1;
const uint8_t TileHeight = 1;
  • LED grid is connected to D4 (so Arduino Pin 2 / Physical Pin 17) [Wemos D1 mini PinDef] I was not sure about which pin configuration to use for the NeuPixelBus object (arduino or physical style) so I tried both (2 and 17)
  • same result: only 1 yellow followed by a few white LEDs are active
  • the initial WiFi AP was visible and I was able to configure the correct WiFi network
  • ESP reconnected to the given new WiFi network and I was able to connect via browser
  • at this point I encountered some other errors and I tried to evaluate the cause:
  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

  1. 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

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

  3. 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

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

@alanswx
Copy link
Owner

alanswx commented Sep 26, 2018

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
Copy link
Author

kmattim commented Sep 27, 2018

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
Copy link
Owner

alanswx commented Sep 28, 2018

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
Copy link
Author

kmattim commented Oct 1, 2018

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
Copy link
Owner

alanswx commented Oct 2, 2018

Please post a link to the LED grid. Thanks!

@alanswx
Copy link
Owner

alanswx commented Nov 14, 2018

This should work now. you might need to update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants