Trying to understand how to import arduino code

Thanks @normandunbar,

Yes i had included Arduino.h, i guess those errors might be referring to other functions inside mozzi libraries . I fix the problem by adding

lib_extra_dirs =

    C:\Users\...\Documents\PlatformIO\Projects\drumkid1.2\include\src\Bounce2

    C:\Users\...\Documents\PlatformIO\Projects\drumkid1.2\include\src\MozziDK

to the platformio.ini file. weirdly it didn’t work by adding the original location

lib_extra_dirs =

    C:\Users\...\Documents\arduino\1.2\drumkid\src\Bounce2

    C:\Users\....\Documents\arduino\1.2\drumkid\src\MozziDK

The program i am working with uses a custom version of mozzi.h that’s why it need to use the local version. For bounce2.h it does no matter.

#include "Arduino.h"
 #include "src/Bounce2/src/Bounce2.h"
 #include "src/MozziDK/src/MozziGuts.h"
 #include "src/MozziDK/src/Sample.h"
#include "src/MozziDK/src/mozzi_rand.h"
#include "src/MozziDK/src/Oscil.h"
#include "src/MozziDK/src/tables/saw256_int8.h"

// include drum beat pattern definitions from separate file
#include "beats.h"

// include sample data (generated via Python script)
#include "sample0.h"

What i don’t understand is why the compiler found the location of some libraries, as for example beats.h and sample0.h and not the bounce2 and mozzi. I located both inside include in the project folder. I also didn’t have to give the location in lib_extra_dirs inside plaformio.ini

by the way the code has many byte data types. maybe it’s taking them from the arduino.h.

Hope to find more excellent posts while learning.

Thanks again, and please understand i am starting again with programming and probably i am not using the correct terms.