compiling sequence trouble shooting of existing program with multiple sensors

I am a nooby but I did build a project and have tried to load the software and run it. I saw it on the internet and wanted to build it. It is a flight data display. I do not know if I can use his name or name of the project while asking for help.

I built the project and downloaded the sketch and librarys from the source maker. I have been trying to install the librarys but it fails to properly install. However I have found the main sketch and loaded it. It will compile and upload but not run the program and display any thing on the display. There are multiple warnings but nothing that says it will not run or cause an error and exit.

There are 12 includes of files .h and .ccp files at the top of the sketch. I am trying to read through the program but do not understand sequence of how the programs operate through the IDE compiler.

My first question is what sequence does the program go through when compiling and loading the program? Does it go through each of the includes in order that they are listed in the include list or does it go through the program and go to the includes when called by the main part of the program?

Second question If a sensor is bad or missing and provides no data will a sketch continue or just stall untill repaired?

Some of the errors say the pin numbers have been redefined in different places but are not used that I can find so far. The LCD library redefines pins that are not even connected and are getting warnings about it. The sketch still says it loads but it is not doing anythng to the display yet and it should make a page outline.

Any pointers or information would sure help to trouble shoot the sketch.

Please post a link to the place where you got the code you are trying to use.

Are you using the exact same hardware that the code was written for?

...R

Dontheone: My first question is what sequence does the program go through when compiling and loading the program? Does it go through each of the includes in order that they are listed in the include list or does it go through the program and go to the includes when called by the main part of the program?

The compiler does nothing with the .h files until is about to compile a .ino, .cpp, or .c file that has a "#include" line that names the .h file. Then it parses the .h file as it it were part of the code file it is compiling.

Dontheone: Second question If a sensor is bad or missing and provides no data will a sketch continue or just stall untill repaired?

It depends on how the hardware behaves and how the code was written. It could hang, return an out-of-range value to indicate an error, or return invalid data.

Dontheone: Any pointers or information would sure help to trouble shoot the sketch.

For now, don't worry too much about warnings. Look at every error, starting at the top. If you can figure out how to fix it, do that, but sometimes a "not defined in this scope" error means that an error further down prevented a function from compiling. After you fix each error, RE-COMPILE. No sense in trying to fix errors that were caused by cascade effects of errors that no longer exist.

Dontheone: I do not know if I can use his name or name of the project while asking for help.

People post stuff on the internet for other people to see. So you can post a link to the page that you found.

Ok I think by the answers that I can post the project in my questions. Project name is Experimental Aircraft Electronic Flight Information System. It was designed by Oleg ? in Australia to make a cheap EFIS for his own planes. I bought some of the stuff from him and have built the project. I have two sensors not installed yet that measure the angle of attack of the wing in flight and another same sensor. Not yet arrived. Number is for the display 192 x 64 daylight readable.

/code/ Experimental Avionics EFIS 19264 ver 1.0 Down load files are named EA_EFIS_19264_ver_1.0 and there is a 1.2 version which I am trying to use.

After all the boiler plate from the compile I get this warning. WARNING: Category '*' in library AmazonDRS is not valid. Setting to 'Uncategorized'

That is an Amazon single button order device. No clue where it comes form but not wanted.

Next warning is repeated 7 times and the only difference is the port number is changed by one the number at the bottom in parentices (54)

/code/ in file included from /home/don/Arduino/libraries/openGLCD/include/glcd_io.h:53:0, from /home/don/Arduino/libraries/openGLCD/include/glcd_Device.h:36, from /home/don/Arduino/libraries/openGLCD/include/gText.h:36, from /home/don/Arduino/libraries/openGLCD/include/glcd.h:41, from /home/don/Arduino/libraries/openGLCD/openGLCD.h:5, from /home/don/Arduino/EA_EFIS_19264_v12/EA_EFIS_19264_v12.ino:5: /home/don/Arduino/libraries/openGLCD/include/avrio.h:1615:0: warning: "PIN_A0" redefined

define PIN_A0 AVRIO_PIN(AVRIO_PORTA, 0)

