• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Weird ESP32 compile error: "& was not expected here" Solved 5 hours later :-)

Q&A Forum › Category: ESP32 › Weird ESP32 compile error: "& was not expected here" Solved 5 hours later :-)
0 Vote Up Vote Down
Terry King asked 4 years ago

I had code that compiled and ran on UNO, then needed to migrate it to ESP32. Set up usual board (DevKit) and port (com4 in my case).  VERIFY and got immediate error “& was not expected here”  
What?? Pulled stuff out of the code until nothing but usual ‘new’ setup and loop. same error.  Did an actual “new” file, compiled with default filename and it compiled OK.
What It Was:  I had a very long filename for the .ino !  Saving same code to short filename it compiled, uploaded and ran fine…  
Just In Case someone else hits this weird error!
Regards, Terry King    …In The Woods In Vermont
The one who dies with the most Parts LOSES!    WHAT DO YOU NEED??

Question Tags: compile error
1 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi Terry.
Thanks for sharing your issue and the solution.
It may be useful for our readers.
Thanks 🙂

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.