Show Posts
Pages: [1]
1  Using Arduino / Displays / Re: I2C LCD Display Problem (Only 16xSquares) on: February 04, 2013, 08:16:10 am
i realy dont know, if it is the right library
i bougth this one:
http://www.ebay.de/itm/221038737474?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649#ht_3016wt_1139
The seller send an image to me where is a example code in it.
at the top of the code this is written:
//YWROBOT
So i downloaded a library for YWROBOT.
Changed the adress to 0x3F in the example code and
uploaded it.
with the code i can turn on the lcd backlight
but i cant write with this code!?


What u mean with " get the original library"?
the original arduino lib?
2  Using Arduino / Displays / Re: I2C LCD Display Problem (Only 16xSquares) on: February 03, 2013, 07:27:01 pm
omfg...

my adress was wrong.
its not 0x20 or sth like in the example.
its 0x3F

now the display does something but not very much...
it only turns backlight on and instant off
nothing more happens
3  Using Arduino / Displays / Re: I2C LCD Display Problem (Only 16xSquares) on: February 03, 2013, 07:09:26 pm
yes this function is available

but is not written in the example
4  Using Arduino / Displays / Re: I2C LCD Display Problem (Only 16xSquares) on: February 03, 2013, 06:49:14 pm
why?
i just deleted the one with forum -fm
and replaced the other one with the code u wrote!?
what else u said to me?

sorry if i forgot something
im just getting crazy smiley-sad
5  Using Arduino / Displays / Re: I2C LCD Display Problem (Only 16xSquares) on: February 03, 2013, 06:41:18 pm
i changed it like u told me and nothing happened.
this is what i had and what i have now too:



usually the example should work!?
i think im doing something wrong!?
6  Using Arduino / Displays / Re: I2C LCD Display Problem (Only 16xSquares) on: February 03, 2013, 06:27:32 pm
i cant print anything.
only the backlight ist on... and the 16 squares
no matter what i upload nothing happens.
only 16 squares are shown.
and i dont want to show them...
i only want the hello world text there!
7  Using Arduino / Displays / I2C LCD Display Problem (Only 16xSquares) on: February 03, 2013, 06:16:43 pm
Hello,
I just bougth a 16x2 Display with sainsmart I2C adapter on the backside.
The original Library cant be used for this so i downloaded this one:
https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads
It is correctly shown in the Library Tab in the Arduino software.
I use a Arduino nano, where the I2C Pins are A4 and A5.
My connections are:
Vcc to 5V Arduino
Gnd to Gnc Arduino
SDA to A4
SDL to A5

If i turn the Arduino on, the displays backlight turn on and the first row of the display shows
16 Squares.
If i just try the Example in the Package (Tested other Packages already) it doesnt work.
I upload the sketch and nothing happens.... smiley-sad
The display only shows the 16 squares.

What im doing wrong?
How i get Text to this Display!?

im getting crazy

I hope someone can help me with this.

Examplecode:
Code:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>



#define BACKLIGHT_PIN     13

LiquidCrystal_I2C lcd(0x38);  // 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[i] );
   }

  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);
}
Pages: [1]