^ In file included from /home/don/.arduino15/packages/arduino/hardware/avr/1.6.21/cores/arduino/Arduino.h:257:0, from /tmp/arduino_build_147629/sketch/EA_EFIS_19264_v12.ino.cpp:1: /home/don/.arduino15/packages/arduino/hardware/avr/1.6.21/variants/mega/pins_arduino.h:51:0: note: this is the location of the previous definition

define PIN_A0 (54)

^

Thank you all for responding. un oh had to cut off a lot at the end to post 9000 character limit

More info. I use Debian Jessie Linux. IDE version 1.8.5. Purged IDE and reloaded only other thing is the Adafruit playground. It remained after the reload. Down at the bottom it shows this and in the status box it shows done uploading. It shows the size and space which indicates to me it did load the program even with errors. Is that a correct assumption?

Also a reply, I do attack each error in sequence because I do understand cascade problems in programming. I am trying to figure out what the sequence is in this IDE and sketch as well. I was going by the errors in the list Hoping it was in sequence.

Using library Time at version 1.5 in folder: /home/don/Arduino/libraries/Time Using library EEPROM at version 2.0 in folder: /home/don/.arduino15/packages/arduino/hardware/avr/1.6.21/libraries/EEPROM Using library openGLCD in folder: /home/don/Arduino/libraries/openGLCD (legacy) Using library Wire at version 1.0 in folder: /home/don/.arduino15/packages/arduino/hardware/avr/1.6.21/libraries/Wire Using library Adafruit_BNO055 at version 1.1.3 in folder: /home/don/Arduino/libraries/Adafruit_BNO055 Using library Encoder at version 1.4.1 in folder: /home/don/Arduino/libraries/Encoder Using library SD at version 1.2.2 in folder: /home/don/Arduino/libraries/SD Using library SPI at version 1.0 in folder: /home/don/.arduino15/packages/arduino/hardware/avr/1.6.21/libraries/SPI Sketch uses 46034 bytes (18%) of program storage space. Maximum is 253952 bytes. Global variables use 2320 bytes (28%) of dynamic memory, leaving 5872 bytes for local variables. Maximum is 8192 bytes. Invalid library found in /home/don/Arduino/libraries/libraries: /home/don/Arduino/libraries/libraries Invalid library found in /home/don/Arduino/libraries/EA_EFIS_19264_v1: /home/don/Arduino/libraries/EA_EFIS_19264_v1 Invalid library found in /home/don/Arduino/libraries/EFIS19264V12: /home/don/Arduino/libraries/EFIS19264V12 Invalid library found in /home/don/Arduino/libraries/libraries: /home/don/Arduino/libraries/libraries Invalid library found in /home/don/Arduino/libraries/EA_EFIS_19264_v1: /home/don/Arduino/libraries/EA_EFIS_19264_v1 Invalid library found in /home/don/Arduino/libraries/EFIS19264V12: /home/don/Arduino/libraries/EFIS19264V12

Dontheone: Down at the bottom it shows this and in the status box it shows done uploading. It shows the size and space which indicates to me it did load the program even with errors. Is that a correct assumption?

If it gives you the memory statistics it means the compile completed without error. Possible some warnings, but no errors. The "done uploading" means that the sketch was successfully uploaded into your Arduino and should be running.

Dontheone: Invalid library found in /home/don/Arduino/libraries/EA_EFIS_19264_v1 Invalid library found in /home/don/Arduino/libraries/EFIS19264V12

The "Invalid library" messages usually mean that an out-of-date or incomplete library is in your 'Arduino/libraries' folder and it's not compatible with the version of the Arduino IDE you are using. Usually the best way to proceed is to delete the bad libraries and re-install a more recent version when you need them again.

Thanks for the answers. I was afraid you might say that and that means I need to really learn more to get the project to work. I bet I have compiled more times than I can count. I might have to separate the pieces and do them one at a time till I get a working sketch to use for each piece.

warning about AmazonDRS at the bottom of this when compiling

