Compiling project

Hello all,

I am completly new to the Atom/Platformio enviroment.

And I have a problem with a project from git to compile it.

I am running this on W10

I have installed Atom + Platformio IDE
Also I have installed the command palette and Git(clone) plugin.

This is the project on git: GitHub - RobertFach/panobot: This is a panorama/gigapixel robotic machine

I can prefectly clone this project to my PC, once compiling it Im getting errors’s.
“Error 1” ???

Where can I find the error log?

Can you open a new terminal and execute pio run -v in it for verbose compilation? Also just to be sure you imported this subfolder as the PlatformIO project, right?

Hi,

Yes I have this subfolder imported as my project.

Running the command in terminal gives this at the end of the compile:

In file included from lib\ArduinoMenu library_ID1468\src/menuIO/encoderIn.h:18:0,
from src\panobot.cpp:36:
lib\PCINT r-site.net_ID1503\src/pcint.h:96:14: warning: ‘void PCint(uint8_t)’ declared ‘static’ but never defined [-Wunused-function]
static void PCint(uint8_t port);
^
*** [.pioenvs\megaatmega2560\src\panobot.cpp.o] Error 1

1 Like

Can you upload the full upload to pastebin.com? This warning shouldn’t be the actual error, it should be in panobot.cpp.

1 Like

Hi, Thanks for the reply and help :slight_smile:

I am new to pastebin, what do I have to upload? (what files)

Oh sorry, meant to say “upload log”. Execute pio run -v and upload that full text output

Ok, but where can I find the specific log file? what is it called?
Sorry for the noob questions.

When you execute it in the shell you can select all -> copy then paste. I’ve just downloaded the repo myself and see that the error is

from src\panobot.cpp:36:
lib\PCINT r-site.net_ID1503\src/pcint.h: At global scope:
lib\PCINT r-site.net_ID1503\src/pcint.h:55:128: error: narrowing conversion of '-1' from 'int' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]
const uint8_t pcintPinMap[3][8] PROGMEM={{53,52,51,50,10,11,12,13},{0,15,14,-1,-1,-1,-1,-1},{A8,A9,A10,A11,A12,A13,A14,A15}};
^
lib\PCINT r-site.net_ID1503\src/pcint.h:55:128: error: narrowing conversion of '-1' from 'int' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]
lib\PCINT r-site.net_ID1503\src/pcint.h:55:128: error: narrowing conversion of '-1' from 'int' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]
lib\PCINT r-site.net_ID1503\src/pcint.h:55:128: error: narrowing conversion of '-1' from 'int' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]
lib\PCINT r-site.net_ID1503\src/pcint.h:55:128: error: narrowing conversion of '-1' from 'int' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]

I.e. someone put a -1 in an array of unsigned 8-bit integers… I’ll see what fix makes sense, probably should be 255.

This is a known issue with the used “PCINT r-site.net” library, no A0 · Issue #4 · neu-rah/PCINT · GitHub.

Okay, go into the lib\PCINT r-site.net_ID1503\src folder. In the CPP file, change if (p==-1) to if (p==0xff). In the .H file, change every occurrence of -1 in that array to 0xff. Now it compiles.

3 Likes

It works! :stuck_out_tongue: now to see if the upload runs in the device.

And it works!

May I thank you sir…

2 Likes