One of the most frequent questions we get is about getting a serial LCD to work with an Arduino.  This week, we are going to take a look at a typical LCD, the backpack that is added to them to make them serial and then the most common problem people have with getting them to work.

We will also take a look at a 7 inch touchscreen running on an UUDO that is running android.

Below is the code for the I2C scanner.  If you are looking for the I2C library you can get it from our Github at: https://github.com/netnutmike/letsmakeit/tree/master/Libraries/i2cLCDZeobi

Downloads

HD Apple HD Apple SD Audio MP3

I2C Scanner Sketch

/*############################## I2C ADDRESS SCANNER ##############################
       
       This sketch will scan every address on an I2C bus and output what addresses
       are in use.
       
       I created this sketch because there are so many different I2C serial to 
       parallel boards for LCD displays and they use a wide variety of addresses.
       Most of these LCD displays and boards are very poorly documented and it
       is a guessing game on teh address they used.
       
       To use this sketch just plug in your I2C device to the I2C bus and run the
       sketch.  Every 5 seconds it will scan the bus and output to the serial
       port what it is seeing.
       
       If you are in need of an I2C LCD backback for your parallel LCD or want an
       LCD with a backback already on it, you can get one of ours by going to
       http://zeobi.com.  Our LCD backpacks come with a default address but you
       can easily change the address if you have a conflict with the default
       address.  Something that is unique to our LCD backpacks.
      
 
   From: Mike Myers (http://mikemyers.me)  @netnutmike
       Let's Make It Episode 71 (http://tech-zen.tv/index.php/shows/let-s-make-it/)
       
       http://tech-zen.tv
       
       For the sample code, show notes, contact information and many more 
       videos, visit the show page at http://tech-zen.tv/letsmakeit
       Please subscribe to our YouTube channel or our netcasts at any of 
       your favorite netcast / podcast outlets.
       We normally record Let's Make It live on Wednesday evenings around 
       7pm eastern. You can watch it live by going to tech-zen.tv and clicking 
       the live link at the top of the page.
       We also have a community setup for our viewers and listeners. You can 
       join the community by going to community.tech-zen.tv.
       We love input on what you would like to know or if you have an idea for 
       a new Let's Make it episode, you can contact us via email or phone at 
       the show information page.
################################################################################*/
#include <Wire.h>
void setup() {
  Serial.begin (9600);
 
  Serial.println();
  Serial.println ("I2C scanner.....");
  Serial.println();
  Serial.println();
  
 
  Wire.begin();
  
}  
void loop() {
  byte count = 0;
  
  Serial.println ("I2C scanner. Scanning ...");
  count=0;
  
  for (byte i = 1; i < 120; i++)
    {
      Wire.beginTransmission (i);
      if (Wire.endTransmission () == 0)
        {
        Serial.print ("Found device at address: ");
        Serial.print (i, DEC);
        Serial.print (" (0x");
        Serial.print (i, HEX);
        Serial.println (")");
        count++;
        } 
    } 
    
  Serial.println ("Done.");
  Serial.print ("Found ");
  Serial.print (count, DEC);
  Serial.println (" device(s).");
  Serial.println();
  Serial.println();
  Serial.println();
  delay(5000);
}