Questions about DaisyDuino and porting to Arduino IDE

I’ve got Arduino up and running and can upload programs to Daisy Seed. So far so good! I also found the DaisyDuino examples quite helpful - thanks very much for providing those!

My first question is: how can I keep the DaisyDuino library/examples up to date? I’m assuming more examples will be added over time to keep in sync with the general DaisyExamples?

Second question: what if someone posts a cool patch on a forum or the web and it is not in the official examples (perhaps never will be), but I want to port it to Arduino IDE for experimentation? I could not find any instructions for a dummy like me to convert/import .cpp files into something Arduino recognizes (which I believe are .ino files). Your help would be most appreciated!

These are my 5 centrs (“fem ören” in Swedish) on this topic :slight_smile:

As you are running DaisyDuino you are probably from an Arduino background. As was I, having previously worked with the Mozzi library. Which is good!

But I think you should move from the Arduino model to just using c++ (and use the “make” + “make program-dfu” model).

Then you can use, study and base all your future projects on all the examples that are in DaisyExamples!

The programming model is not that different:

Arduino > setup() is moved to your main() function. Arduino > Loop() is put into the endless for() loop at the end. (What to place here and in the AudioCallback() is depending on your project.)

The AudioCallback() is similar to the “MyCallback” of for example the oscillator.ino code.

Check out the examples in the DaisyExamples > Seed directory! The difference isn’t that big but you will find it easier to move forward. At least it is for me.

DaisyDuino is cool in many ways, but I don’t really get the point of it. Sorry! :slight_smile: Sometimes you just have to re-learn some stuff to move forward, I think.

Don’t hesitate to ask for more help! :slight_smile:

Staffan

1 Like

The examples in DaisyDuino are direct ports of the examples in DaisyExamples. So comparing across those libraries is a really good starting place for understanding the differences between arduino and cpp as far as Daisy is concerned.

1 Like

Thanks for the inputs, Staffan! I really appreciate it. I agree with you that I should be moving from Arduino to just using C++. Since I have zero experience with C++ and very little with programming in general, I think you can appreciate the enormous learning curve that is before me; as such, I’m trying to take it one small step at a time.

I do have the complete Toolchain installed on my Mac and I have looked at the examples in DaisyExamples. I look forward to the day I can experiment with my own code, but those are still quite far off.

I infer from your comments that perhaps it is not possible to directly convert from .cpp to .ino, but rather it requires manual porting? Is that correct?

I’ve also been using the Webprogrammer to upload and test out DaisyExamples on my Patch and Seed. I do find it and DaisyDuino useful to quickly see and hear what certain code examples can do in order to decide which direction to go in; so while those don’t seem useful in the long run, they do serve the purpose of rapid “reality checks”, particularly if I’m not yet up to speed to create the code myself.

Peter

1 Like

Thanks for the input, Ben! Yes, I deduced that the DaisyDuino examples were identical to the cpp versions. Could you elaborate on how these ports were created? Is there a translation program/routine? Or is it done completely manually? I’d really like to learn how to perform such a port, but I might need detailed instructions due to lack of proficiency. Thanks!

Hi @GuitarBuilder, I can understand that the transistion to coding (in general, in C++/libdays/DaisySP specifically) takes some time to learn! I created projects with Arduino IDE (which is C++) and the Arduino hardware for a couple of years, then on to Arduino and the Mozzi library for a couple of months, before I discovered Daisy. I think an Arduino coding background is very helpful!

To my knowledge there is no automatic way to port programs, but the principle and the basic language is the same. The DaisyExamples has been a good starting point for a lot of my own experimentation.

If I get the time, I might write a couple of beginner’s tutorials on coding in C++ with the Daisy. I’d like to do that.

Good luck with everything!

2 Likes

I will give it the old college try!

2 Likes