Getting error codes on my time-lapse camera slider sketch, need help please

Hello all,
I'm a brand new user to the forum. I apologize if this is the wrong place to post this, but here goes:

I am trying to build a time-lapse camera slider for my Nikon, using an Arduino Uno and various other hardware, including a stepper, motor driver, LCD screen, touchpad, etc. I am using a sketch written by a guy named David Hartkop, who is graciously helping me along. I have sent him this same request for help, but he sounds like a busy person, and I don't want to take up all his time.

I am working on building the hardware right now, but wanted to try the sketch on the Arduino before I hooked it all up. I am getting error codes when I try compiling and cannot upload this sketch to the board. I have tried different boards and get the same error codes, and have tried uploading a simple LED Blink sketch to the board without any problems. So far, I have only attached the Arduino Uno board to the computer to attempt to upload the sketch. No other hardware has been attached to the board while I try to upload.

Can anyone please help me by looking at this code and telling me where it's going wrong? It may be that I am not including the correct LiquidCrystal_I2C.h library, maybe one that needs updating?

I have attached the TimeLapseRail_v1.0.ino sketch.

I noticed in the software I downloaded for the project, there is no .cpp file with the .h file. Is that necessary, and possibly overlooked by the author?

And here are the error codes I am receiving:

_170802_TimeLapseRail_v1.0:59: error: no matching function for call to 'LiquidCrystal_I2C::LiquidCrystal_I2C(int, int, int, int, int, int, int, int)'
LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);
^
/Users/michaelterlouw/Desktop/TimeLapseRail-master/TimeLapseRail/Software/_170802_TimeLapseRail_v1.0/_170802_TimeLapseRail_v1.0.ino:59:81: note: candidates are:
In file included from /Users/michaelterlouw/Desktop/TimeLapseRail-master/TimeLapseRail/Software/_170802_TimeLapseRail_v1.0/_170802_TimeLapseRail_v1.0.ino:6:0:
/Users/michaelterlouw/Documents/Arduino/libraries/LiquidCrystal_I2C/LiquidCrystal_I2C.h:57:3: note: LiquidCrystal_I2C::LiquidCrystal_I2C(uint8_t, uint8_t, uint8_t)
LiquidCrystal_I2C(uint8_t lcd_Addr,uint8_t lcd_cols,uint8_t lcd_rows);

^
/Users/michaelterlouw/Documents/Arduino/libraries/LiquidCrystal_I2C/LiquidCrystal_I2C.h:57:3: note: candidate expects 3 arguments, 8 provided
/Users/michaelterlouw/Documents/Arduino/libraries/LiquidCrystal_I2C/LiquidCrystal_I2C.h:55:7: note: constexpr LiquidCrystal_I2C::LiquidCrystal_I2C(const LiquidCrystal_I2C&)
class LiquidCrystal_I2C : public Print {

^
/Users/michaelterlouw/Documents/Arduino/libraries/LiquidCrystal_I2C/LiquidCrystal_I2C.h:55:7: note: candidate expects 1 argument, 8 provided
/Users/michaelterlouw/Documents/Arduino/libraries/LiquidCrystal_I2C/LiquidCrystal_I2C.h:55:7: note: constexpr LiquidCrystal_I2C::LiquidCrystal_I2C(LiquidCrystal_I2C&&)
/Users/michaelterlouw/Documents/Arduino/libraries/LiquidCrystal_I2C/LiquidCrystal_I2C.h:55:7: note: candidate expects 1 argument, 8 provided
/Users/michaelterlouw/Desktop/TimeLapseRail-master/TimeLapseRail/Software/_170802_TimeLapseRail_v1.0/_170802_TimeLapseRail_v1.0.ino: In function 'void setup()':
_170802_TimeLapseRail_v1.0:437: error: 'class LiquidCrystal_I2C' has no member named 'setBacklightPin'
lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE); // Switch on the backlight
^
_170802_TimeLapseRail_v1.0:437: error: 'POSITIVE' was not declared in this scope
lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE); // Switch on the backlight
^
Multiple libraries were found for "LiquidCrystal_I2C.h"
Used: /Users/michaelterlouw/Documents/Arduino/libraries/LiquidCrystal_I2C
Not used: /Users/michaelterlouw/Documents/Arduino/libraries/jm_LiquidCrystal_I2C
exit status 1
no matching function for call to 'LiquidCrystal_I2C::LiquidCrystal_I2C(int, int, int, int, int, int, int, int)'

