Example sketch uses OneWire.h so I have installed
platformio lib search OneWire
platformio lib install 1
and now example is compaling on my local laptop but on RPI I still see an error
src/DS18x20_Temperature.cpp:2:21: fatal error: OneWire.h: No such file or directory
include OneWire.h
in addition after lib instalation I can see that lib in RPI under /home/pi/.platformio/lib - but because of some reason platformIO do not see that during compilation
output seems to be empty (but on my local machine also is empty and libs works)
pi@pi ~/.platformio/lib $ sudo platformio lib list
pi@pi ~/.platformio/lib $ pwd
/home/pi/.platformio/lib
pi@pi ~/.platformio/lib $ ll
total 16
drwxr-xr-x 2 root root 4096 Jun 26 11:06 ApplicationMonitor
drwx------ 3 pi pi 4096 Jun 26 11:57 Button_ID77
drwx------ 3 pi pi 4096 Jun 26 15:44 OneWire_ID1
drwx------ 4 pi pi 4096 Jun 26 11:05 U8glib_ID7
Why do you use sudo? PlatformIO uses HOME_DIR by default for the place where to install libs and packages. If you run with sudo, then the home directory is SUPER USER (not pi).
So I think that was also the reason of platformio run failure.
WIthout sudo I saw error like:
Error: Invalid value for “–project-dir” / “-d”: Directory “/home/pi/arduino/test2/platformio-examples-develop/atmelavr-and-arduino/arduino-external-libs” is not writable.
I have changed privileges and platformio run run well
Another question does that have to be installed in each new project ?
The platform ‘atmelavr’ has not been installed yet. Would you like to install it now? [y/N]: y