Community
cancel
Showing results for 
Search instead for 
Did you mean: 
AAndy1
New Contributor I
1,386 Views

DFRobot LCD with Galileo Gen 2

Hi,

There are a number of threads discussing LCD board connections. /message/323436# 323436 Some with success even when others thought there shouldn't be and /message/327731# 327731 others recommending new libraries.

Since I just got things working after cleaning up the libraries, I am a bit loathe to go down the library path willy-nilly.

The shield was part of a kit for the Galileo/Edison from DFRobot and it is version 1.1 of their 2 line LCD shield.

This is the code I am using to test with this line: LiquidCrystal lcd(8, 9, 4, 5, 6, 7) claimed to correct and reflects the description in the wedge for the shield.

Has the board been known to work and if so were any library/code/hardware modifications needed?

//Sample using LiquidCrystal library

# include

/*******************************************************

This program will test the LCD panel and the buttons

Mark Bramwell, July 2010

********************************************************/

// select the pins used on the LCD panel

LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

// define some values used by the panel and buttons

int lcd_key = 0;

int adc_key_in = 0;

# define btnRIGHT 0

# define btnUP 1

# define btnDOWN 2

# define btnLEFT 3

# define btnSELECT 4

# define btnNONE 5

// read the buttons

int read_LCD_buttons()

{

adc_key_in = analogRead(0); // read the value from the sensor

// my buttons when read are centered at these valies: 0, 144, 329, 504, 741

// we add approx 50 to those values and check to see if we are close

if (adc_key_in > 1000) return btnNONE; // We make this the 1st option for speed reasons since it will be the most likely result

// For V1.1 us this threshold

if (adc_key_in < 50) return btnRIGHT;

if (adc_key_in < 250) return btnUP;

if (adc_key_in < 450) return btnDOWN;

if (adc_key_in < 650) return btnLEFT;

if (adc_key_in < 850) return btnSELECT;

// For V1.0 comment the other threshold and use the one below:

/*

if (adc_key_in < 50) return btnRIGHT;

if (adc_key_in < 195) return btnUP;

if (adc_key_in < 380) return btnDOWN;

if (adc_key_in < 555) return btnLEFT;

if (adc_key_in < 790) return btnSELECT;

*/

return btnNONE; // when all others fail, return this...

}

void setup()

{

lcd.begin(16, 2); // start the library

lcd.setCursor(0,0);

lcd.print("Push the buttons"); // print a simple message

}

void loop()

{

lcd.setCursor(9,1); // move cursor to second line "1" and 9 spaces over

lcd.print(millis()/1000); // display seconds elapsed since power-up

lcd.setCursor(0,1); // move to the begining of the second line

lcd_key = read_LCD_buttons(); // read the buttons

switch (lcd_key) // depending on which button was pushed, we perform an action

{

case btnRIGHT:

{

lcd.print("RIGHT ");

break;

}

case btnLEFT:

{

lcd.print("LEFT ");

break;

}

case btnUP:

{

lcd.print("UP ");

break;

}

case btnDOWN:

{

lcd.print("DOWN ");

break;

}

case btnSELECT:

{

lcd.print("SELECT");

break;

}

case btnNONE:

{

lcd.print("NONE ");

break;

}

}

}

0 Kudos
7 Replies
idata
Community Manager
91 Views

Hi,

 

 

While using this code, are you receiving errors in the Arduino IDE?

 

Take a look at http://www.intel.com/content/dam/support/us/en/documents/Galileo-Edison_ShieldTestReport_330937-002.... http://www.intel.com/content/dam/support/us/en/documents/Galileo-Edison_ShieldTestReport_330937-002...., you will see all the shields that have been tested and the changes required to make them work in some cases.

 

You will see some information regarding the DFRobot* LCD, check it and let us know if it helps you.

 

 

Regards,

 

Charlie
AAndy1
New Contributor I
91 Views

I found the answer, but it raises an new question.

In the wiki doc for the part at the bottom of the page:

Q1. Why my LCD keypad cannot display anything on the http://www.dfrobot.com/index.php?route=product/product&product_id=1198&search=Intel%C2%AE+Edison+wit... .Vdr1ZHkViUk Intel Edison while all right on http://www.dfrobot.com/index.php?route=product/product&product_id=1198&search=Intel%C2%AE+Edison+wit... .Vdr1ZHkViUk Romeo?

A1: It works well if uploaded by Arduino 1.5.3 version, however, the latest 1.6.* have discard pin Definition for Edison. So you have to add pinMode(); into the setup() like this:

http://www.dfrobot.com/wiki/index.php/LCD_KeyPad_Shield_For_Arduino_SKU:_DFR0009 ?

1

2

3

4

5

6

7

void setup() {

for(int i=4;i<10;i++){</code>

pinMode(i,OUTPUT);

}

<p class="index4 line al...
FTinetti
Honored Contributor I
91 Views

mailto:hegedus@alum.mit.edu hegedus@alum.mit.edu wrote:

...

I am using the latest version directly from the Intel site version 1.6.0. I also note that when I start up the IDE it announces a version 1.6.8 and it looks like the base version 1.6.0 was released Feb 9, 2015. So the version is about a year behind. What is the long term plan for compatibility and staying current?

Hmmm... at least following the step-by-step guide at

https://software.intel.com/en-us/get-started-arduino-install https://software.intel.com/en-us/get-started-arduino-install

right now you would be installing version 1.6.8 from the Arduino page... or I'm missing something,

Fernando.

AAndy1
New Contributor I
91 Views

The page that links to the Arduino.cc site has a problem with the ethernet drivers. I was instructed to download direct from the Intel site and this http://www.intel.com/content/www/us/en/support/boards-and-kits/intel-galileo-boards/000005614.html page is showing version 1.6.0

FTinetti
Honored Contributor I
91 Views

Hmmm... I downoladed the Arduino IDE some time ago, so I have 1.6.7 working with no problems...

Maybe in the future I'll check... not enough time right now.

Fernando.

idata
Community Manager
91 Views

Hi guys,

 

 

The latest Arduino IDE is the 1.6.8 from: https://www.arduino.cc/en/Main/Software https://www.arduino.cc/en/Main/Software

 

Previous versions can be found here: https://www.arduino.cc/en/Main/OldSoftwareReleases# previous https://www.arduino.cc/en/Main/OldSoftwareReleases# previous

 

From the DowloadCenter you can download the 1.5.3 version: https://downloadcenter.intel.com/download/24782/Intel-Galileo-software-package-1-0-4 https://downloadcenter.intel.com/download/24782/Intel-Galileo-software-package-1-0-4

 

 

Try with this and let us know.

 

Regarding the long term plan of compatibility, I suggest you to ask Arduino due to they are the owners and builders of these IDEs.

 

 

Regards,

 

Charlie
idata
Community Manager
91 Views

Hi,

 

 

Have you been able to test your code with another Arduino IDE?

 

Let us know if you have been able to work on this.

 

 

Regards,

 

Charlie

 

Reply