Any help is greatly appreciated. I want to make sure this sketch works correctly before spending any more money on hardware.

Thanks for any help anyone can give me.

Mike T

_170802_TimeLapseRail_v1.0.ino (23.5 KB)

There are different versions of the liquid crystal library. Unfortunately many have the same name. I think that you may have a different version of the liquid crystal library than the sketch was written for. You will need to figure out which library the sketch was written for and install it, after deleting the wrong one. Or replace the library with a different one. I prefer the HD44780 library for my LCDs. Features automatic address and pin map detection. It would be easy to replace the existing library with the HD44780 one.

Thank you, I will try the LiquidCrystal library that was included, if there was one. Will report back shortly

I edited my prior post while you were replying. You might want to look at the HD44780 library (link In my post). It really is a nice LCD library. The only things that need changing in the sketch are the #include and constructor (and maybe the begin).

Thank you, I will look at that in the morning. It's getting late and I'm tired.

I also had a thought: Since no hardware has yet been hooked up to the board, is it a possibility that the I2C address is incorrect, which is giving these errors? If so, I will try an I2C scanner and find the address of my LCD.

Thanks again, I appreciate the help.

Mike T

I think I may be getting closer, but now I'm having more trouble with another bit of code. I created two libraries with code downloaded from GitHub. One library is the LCDIO library, and the other is LCD. When I try to compile, I am getting a new error code:

Arduino: 1.8.0 (Mac OS X), Board: "Arduino/Genuino Uno"

In file included from /Users/michaelterlouw/Desktop/TimeLapseRail-master/TimeLapseRail/Software/_170802_TimeLapseRail_v1.0/_170802_TimeLapseRail_v1.0.ino:5:0:
LiquidCrystal_I2C.h:53: error: 't_backlighPol' has not been declared
LiquidCrystal_I2C (uint8_t lcd_Addr, uint8_t backlighPin, t_backlighPol pol);
^
LiquidCrystal_I2C.h:70: error: 't_backlighPol' has not been declared
uint8_t backlighPin, t_backlighPol pol);
^
LiquidCrystal_I2C.h:93: error: 't_backlighPol' has not been declared
uint8_t backlighPin, t_backlighPol pol);
^
LiquidCrystal_I2C.h:134: error: 't_backlighPol' has not been declared
void setBacklightPin ( uint8_t value, t_backlighPol pol );
^
/Users/michaelterlouw/Desktop/TimeLapseRail-master/TimeLapseRail/Software/_170802_TimeLapseRail_v1.0/_170802_TimeLapseRail_v1.0.ino: In function 'void setup()':
_170802_TimeLapseRail_v1.0:436: error: 'POSITIVE' was not declared in this scope
lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE); // Switch on the backlight
^
exit status 1
't_backlighPol' has not been declared

The library is the LCD library, written by Francisco Malpartida.

#ifndef LiquidCrystal_I2C_h
#define LiquidCrystal_I2C_h
#include <inttypes.h>
#include <Print.h>

#include "I2CIO.h"
#include "LCD.h"

class LiquidCrystal_I2C : public LCD
{
public:

/*!
@method
@abstract Class constructor.
@discussion Initializes class variables and defines the I2C address of the
LCD. The constructor does not initialize the LCD.

@param lcd_Addr[in] I2C address of the IO expansion module. For I2CLCDextraIO,
the address can be configured using the on board jumpers.
*/
LiquidCrystal_I2C (uint8_t lcd_Addr);
// Constructor with backlight control
LiquidCrystal_I2C (uint8_t lcd_Addr, uint8_t backlighPin, t_backlighPol pol);

/*!
@method
@abstract Class constructor.
@discussion Initializes class variables and defines the I2C address of the
LCD. The constructor does not initialize the LCD.

@param lcd_Addr[in] I2C address of the IO expansion module. For I2CLCDextraIO,
the address can be configured using the on board jumpers.
@param En[in] LCD En (Enable) pin connected to the IO extender module
@param Rw[in] LCD Rw (Read/write) pin connected to the IO extender module
@param Rs[in] LCD Rs (Reset) pin connected to the IO extender module
*/
LiquidCrystal_I2C( uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs);
// Constructor with backlight control
LiquidCrystal_I2C(uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs,
uint8_t backlighPin, t_backlighPol pol);

/*!
@method
@abstract Class constructor.
@discussion Initializes class variables and defines the I2C address of the
LCD. The constructor does not initialize the LCD.

@param lcd_Addr[in] I2C address of the IO expansion module. For I2CLCDextraIO,
the address can be configured using the on board jumpers.
@param En[in] LCD En (Enable) pin connected to the IO extender module
@param Rw[in] LCD Rw (Read/write) pin connected to the IO extender module
@param Rs[in] LCD Rs (Reset) pin connected to the IO extender module
@param d4[in] LCD data 0 pin map on IO extender module
@param d5[in] LCD data 1 pin map on IO extender module
@param d6[in] LCD data 2 pin map on IO extender module
@param d7[in] LCD data 3 pin map on IO extender module
/
LiquidCrystal_I2C(uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7 );
// Constructor with backlight control
LiquidCrystal_I2C(uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
uint8_t backlighPin, t_backlighPol pol);
/
!
@function
@abstract LCD initialization and associated HW.
@discussion Initializes the LCD to a given size (col, row). This methods
initializes the LCD, therefore, it MUST be called prior to using any other
method from this class or parent class.

The begin method can be overloaded if necessary to initialize any HW that
is implemented by a library and can't be done during construction, here
we use the Wire class.

@param cols[in] the number of columns that the display has
@param rows[in] the number of rows that the display has
@param charsize[in] size of the characters of the LCD: LCD_5x8DOTS or
LCD_5x10DOTS.
*/
virtual void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS);