/home/don/Downloads/arduino-1.8.5/arduino-builder -dump-prefs -logger=machine -hardware /home/don/Downloads/arduino-1.8.5/hardware -hardware /home/don/.arduino15/packages -tools /home/don/Downloads/arduino-1.8.5/tools-builder -tools /home/don/Downloads/arduino-1.8.5/hardware/tools/avr -tools /home/don/.arduino15/packages -built-in-libraries /home/don/Downloads/arduino-1.8.5/libraries -libraries /home/don/Arduino/libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -vid-pid=0X2341_0X0042 -ide-version=10805 -build-path /tmp/arduino_build_147629 -warnings=all -build-cache /tmp/arduino_cache_454262 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/home/don/.arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2 -prefs=runtime.tools.avrdude.path=/home/don/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9 -prefs=runtime.tools.arduinoOTA.path=/home/don/.arduino15/packages/arduino/tools/arduinoOTA/1.1.1 -verbose /home/don/Arduino/EA_EFIS_19264_v12/EA_EFIS_19264_v12.ino
/home/don/Downloads/arduino-1.8.5/arduino-builder -compile -logger=machine -hardware /home/don/Downloads/arduino-1.8.5/hardware -hardware /home/don/.arduino15/packages -tools /home/don/Downloads/arduino-1.8.5/tools-builder -tools /home/don/Downloads/arduino-1.8.5/hardware/tools/avr -tools /home/don/.arduino15/packages -built-in-libraries /home/don/Downloads/arduino-1.8.5/libraries -libraries /home/don/Arduino/libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -vid-pid=0X2341_0X0042 -ide-version=10805 -build-path /tmp/arduino_build_147629 -warnings=all -build-cache /tmp/arduino_cache_454262 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/home/don/.arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2 -prefs=runtime.tools.avrdude.path=/home/don/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9 -prefs=runtime.tools.arduinoOTA.path=/home/don/.arduino15/packages/arduino/tools/arduinoOTA/1.1.1 -verbose /home/don/Arduino/EA_EFIS_19264_v12/EA_EFIS_19264_v12.ino
Using board ‘mega’ from platform in folder: /home/don/.arduino15/packages/arduino/hardware/avr/1.6.21
Using core ‘arduino’ from platform in folder: /home/don/.arduino15/packages/arduino/hardware/avr/1.6.21
WARNING: Category ‘*’ in library AmazonDRS is not valid. Setting to ‘Uncategorized’
Detecting libraries used…

in this last warning is AmazonDRS do you know what it is or where it is located and how to get rid of it?

Dontheone: Thanks for the answers. I was afraid you might say that and that means I need to really learn more to get the project to work. I bet I have compiled more times than I can count. I might have to separate the pieces and do them one at a time till I get a working sketch to use for each piece.

Developing each piece separately would be the usual way to start creating a complex project.

If your program compiles and uploads but does not work then the messages from the Arduino IDE are not going to help you solve the problem. It is perfectly possible to create an error-free and warning-free program that does not work.

It looks to me as if you have set the IDE to show full error messages. I suggest you turn that off as it is just confusing.

When a program compiles and uploads but does not do what you want the error is in the program code, not in the output from the compiler.

...R

Dontheone: warning about AmazonDRS at the bottom of this when compiling

WARNING: Category '*' in library AmazonDRS is not valid. Setting to 'Uncategorized' Detecting libraries used...

in this last warning is AmazonDRS do you know what it is or where it is located and how to get rid of it?

Located in "library.properties". Get rid of it by changing "*" to "Uncategorized".

I found the Amazon library and deleted it and now it is gone. yeahhhhhh.

I will hunt down the other libraries and try to fix them next.

I had been trying to get the serial print to work to the serial monitor. It was just causing errors whereever I would put it in but I finally got it put in in a place it did not complain so now I have it posting messages to the serial monitor and am going through the code to find out where it does not go right. I have found that it is not doing the display correctly so that will be next. Probably using the wrong display. It is turned on but no data display on it.

I have been advised that the code must be terribly corrupt by the number of errors so the person wanted me to delete the EFIS file and re download and install that file. I have done that several times and it gets no better. I will just start over again and try to get the pieces of the sketch to work one at a time. and return for the answer to errors I can not find explanation for. Thanks for the help so for. By the way I do have the display working some of the time and it seems to be with the code being corrupt some times. The resistor that controls the contrast needs to be adjusted when I do a different install too . Strange to me. I have tried to remove and purge all the IDE programs I have downloaded but keep finding remnants of the program from earlier versions. I am using 1.8.5 but find comments about 1.6.21 in the compiles. Is that a common thing?

