B4R Question compiling problem [solved]

Hans- Joachim Krahe

Active Member
Licensed User
Longtime User
... wonder, what is wrong with me? When I want to compile a source with

#If C
#include "DFPlayer_Mini_Mp3.h"

Compiler breaks with: "
DFPlayer_Mini_Mp3.h: No such file or directory
42 | #include "DFPlayer_Mini_Mp3.h"
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated."

I can deal with the error only by copying DFPlayer_Mini_Mp3.h to scetch folder by a watchdog, but what can be the reason?

friendly regards and a happy new year

hajo
 

hatzisn

Well-Known Member
Licensed User
Longtime User
I am not c++ literal at any way but I think when you include a library between <> then it looks at the specified arduino folder and if you put them between " " then you have to write the full path f.e."c:\myfolder\DFPlayer_Mini_Mp3.h".
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
I am not c++ literal at any way but I think when you include a library between <> then it looks at the specified arduino folder and if you put them between " " then you have to write the full path f.e."c:\myfolder\DFPlayer_Mini_Mp3.h".
I never tried either... So.... have you tried it?
 
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
I never tried either... So.... have you tried it?

I did not but used ready made code (Arduino examples) that did. I am not sure though a hundred per cent that this is the way or the other way around. I am though certain by a fair amount per cent that this is the correct way.
 
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
Upvote 0

Hans- Joachim Krahe

Active Member
Licensed User
Longtime User
This Code worked before. I resettet arduino, Java and B4R ideto earlyer states, but error kept. Only IDE, I didnt set back, was Windows. So maybe 8 should try win 7🤔
 
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
If you use one drive make all files available offline.
 
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
... no, I dont. but maybe should deinstall onedrive too...

It has happened to me and I spent almost an hour trying to figure out what is wrong... Finally a post on the Internet (in Arduino forum I think), saved me.
 
Upvote 0

Hans- Joachim Krahe

Active Member
Licensed User
Longtime User
ât the moment, I am so frustrated with dfplayer lib, that I think, it's easyer, to create byte sequences and send directly to the player. Only need half a dozen like :

Private buf() As Byte = Array As Byte (0x7E,0xFF,0x06,0x48,0x00,0x00,0x0F,0xFE,0xA4,0xEF)

but thank you for help. Hope, you had a good start to new year:)
 
Upvote 0

Hans- Joachim Krahe

Active Member
Licensed User
Longtime User
Private buf() As Byte = Array As Byte (0x7E,0xFF,0x06,0x48,0x00,0x00,0x0F,0x00,0x00,0xEF) ' query total number of udisk files fill_checksum(buf) private Sub fill_checksum (b2() As Byte) As Byte Dim mysum(2) As Int mysum(0) =0 For i = 1 To b2(2) mysum(0) = mysum(0) - b2(i) Log (i," ",b2(i)," ",mysum(0)) Next Dim sumbyte() As Byte = bc.IntsToBytes(mysum) Log(bc.HexFromBytes(b2)) b2(b2(2)+1)= sumbyte(1) 'umgekehrt einfügen b2(b2(2)+2)= sumbyte(0) Log(bc.HexFromBytes(sumbyte)) Log(bc.HexFromBytes(b2)) 'Return b2 End Sub

... code for generating and filling checksum works. Is anyone interestet to help with the setting of the softserial stream?

line function seems not to work in code editmode - sorry :rolleyes:


... later, I foud an existing module for cammandlines. so, no more action necessary:)
 
Last edited:
Upvote 0
Top