hello, i am new to vscode and platformio. I am trying to understand how to import a project. I’ve been reading and already solved some problems.
here is what i did:
- change the name to .cpp, i also it changed back to compile the code
- declare the functions
- moved the .h to the include branch
- made some changes to platformio.ini , but end leaving it as it was
What i am missing?
this is my platfrom.ini
[env:uno]
platform = atmelavr
board = uno
framework = arduino
i still get this errors
- src\main.cpp:440:12: warning: unused variable ‘dummyReading’ [-Wunused-variable]
byte dummyReading = mozziAnalogRead(analogPins[i]); // need to read pin once because first reading is not accurate
^ - src\main.cpp: In function ‘void flashLeds()’:
src\main.cpp:869:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(millis()<(i+1)*25) {
which correspond to
- byte dummyReading = mozziAnalogRead(analogPins[i]);
- while(millis()<(i+1)*25)
and finally
C:\Users.…\AppData\Local\Temp\ccSym2at.ltrans0.ltrans.o: In function
main': <artificial>:(.text.startup+0x1d4): undefined reference to
randSeed(long)’
:(.text.startup+0x1dc): undefined reference to startMozzi(int)' <artificial>:(.text.startup+0x1fc): undefined reference to
Bounce::interval(unsigned int)’
:(.text.startup+0x210): undefined reference to Bounce::attach(int, int)' <artificial>:(.text.startup+0x310): undefined reference to
rand(int, int)’
:(.text.startup+0x46a): undefined reference to rand(int, int)' <artificial>:(.text.startup+0x48c): undefined reference to
rand(int, int)’
:(.text.startup+0x734): undefined reference to rand(int, int)' <artificial>:(.text.startup+0x774): undefined reference to
rand(int, int)’
:(.text.startup+0xa84): undefined reference to audioHook()' C:\Users\deadman\AppData\Local\Temp\ccSym2at.ltrans1.ltrans.o: In function
global constructors keyed to 65535_0_main.cpp.o.2134’:
:(.text.startup+0x180): undefined reference to `Bounce::Bounce()’
I am also wondering about the declaration of two functions that mozzi library use to control the sound. updatesound, updateaudio
I was reading in this nice post about the diferent types from arduino a c++, but it seems not to give me problems some byte tipes…
Thanks in advantage just for reading the post, and ofcourse if you could give me some directions or links, any help.
i guess this is a common problem