I have a question on the versions of the programs like Wire.h, How do you determine which version of the files to use for each sensor? Example I am using the BNO055 sensor and it uses Wire.h and they seem to be having problems talking during the compile. I have heard of problems like this being wrong version incompatibility. How do I check on this?

I might have missed it in your earlier post, but I haven't seen a link to where you got the code from. You indicated

Project name is Experimental Aircraft Electronic Flight Information System. It was designed by Oleg ?

which makes it difficult to find. Post a link.

The wire library (for AVR boards like Uno and Mega) was last modified in 2012 (according to the text in the wire.h and wire.cpp files).

You can search your computer for those files; on my windows system (windows with IDE 1.8.5) they are in C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src.

yes I found them and they are updated in2012.

Oleg’s site is

ASI is air speed. AOA is angle of attack of the wing.

I located the version 1.2 software and schematics and have built the project. I did buy his boards to build the project. I used the MS5611 chip and the 7002 chips for the ASI and AOA. There is no software for the AOA yet. I also use the BNO055 chip.
These are the Error codes I get when I try to compile. I do not understand what is wrong with the code. Unless it is not updated to the 1.0 level programming. It looks correct to me. I have included
#include <Arduino.h>
at the top of the sketch also.

/code
/home/don/.arduino15/packages/arduino/hardware/avr/1.6.21/libraries/Wire/src/Wire.cpp:130:9: error: prototype for ‘uint8_t TwoWire::requestFrom(int, int)’ does not match any in class ‘TwoWire’
uint8_t TwoWire::requestFrom(int address, int quantity)
^
In file included from /home/don/.arduino15/packages/arduino/hardware/avr/1.6.21/libraries/Wire/src/Wire.cpp:29:0:
/home/don/.arduino15/packages/arduino/hardware/avr/1.6.21/libraries/Wire/src/Wire.h:65:13: error: candidates are: uint8_t TwoWire::requestFrom(int, int, int)
uint8_t requestFrom(int, int, int);
^
/home/don/.arduino15/packages/arduino/hardware/avr/1.6.21/libraries/Wire/src/Wire.h:64:9: error: int TwoWire::requestFrom(int, int)
int requestFrom(int, int);
^
/home/don/.arduino15/packages/arduino/hardware/avr/1.6.21/libraries/Wire/src/Wire.cpp:88:9: error: uint8_t TwoWire::requestFrom(uint8_t, uint8_t, uint32_t, uint8_t, uint8_t)

Code

I downloaded V1.2 and compiled it for a Mega. It failed on three libraries that I was missing and I copied those libraries from the libraries supplied with V1.2:
openGLCD
Adafruit_BNO055
Encoder

After that the code compiled although it threw plenty of warnings (not related to Wire).

I noticed that the I2Cdev library was also supplied with V1.2; did you do anything with that library? If so, what? I do not have that library installed (and did not copy it) and it might be the cause of your problem.

Can you check Wire.cpp for the presence of the following two functions

uint8_t TwoWire::requestFrom(uint8_t address, uint8_t quantity)
{
  return requestFrom((uint8_t)address, (uint8_t)quantity, (uint8_t)true);
}

uint8_t TwoWire::requestFrom(int address, int quantity)
{
  return requestFrom((uint8_t)address, (uint8_t)quantity, (uint8_t)true);
}

and Wire.h for the presence of

    uint8_t requestFrom(uint8_t, uint8_t);
    uint8_t requestFrom(int, int);

I suspect that the second function in Wire.cpp and the second line in Wire.h are missing.

I downloaded the project, again, and installed all of the included libraries. It compiled with no error but a LOT of warnings. Going into openGLDC/include/avrio.h and commenting out the pin defines fixes most of the warnings.

#else

/*   // ADD THIS LINE

#define PIN_A0	AVRIO_PIN(AVRIO_PORTA, 0)
#define PIN_A1	AVRIO_PIN(AVRIO_PORTA, 1)
#define PIN_A2	AVRIO_PIN(AVRIO_PORTA, 2)
#define PIN_A3	AVRIO_PIN(AVRIO_PORTA, 3)
#define PIN_A4	AVRIO_PIN(AVRIO_PORTA, 4)

...

#define PIN_L4	AVRIO_PIN(AVRIO_PORTL, 4)
#define PIN_L5	AVRIO_PIN(AVRIO_PORTL, 5)
#define PIN_L6	AVRIO_PIN(AVRIO_PORTL, 6)
#define PIN_L7	AVRIO_PIN(AVRIO_PORTL, 7)
*/   // ADD THIS LINE