/*!
@function
@abstract Send a particular value to the LCD.
@discussion Sends a particular value to the LCD for writing to the LCD or
as an LCD command.

Users should never call this method.

@param value[in] Value to send to the LCD.
@param mode[in] DATA - write to the LCD CGRAM, COMMAND - write a
command to the LCD.
*/
virtual void send(uint8_t value, uint8_t mode);

/*!
@function
@abstract Sets the pin to control the backlight.
@discussion Sets the pin in the device to control the backlight. This device
doesn't support dimming backlight capability.

@param 0: backlight off, 1..255: backlight on.
*/
void setBacklightPin ( uint8_t value, t_backlighPol pol );

/*!
@function
@abstract Switch-on/off the LCD backlight.
@discussion Switch-on/off the LCD backlight.
The setBacklightPin has to be called before setting the backlight for
this method to work. @see setBacklightPin.

@param value: backlight mode (HIGH|LOW)
*/
void setBacklight ( uint8_t value );

private:

/*!
@method
@abstract Initializes the LCD class
@discussion Initializes the LCD class and IO expansion module.
*/
int init();

/*!
@function
@abstract Initialises class private variables
@discussion This is the class single point for initialising private variables.

@param lcd_Addr[in] I2C address of the IO expansion module. For I2CLCDextraIO,
the address can be configured using the on board jumpers.
@param En[in] LCD En (Enable) pin connected to the IO extender module
@param Rw[in] LCD Rw (Read/write) pin connected to the IO extender module
@param Rs[in] LCD Rs (Reset) pin connected to the IO extender module
@param d4[in] LCD data 0 pin map on IO extender module
@param d5[in] LCD data 1 pin map on IO extender module
@param d6[in] LCD data 2 pin map on IO extender module
@param d7[in] LCD data 3 pin map on IO extender module
*/
void config (uint8_t lcd_Addr, uint8_t En, uint8_t Rw, uint8_t Rs,
uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7 );

/*!
@method
@abstract Writes an 4 bit value to the LCD.
@discussion Writes 4 bits (the least significant) to the LCD control data lines.
@param value[in] Value to write to the LCD
@param more[in] Value to distinguish between command and data.
COMMAND == command, DATA == data.
*/
void write4bits(uint8_t value, uint8_t mode);

/*!
@method
@abstract Pulse the LCD enable line (En).
@discussion Sends a pulse of 1 uS to the Enable pin to execute an command
or write operation.
*/
void pulseEnable(uint8_t);

uint8_t _Addr; // I2C Address of the IO expander
uint8_t _backlightPinMask; // Backlight IO pin mask
uint8_t _backlightStsMask; // Backlight status mask
I2CIO _i2cio; // I2CIO PCF8574* expansion module driver I2CLCDextraIO
uint8_t _En; // LCD expander word for enable pin
uint8_t _Rw; // LCD expander word for R/W pin
uint8_t _Rs; // LCD expander word for Register Select pin
uint8_t _data_pins[4]; // LCD data lines

};

#endif

Once again, any help is greatly appreciated. I wouldn't know what or how to declare what is throwing the errors.

Thank you,
Mike T