setting up the Leonardo with 20x4 aith i2c adapter

I setup the cable and loaded a test program. The libraries in place. I get this error. I can't get past this.

The message I get is this..

Used: /home/ae4ml/Arduino/libraries/LiquidCrystal_I2C-1.1.2
exit status 1
'POSITIVE' was not declared in this scope

/*
  LCD Display with I2C Interface Demo
  lcd-i2c-demo.ino
  Use NewLiquidCrystal Library
  DroneBot Workshop 2018
  https://dronebotworkshop.com
*/

// Include Wire Library for I2C
#include <Wire.h>
// Include NewLiquidCrystal Library for I2C
#include <LiquidCrystal_I2C.h>

// Define LCD pinout
const int  en = 2, rw = 1, rs = 0, d4 = 4, d5 = 5, d6 = 6, d7 = 7, bl = 3;

// Define I2C Address - change if reqiuired
const int i2c_addr = 0x3F;

LiquidCrystal_I2C lcd(i2c_addr, en, rw, rs, d4, d5, d6, d7, bl, POSITIVE);

void setup()
{

  // Set display type as 20 char, 2 rows
  lcd.begin(20,2);
  
  // Print on first row
  lcd.setCursor(0,0);
  lcd.print("Hello world!");
  
  // Wait 1 second
  delay(1000);
  
  // Print on second row
  lcd.setCursor(0,1);
  lcd.print("How are you?");
  
  // Wait 8 seconds
  delay(8000);
  
  // Clear the display
  lcd.clear();

}


void loop()
{
  
  // Demo 1 - flash backlight
  lcd.setCursor(0,0);
  lcd.print("Backlight demo");
  lcd.setCursor(0,1);
  lcd.print("Flash 4 times");
  
  delay(3000);
  lcd.clear();
  
  // Flash backlight 4 times
  for(int i = 0; i< 4; i++)
    {
    lcd.backlight();
    delay(250);
    lcd.noBacklight();
    delay(250);
    }

  // Turn backlight back on
  lcd.backlight();
    
  // Demo 2 - scroll
  lcd.setCursor(0,0);
  lcd.print("Scroll demo - ");
  delay(1500);
  // set the display to automatically scroll:
  lcd.autoscroll();
  // print from 0 to 9:
  for (int thisChar = 0; thisChar < 10; thisChar++) {
    lcd.print(thisChar);
    delay(500);
    }
  // turn off automatic scrolling
  lcd.noAutoscroll();

  // clear screen 
  lcd.clear();
  
  //Delay
  delay(1000);

on linux you cannot have dashes ( and I'm not 100% sure on that one, numbers) in the path. remove them from your path. I've had the same issue recently.

Coulomb-d:
on linux you cannot have dashes ( and I'm not 100% sure on that one, numbers) in the path. remove them from your path. I've had the same issue recently.

Sounds like complete nonsense. :roll_eyes:

The problem is incompatibility of different "LiquidCrystal_I2C" libraries. :astonished: A problem for some time.

What is now considered the simplest way to deal with this problem, is to install Bill Perry's "HD44780" library in the IDE Library Manager, study the examples it provides - in this case, the I2C classes, and use that library to build your code rather than the older and confusing versions. :sunglasses:

Paul__B:
Sounds like complete nonsense. :roll_eyes:

Except that it is not. Installing an Arduino Library - SparkFun Learn

Note: Arduino does not allow library folders to contain symbols such as hyphens ‘ - ’. Arduino will throw an error upon starting up. If the library you are installing has a funky folder name then this step is the ideal time to clean it up.

I used a modified FastLED Library with a - and got the exact same error. I installed the Arduino IDE and just specified paths in the settings, so there's no initial error when importing a ZIP Library.

Coulomb-d:
Except that it is not. Installing an Arduino Library - SparkFun Learn

That's very outdated information. The prohibition against library folders containing dashes was removed years ago. With any modern version of the Arduino IDE, this is the official specification for the library folder names:

The library root folder name must start with a basic letter (A-Z or a-z) or number (0-9), followed by basic letters, numbers, spaces ( ), underscores (_), dots (.) and dashes (-). The maximum length is 63 characters.

Coulomb-d:
on linux you cannot have dashes

There's definitely nothing Linux-specific, except that Linux users tend to make the mistake of using "apt install arduino" to install the Arduino IDE, which gives you a version of the Arduino IDE that is over five years out of date.

Coulomb-d:
I used a modified FastLED Library with a - and got the exact same error.

You got the error "'POSITIVE' was not declared in this scope" from the FastLED library?

pert:
That's very outdated information. The prohibition against library folders containing dashes was removed years ago.

I thought it was nonsense! :sunglasses:

pert:
There's definitely nothing Linux-specific, except that Linux users tend to make the mistake of using "apt install arduino" to install the Arduino IDE, which gives you a version of the Arduino IDE that is over five years out of date.

As I well know. So why oh why can we not get the repos fixed? :roll_eyes: Who is failing their allotted task?

Paul__B:
So why oh why can we not get the repos fixed? :roll_eyes: Who is failing their allotted task?

My understanding was that this is where the situation is stuck:

A contributor made a good effort at fixing the licensing situation, but Arduino didn't follow through for two years. Finally, one of Arduino's developers did work on it, but by then the original contributor had gone AWOL, so it stalled out for another three years.

However, there was a recent change made also related to the Arduino IDE package for Debian:

That indicates there are issues other than licenses. It is progress though!

My impression is that the best thing at this point would be to just remove the package, since it does far more harm than good. It seems like the only long term solution would be for Arduino to get directly involved in resolving the problems as well as maintaining the package. However, the response I got to that proposal was that packages are traditionally managed by the community.

In short, No-One is responsible ... :roll_eyes:

pert:
except that Linux users tend to make the mistake of using "apt install arduino" to install the Arduino IDE, which gives you a version of the Arduino IDE that is over five years out of date.
You got the error "'POSITIVE' was not declared in this scope" from the FastLED library?

I stand corrected than. Because I installed it that way. Good to know.

Yes, I got this error message, not "POSITIVE" in my case it was "rainbowWithGlitter" was not declared in this scope, which was from the Demo100Reel . Here's the Reddit Post I made on /r/FastLED 10 days ago

I will update my Arduine IDE then asap, thanks and good to know

The outdated package really is a frequent cause of problems. Arduino IDE 1.0.5 (I believe that's the version still provided by the package manager) was good in its time, but a lot of development work has happened in the years since. You might have some pleasant surprises waiting for you once you update the IDE. Fortunately, we always have the current IDE available from the Downloads page of this website.