0

Complete newbie here. I'm really hoping to get something like this to work, and then learn from it. I have a generic UNO board and an LCD/CCS811 on order. I'm trying to do exactly this: (https://create.arduino.cc/projecthub/partsoven/air-quality-monitor-live-display-ad028a) but I'm receiving the following error upon compiling the code. I believe I have all the libraries installed, etc.. but for some reason, I can't get this sketch to upload.. sorry for the crap formatting on this, the {} never works for me and I can't space or indent past a certain point for some reason.... sorry for the long post.

Arduino: 1.8.1 (Windows 7), Board: "Arduino/Genuino Uno"

C:\Users\Guy\Documents\Arduino\sketch_jan25a\sketch_jan25a.ino:9:32: 
warning: invalid conversion from 'int' to 't_backlighPol' [-fpermissive]

LiquidCrystal_I2C lcd(0x3F,16,2);  // set the LCD address to 0x3F for a 16 chars and 2 line display

                                ^

 In file included from 
 C:\Users\Guy\Documents\Arduino\sketch_jan25a\sketch_jan25a.ino:5:0:
 C:\Users\Guy\Documents\Arduino\libraries\jm_LiquidCrystal_I2C/LiquidCrystal_I2C.h:55:2: note: initializing argument 3 of 'LiquidCrystal_I2C::LiquidCrystal_I2C(uint8_t, uint8_t, t_backlighPol)'

  LiquidCrystal_I2C (uint8_t lcd_Addr, uint8_t backlighPin, t_backlighPol pol);

  ^

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::available()'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::rxBufferLength'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::rxBufferIndex'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::read()'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::rxBuffer'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::peek()'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::flush()'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::onReceiveService(unsigned char*, int)'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::user_onReceive'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::onRequestService()'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::user_onRequest'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::txBufferIndex'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::txBufferLength'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::write(unsigned char const*, unsigned int)'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::transmitting'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::write(unsigned char)'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::txBuffer'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::TwoWire()'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::TwoWire()'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `Wire'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::begin()'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::begin(unsigned char)'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::begin(int)'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::end()'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::setClock(unsigned long)'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::beginTransmission(unsigned char)'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::txAddress'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::beginTransmission(int)'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::endTransmission(unsigned char)'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::requestFrom(unsigned char, unsigned char, unsigned long, unsigned char, unsigned char)'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::requestFrom(unsigned char, unsigned char, unsigned char)'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::requestFrom(unsigned char, unsigned char)'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::requestFrom(int, int)'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::requestFrom(int, int, int)'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::endTransmission()'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::onReceive(void (*)(int))'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\jm_Wire.cpp.o (symbol from plugin): In function `TwoWire::available()':

(.text+0x0): multiple definition of `TwoWire::onRequest(void (*)())'

libraries\Wire\Wire.cpp.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\utility\jm_twi.c.o (symbol from plugin): In function `twi_readFrom':

(.text+0x0): multiple definition of `twi_readFrom'

libraries\Wire\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\utility\jm_twi.c.o (symbol from plugin): In function `twi_readFrom':

(.text+0x0): multiple definition of `twi_writeTo'

libraries\Wire\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\utility\jm_twi.c.o (symbol from plugin): In function `twi_readFrom':

(.text+0x0): multiple definition of `twi_transmit'

libraries\Wire\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\utility\jm_twi.c.o (symbol from plugin): In function `twi_readFrom':

(.text+0x0): multiple definition of `twi_init'

libraries\Wire\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\utility\jm_twi.c.o (symbol from plugin): In function `twi_readFrom':

(.text+0x0): multiple definition of `twi_disable'

libraries\Wire\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\utility\jm_twi.c.o (symbol from plugin): In function `twi_readFrom':

(.text+0x0): multiple definition of `twi_setAddress'

libraries\Wire\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\utility\jm_twi.c.o (symbol from plugin): In function `twi_readFrom':

(.text+0x0): multiple definition of `twi_setFrequency'

libraries\Wire\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\utility\jm_twi.c.o (symbol from plugin): In function `twi_readFrom':

(.text+0x0): multiple definition of `twi_attachSlaveRxEvent'

libraries\Wire\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\utility\jm_twi.c.o (symbol from plugin): In function `twi_readFrom':

(.text+0x0): multiple definition of `twi_attachSlaveTxEvent'

libraries\Wire\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\utility\jm_twi.c.o (symbol from plugin): In function `twi_readFrom':

(.text+0x0): multiple definition of `twi_reply'

libraries\Wire\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\utility\jm_twi.c.o (symbol from plugin): In function `twi_readFrom':

(.text+0x0): multiple definition of `twi_stop'

libraries\Wire\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\utility\jm_twi.c.o (symbol from plugin): In function `twi_readFrom':

(.text+0x0): multiple definition of `twi_releaseBus'

libraries\Wire\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

libraries\jm_Wire\utility\jm_twi.c.o (symbol from plugin): In function `twi_readFrom':

(.text+0x0): multiple definition of `__vector_24'

libraries\Wire\utility\twi.c.o (symbol from plugin):(.text+0x0): first defined here

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

Below is the sketch I'm attempting to upload:

/*
 * Displays Sparkfun CCS811 data on a Serial enabled LCD sent over I2C.
 */
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>


#define I2C_ADDR 0x3F
LiquidCrystal_I2C lcd(0x3F,16,2);  // set the LCD address to 0x3F for a 16 chars and 2 line display

#include "SparkFunCCS811.h"

#define CCS811_ADDR 0x5B // CCS811 Default I2C Address
//#define CCS811_ADDR 0x5A //Alternate I2C Address

CCS811 mySensor(CCS811_ADDR);

void setup()
{
  lcd.init();                      // initialize the lcd 
  lcd.backlight();                //turn on backlight
  Serial.begin(9600);

}

void loop()
{
  //Check to see if data is ready with .dataAvailable()
  if (mySensor.dataAvailable())
  {
    //If so, have the sensor read and calculate the results.
    //Get them later
    mySensor.readAlgorithmResults();

  }

  delay(100); //Don't spam the I2C bus

    // clear the screen
    lcd.clear();
    // go to first row and send CO2 data to the display
    lcd.setCursor(0,0);
    lcd.print("CO2 [");
    lcd.print(mySensor.getCO2());
    lcd.print("] ppb");
      // go to second row and send tVOC data to the display
    lcd.setCursor(0,1);
    lcd.print("tVOC [");
    lcd.print(mySensor.getTVOC());
    lcd.print("] ppm");

}
  • The first error seems, as if the library wants another parameter type for it's constructor. For more help you should provide your code and the library you used for this (when not buildin of the Arduino IDE please provide a link) – chrisl Jan 26 '18 at 11:35
  • Your code compile OK with Arduino 1.8.5. – user31481 Jan 26 '18 at 14:07
  • This worked for you? I'll have to see what version of Arduino I'm running. – gfuller40 Jan 26 '18 at 15:26
0

I am assuming you are using this library, which is the only one I can find using that t_backlighPol datatype

You need to set the I2C address when you instantiate the object:

LiquidCrystal_I2C lcd(0x38);  // Set the LCD I2C address

And define the LCD size when you call the begin() function. Note that init() is a private function of the object:

lcd.begin(16,2);               // initialize the lcd 
| improve this answer | |
  • Thank you, Jose. I will change these two lines when I get home and see what happens! – gfuller40 Jan 26 '18 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.