Daisy Patch Example Arduino IDE

Hi there, I’m trying to get back into my Daisy after a long break. Previously I had been working with Max and Gen~ and had only programmed it through the web browser. I’m now trying to get the Ardunio IDE up and running. I have followed along with the intro video and have been able to upload the Blink example to the Seed sitting in a Patch module. I then went to some of the patch example programs but receive numerous errors, I’ll paste them below. I presume that I am missing some sort of library but am unsure.

error message from Daisy Patch Stereo Reverb example:
C:\Users\rprim\Documents\Arduino\libraries\DaisyDuino\src\AudioClass.cpp:17:4: error: ‘PB_7_ALT1’ was not declared in this scope
17 | {PB_7_ALT1, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
| ^~~~~~~~~
C:\Users\rprim\Documents\Arduino\libraries\DaisyDuino\src\AudioClass.cpp:20:4: error: ‘PB_9_ALT1’ was not declared in this scope
20 | {PB_9_ALT1, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C4)},
| ^~~~~~~~~
C:\Users\rprim\Documents\Arduino\libraries\DaisyDuino\src\AudioClass.cpp:36:4: error: ‘PB_6_ALT1’ was not declared in this scope
36 | {PB_6_ALT1, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
| ^~~~~~~~~
C:\Users\rprim\Documents\Arduino\libraries\DaisyDuino\src\AudioClass.cpp:39:4: error: ‘PB_8_ALT1’ was not declared in this scope
39 | {PB_8_ALT1, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C4)},
| ^~~~~~~~~
C:\Users\rprim\Documents\Arduino\libraries\DaisyDuino\src\AudioClass.cpp: In member function ‘AudioClass::BoardVersion AudioClass::BoardVersionCheck()’:
C:\Users\rprim\Documents\Arduino\libraries\DaisyDuino\src\AudioClass.cpp:292:13: error: ‘PD3’ was not declared in this scope; did you mean ‘D3’?
292 | pinMode(PD3, INPUT_PULLUP);
| ^~~
| D3

exit status 1

Compilation error: exit status 1

still working on this and tried to take it back to nothing and work from there. Even with this nothing program:
#include “daisy_patch.h”

void setup() {

}

after updating the board manager in the preferences to:
https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
I still receive the following errors:
c:\Users\rprim\Documents\Arduino\libraries\DaisyDuino\src\AudioClass.cpp:17:4: error: ‘PB_7_ALT1’ was not declared in this scope
17 | {PB_7_ALT1, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
| ^~~~~~~~~
c:\Users\rprim\Documents\Arduino\libraries\DaisyDuino\src\AudioClass.cpp:20:4: error: ‘PB_9_ALT1’ was not declared in this scope
20 | {PB_9_ALT1, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C4)},
| ^~~~~~~~~
c:\Users\rprim\Documents\Arduino\libraries\DaisyDuino\src\AudioClass.cpp:36:4: error: ‘PB_6_ALT1’ was not declared in this scope
36 | {PB_6_ALT1, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
| ^~~~~~~~~
c:\Users\rprim\Documents\Arduino\libraries\DaisyDuino\src\AudioClass.cpp:39:4: error: ‘PB_8_ALT1’ was not declared in this scope
39 | {PB_8_ALT1, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C4)},
| ^~~~~~~~~
c:\Users\rprim\Documents\Arduino\libraries\DaisyDuino\src\AudioClass.cpp: In member function ‘AudioClass::BoardVersion AudioClass::BoardVersionCheck()’:
c:\Users\rprim\Documents\Arduino\libraries\DaisyDuino\src\AudioClass.cpp:292:13: error: ‘PD3’ was not declared in this scope; did you mean ‘D3’?
292 | pinMode(PD3, INPUT_PULLUP);
| ^~~
| D3

exit status 1

Compilation error: exit status 1

In the Arduino IDE, you’ll find the example patches under the File menu: File->Examples->DaisyDuino, from there, there are examples for various Daisy devices.

These examples demonstrate the correct way to use DaisyDuino. Note, some, like patch, may require installation of additional Arduino libraries.

tele_player, thanks for the suggestion, I had previously tried exploring the examples with no luck compliling. I’ve gone through numerous examples for the seed and the patch with basically no luck. I have open in the screen shot the BiQuad, Reverb & HiHat examples all with similar errors. So far the only one that compiled and loaded was Knob (seed example). My only observation here is that it doesnt use any of the Daisy related *.h files or DaisyHardware name spaces. Any suggestions, I’m using the 2.2.1 IDE and the 1.7.0 DaisyDuino libraries

This is the first couple line of errors:
c:\Users\rprim\Documents\Arduino\libraries\DaisyDuino\src\daisy_seed.cpp:98:48: error: stray ‘\302’ in program
98 | libDaisy/src/daisy_seed.cpp at master · electro-smith/libDaisy · GitHub
| ^
c:\Users\rprim\Documents\Arduino\libraries\DaisyDuino\src\daisy_seed.cpp:98:49: error: stray ‘\267’ in program

I’m using the same versions of Arduino and DaisyDuino, but on a Mac. Examples build as expected for me.
Maybe it’s a Windows problem?

My DaisyDuino 1.7.0 doesn’t have a daisy_seed.cpp anywhere in the DaisyDuino files.

I’d delete and reinstall DaisyDuino.

1 Like

I gave the installation a go on my desktop and everything went smoothly and I was able to compile and load the example programs to the daisy. After an initial uninstall and reinstall on my laptop, I was still getting the same errors. I followed a Arduino IDE cleanup process deleting a few folders and reg entries left around after the uninstall. After one more reload, this time everything worked :slight_smile: :partying_face: Many thanks :+1:

3 Likes