fdivitto / FabGL

ESP32 Display Controller (VGA, PAL/NTSC Color Composite, SSD1306, ST7789, ILI9341), PS/2 Mouse and Keyboard Controller, Graphics Library, Sound Engine, Game Engine and ANSI/VT Terminal
http://www.fabglib.org
Other
1.45k stars 217 forks source link

Space Invaders Build error #43

Closed douggilliland closed 4 years ago

douggilliland commented 4 years ago

I tried to build space invaders and got a build error.

> C:\Users\HPz420\Documents\GitHub\Other People GitHubs\FabGL VGA on ESP32\FabGL\examples\VGA\SpaceInvaders\SpaceInvaders.ino: In member function 'virtual void IntroScene::init()':
> 
> SpaceInvaders:90:29: error: 'class fabgl::SoundGenerator' has no member named 'playSamples'
> 
>      music_ = soundGenerator.playSamples(themeSoundSamples, sizeof(themeSoundSamples), 100, -1);

Might be due to installing FabGL via the Arduino IDE and it's using the library it loaded from there but not sure how to solve this.

fdivitto commented 4 years ago

Make sure you're using the library is currently on github instead of the one from library manager.

douggilliland commented 4 years ago

I don't know how to do that. Do I uninstall the FabGL that I installed from library manager? How do I then point to this one?

douggilliland commented 4 years ago

I figured it out. If anyone else is stuck on this... 1 - Install drivers via Arduino from the Library Manager. These are not the latest files. Space Invaders should run but not have sound (as of now because it's the older version). 2 - Move the FabGL from the Arduino libraries file folder to the desktop. 3 - Copy the FabGL from the GitHub download to the Arduino files folder (where you removed the other folder). 4 - Examples will now be the latest. 5 - Compile/download/test the new files. You know it works if you now get sound from Space Invaders. 6- Save as where you would normally save your Arduino sketches.