stangreg / Ignitron

An ESP32 based foot pedal to control the Spark Amp and connect to the App using Bluetooth LE.
BSD 3-Clause "New" or "Revised" License
42 stars 12 forks source link

Firmware #17

Closed Storgio closed 1 year ago

Storgio commented 1 year ago

Hi, I’m completely new on this topic but I would love to have a working ignitron for my spark. first of all thanks for the great project then… would be possible to have a firmware to upload without the needing of compiling it? I have no idea where to start from..

stangreg commented 1 year ago

Hi, I could upload the files, however, I am not sure what files you would require. Also, given that you have no idea where to start from, I would think it would still be difficult for you to get it to work easier as if you would compile it. I would recommend to follow the build instructions. The new Arduino IDE is very useful and if you add all the required libraries as documented, it should work. So please read the documentation and try.

Storgio commented 1 year ago

Hi, thanks again for your help! I manage to start compiling with Arduino IDE 2.0 but i got some problems:

  1. Can't find the FS library
  2. Dunno where to add the compiling option "-D USE_NIMBLE"
  3. I got the problem already solved in another issue /Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /private/var/folders/mw/qrqnrdv974g2wyj0vvwrrfw40000gn/T/arduino-sketch-A9429611AF632AB807A95B8B169B510C/sketch/src/objs.a(SparkBLEKeyboard.cpp.o):(.rodata._ZTV16SparkBLEKeyboard[vtable for SparkBLEKeyboard]+0x24): undefined reference to BleKeyboard::onConnect(NimBLEServer*)' /Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /private/var/folders/mw/qrqnrdv974g2wyj0vvwrrfw40000gn/T/arduino-sketch-A9429611AF632AB807A95B8B169B510C/sketch/src/objs.a(SparkBLEKeyboard.cpp.o):(.rodata._ZTV16SparkBLEKeyboard[vtable for SparkBLEKeyboard]+0x28): undefined reference toBleKeyboard::onDisconnect(NimBLEServer)' /Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /private/var/folders/mw/qrqnrdv974g2wyj0vvwrrfw40000gn/T/arduino-sketch-A9429611AF632AB807A95B8B169B510C/sketch/src/objs.a(SparkBLEKeyboard.cpp.o):(.rodata._ZTV16SparkBLEKeyboard[vtable for SparkBLEKeyboard]+0x2c): undefined reference to `BleKeyboard::onWrite(NimBLECharacteristic)' /Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /private/var/folders/mw/qrqnrdv974g2wyj0vvwrrfw40000gn/T/arduino-sketch-A9429611AF632AB807A95B8B169B510C/sketch/src/objs.a(SparkBLEKeyboard.cpp.o):(.rodata._ZTV16SparkBLEKeyboard[vtable for SparkBLEKeyboard]+0x40): undefined reference to non-virtual thunk to BleKeyboard::onConnect(NimBLEServer*)' /Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /private/var/folders/mw/qrqnrdv974g2wyj0vvwrrfw40000gn/T/arduino-sketch-A9429611AF632AB807A95B8B169B510C/sketch/src/objs.a(SparkBLEKeyboard.cpp.o):(.rodata._ZTV16SparkBLEKeyboard[vtable for SparkBLEKeyboard]+0x48): undefined reference tonon-virtual thunk to BleKeyboard::onDisconnect(NimBLEServer)' /Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /private/var/folders/mw/qrqnrdv974g2wyj0vvwrrfw40000gn/T/arduino-sketch-A9429611AF632AB807A95B8B169B510C/sketch/src/objs.a(SparkBLEKeyboard.cpp.o):(.rodata._ZTV16SparkBLEKeyboard[vtable for SparkBLEKeyboard]+0x78): undefined reference to `non-virtual thunk to BleKeyboard::onWrite(NimBLECharacteristic)' collect2: error: ld returned 1 exit status

exit status 1

Compilation error: exit status 1

I dunno how to continue...

stangreg commented 1 year ago

Hi,

  1. I think the FS library is part of the standard board installation. So you don't need to include anything, it should work out of the box
  2. you have to find the file platform.txt in the correct Arduino folder (for me it was in 'packages/esp32/hardware/esp32/2.0.6/platform.txt' in the Arduino folder). Then you have to find the line starting with "build.extra_flags.esp32" and add " -DUSE_NIMBLE" at the end.
  3. This is likely an error due to the missing USE_NIMBLE flag (see 2.)

Please try again and let me know if it worked.

Storgio commented 1 year ago

Ya man, it worked! I managed to compile, upload and upload the data folder. The only error i got now is: "ERROR while to trying to open preset list file" Seems like it's missing a sort of "index" file for the presets in the data folder, right?

The hardware is not complete yet cause I wanted to build the code first, it connects to the Spark and the list file error remains

Anyway: once again THANKS for your project, your help, your support and your kindness.

stangreg commented 1 year ago

OK, we are one step closer. The error seems to indicate that the data folder was not uploaded correctly. The index file in the data folder is called "PresetList.txt" and should be uploaded together with the presets.

As you described above, you are using Arduino 2.0 IDE. This is ok for compiling, but this version unfortunately does not support external tool support. As described in the documentation, the "ESP32 Sketch Data Upload" tool is required to upload the data. In order to use this, you need to install the version 1.8.19 of the Arduino IDE. There you can install the Data Upload plugin and use it to upload the data. I hope Arduino will add tools support soon to fully enable IDE 2.0.

Let me know if that worked.

Storgio commented 1 year ago

I setted up Arduino 1.8 to upload the data folder but the preset list file is not in the data folder..

stangreg commented 1 year ago

When you check here on GitHub, there is definitely a folder called "data" on top level. Please check if that folder is also present and filled in your local copy. There should be a file called "PresetList.txt" and a number of .json files containing the presets. To upload the data folder, make sure to open the Ignitron.ino project in the Arduino IDE (1.8) and Choose "ESP Sketch Data Upload" in the "Tools" menu. This should then do the trick. Make sure to choose the correct partition scheme in the Tools folder (Minimal SPIFFS (Large APPS with OTA))

Storgio commented 1 year ago

DONE! I manage to upload the folder and I have no more errors. The only problem was that I had to reduce the folder size by deleting some files because otherwise I mhad a "file system full" error, I don't know why.

Is it possible that I added multiple times the same files?

Thanks again

stangreg commented 1 year ago

I don't think that could upload data multiple times as it will always write to the same memory location. Maybe you have less memory on your board. If it works now that is great to hear. I will close this as the original issue is resolved.