#endif // end of teensy core pin check

Here are the remaining warnings:

In file included from /Users/john/Documents/Arduino/EA_EFIS_19264_v12/EA_EFIS_19264_v12.ino:4:0:
/Users/john/Library/Arduino15/packages/arduino/hardware/avr/1.6.21/libraries/EEPROM/src/EEPROM.h:43:30: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
     operator const uint8_t() const       { return **this; }
                              ^
/Users/john/Library/Arduino15/packages/arduino/hardware/avr/1.6.21/libraries/EEPROM/src/EEPROM.h:92:26: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
     operator const int() const          { return index; }
                          ^
In file included from /Users/john/Documents/Arduino/EA_EFIS_19264_v12/EA_EFIS_19264_v12.ino:9:0:
/Users/john/Documents/Arduino/libraries/Adafruit_Unified_Sensor/Adafruit_Sensor.h:146:37: warning: unused parameter 'enabled' [-Wunused-parameter]
   virtual void enableAutoRange(bool enabled) {};
                                     ^
/Users/john/Documents/Arduino/EA_EFIS_19264_v12/Airspeed.ino: In function 'void Airspeed()':
/Users/john/Documents/Arduino/EA_EFIS_19264_v12/Airspeed.ino:17:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if (millis() - AirspeedSensorValueTimer < BufferTimer) {
                                          ^
/Users/john/Documents/Arduino/EA_EFIS_19264_v12/Altimeter.ino: In function 'void Altimeter()':
/Users/john/Documents/Arduino/EA_EFIS_19264_v12/Altimeter.ino:73:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    if (millis() - AltitudeTimer > BufferTimer) {  //time to refresh the value of altitude on the screen
                                 ^
/Users/john/Documents/Arduino/EA_EFIS_19264_v12/Altimeter.ino:32:6: warning: unused variable 'status1' [-Wunused-variable]
 byte status1 = (a & 0xc0) >> 6;  // first 2 bits from first byte
      ^
/Users/john/Documents/Arduino/EA_EFIS_19264_v12/Altimeter.ino:36:5: warning: unused variable 'temperature_data' [-Wunused-variable]
 int temperature_data = ((c << 8) + (d & 0xe0)) >> 5;
     ^
/Users/john/Documents/Arduino/EA_EFIS_19264_v12/VSI.ino: In function 'void VSI()':
/Users/john/Documents/Arduino/EA_EFIS_19264_v12/VSI.ino:29:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (millis() - VSI_Timer > BufferTimer) {
                            ^
/Users/john/Documents/Arduino/libraries/openGLCD/gText.cpp:2394:27: warning: unused parameter 'c' [-Wunused-parameter]
 gText::CharHeight(uint8_t c)
                           ^
In file included from /Users/john/Documents/Arduino/libraries/Adafruit_BNO055/Adafruit_BNO055.h:30:0,
                 from /Users/john/Documents/Arduino/libraries/Adafruit_BNO055/Adafruit_BNO055.cpp:29:
/Users/john/Documents/Arduino/libraries/Adafruit_Unified_Sensor/Adafruit_Sensor.h:146:37: warning: unused parameter 'enabled' [-Wunused-parameter]
   virtual void enableAutoRange(bool enabled) {};
                                     ^
/Users/john/Documents/Arduino/libraries/SD/src/SD.cpp: In function 'open.constprop':
/Users/john/Documents/Arduino/libraries/SD/src/SD.cpp:456:12: warning: 'pathidx' may be used uninitialized in this function [-Wmaybe-uninitialized]
   filepath += pathidx;
            ^
/Users/john/Documents/Arduino/libraries/SD/src/SD.cpp:450:7: note: 'pathidx' was declared here
   int pathidx;
       ^
Sketch uses 46006 bytes (18%) of program storage space. Maximum is 253952 bytes.
Global variables use 2320 bytes (28%) of dynamic memory, leaving 5872 bytes for local variables. Maximum is 8192 bytes.