jrdoner this is what came up;
HelloWorld_i2c:8: error: invalid conversion from 'int' to 't_backlighPol' [-fpermissive]
LiquidCrystal_I2C lcd(0x27,16,2); // Set the LCD I2C address
^
In file included from C:\Users\LINWOO~1\AppData\Local\Temp\arduino_modified_sketch_995266\HelloWorld_i2c.pde:2:0:
C:\Users\Linwood Corp Sales\Documents\Arduino\libraries\LiquidCrystal/LiquidCrystal_I2C.h:53:4: error: initializing argument 3 of 'LiquidCrystal_I2C::LiquidCrystal_I2C(uint8_t, uint8_t, t_backlighPol)' [-fpermissive]
LiquidCrystal_I2C (uint8_t lcd_Addr, uint8_t backlighPin, t_backlighPol pol);
^
exit status 1
invalid conversion from 'int' to 't_backlighPol' [-fpermissive]
even if my i2c board wouldnt work, shouldnt still compile?
Or do you think my i2c board is dead?
Or did i modify it incorrectly;
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#define BACKLIGHT_PIN 13
LiquidCrystal_I2C lcd(0x27,16,2); // Set the LCD I2C address
//LiquidCrystal_I2C lcd(0x38, BACKLIGHT_PIN, POSITIVE); // Set the LCD I2C address
// Creat a set of new characters
const uint8_t charBitmap[][8] = {
{ 0xc, 0x12, 0x12, 0xc, 0, 0, 0, 0 },
{ 0x6, 0x9, 0x9, 0x6, 0, 0, 0, 0 },
{ 0x0, 0x6, 0x9, 0x9, 0x6, 0, 0, 0x0 },
{ 0x0, 0xc, 0x12, 0x12, 0xc, 0, 0, 0x0 },
{ 0x0, 0x0, 0xc, 0x12, 0x12, 0xc, 0, 0x0 },
{ 0x0, 0x0, 0x6, 0x9, 0x9, 0x6, 0, 0x0 },
{ 0x0, 0x0, 0x0, 0x6, 0x9, 0x9, 0x6, 0x0 },
{ 0x0, 0x0, 0x0, 0xc, 0x12, 0x12, 0xc, 0x0 }
};
void setup()
{
int charBitmapSize = (sizeof(charBitmap ) / sizeof (charBitmap[0]));
// Switch on the backlight
pinMode ( BACKLIGHT_PIN, OUTPUT );
digitalWrite ( BACKLIGHT_PIN, HIGH );
lcd.begin(16,2); // initialize the lcd
for ( int i = 0; i < charBitmapSize; i++ )
{
lcd.createChar ( i, (uint8_t *)charBitmap );
- }*
- lcd.home (); // go home*
- lcd.print("Hello, ARDUINO "); *
- lcd.setCursor ( 0, 1 ); // go to the next line*
- lcd.print (" FORUM - fm ");*
- delay ( 1000 );*
}
void loop()
{
- lcd.home ();*
- // Do a little animation by writing to the same location*
- for ( int i = 0; i < 2; i++ )*
- {*
- for ( int j = 0; j < 16; j++ )*
- {*
- lcd.print (char(random(7)));*
- }*
- lcd.setCursor ( 0, 1 );*
- }*
- delay (200);*
}