Hi All,
Apologies if this information is already in the forum elsewhere, any of the porting topics I have found are very old.
I am trying to port this library: https://github.com/blues/note-arduino/tree/master
I have added the github folder note-arduino-master to my lib directory. This is my current file structure.
I have updated the name
variable in the library.properties file to match the library folder name note-arduino-master
.
Here is the library.properties file.
Typically I do a cloud compile and cloud flash. I am including the library like so in my .cpp file:
#include <Notecard.h>
What am i missing to get this to work.
Thanks.
What exactly is not working? What is the error you are getting?
And what is in the compile log? Does it show it uploading the files in the lib directory or only your source files?
1 Like
@StngBo, there is no need to change the library name in the library.properties file. What you do need to add after the typical include "Particle.h"
is include "Arduino.h"
to add the necessary Arduino environment "stuff" and for the code to compile.
I created a new Particle project in VSCode, copied the note-arduino-master code from github into a new lib directory and copied the code from Example1_NotecardBasics.ino
into the ino file created when I made the project. I then added the include "Arduino.h"
as indicated above, configured the project for a BSoM using DeviceOS 6.3.0 and compiled without error.
5 Likes
@peekay123
Thanks for that, I have got it to successfully compile, but still having issues using the code and just trying to troubleshoot.
Obviously you are unable to help with the troubleshooting of the devices, but did you have the error cannot open source file "Notecard.h" in your example project?
@StngBo, I don't get that error but I suggest you move the include to after the Particle.h
and Arduino.h
includes and test again.
1 Like