<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="es">
	<id>https://fab.uy/index.php?action=history&amp;feed=atom&amp;title=LCD_Shield</id>
	<title>LCD Shield - Historial de revisiones</title>
	<link rel="self" type="application/atom+xml" href="https://fab.uy/index.php?action=history&amp;feed=atom&amp;title=LCD_Shield"/>
	<link rel="alternate" type="text/html" href="https://fab.uy/index.php?title=LCD_Shield&amp;action=history"/>
	<updated>2026-08-20T18:44:12Z</updated>
	<subtitle>Historial de revisiones de esta página en la wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://fab.uy/index.php?title=LCD_Shield&amp;diff=205&amp;oldid=prev</id>
		<title>Antonio: Página creada con «=Esquemático= &lt;gallery&gt; Lcdshieldschematic.jpg Esquema-LCD-shield.png &lt;/gallery&gt;  =Codigo= &lt;pre&gt; //Sample using LiquidCrystal library   #include &lt;LiquidCrystal.h&gt;   /*******************************************************    * 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 val…»</title>
		<link rel="alternate" type="text/html" href="https://fab.uy/index.php?title=LCD_Shield&amp;diff=205&amp;oldid=prev"/>
		<updated>2026-07-09T14:19:56Z</updated>

		<summary type="html">&lt;p&gt;Página creada con «=Esquemático= &amp;lt;gallery&amp;gt; Lcdshieldschematic.jpg Esquema-LCD-shield.png &amp;lt;/gallery&amp;gt;  =Codigo= &amp;lt;pre&amp;gt; //Sample using LiquidCrystal library   #include &amp;lt;LiquidCrystal.h&amp;gt;   &lt;span class=&quot;autocomment&quot;&gt;******************************************************    * This program will test the LCD panel and the buttons    * Mark Bramwell, July 2010    *******************************************************: &lt;/span&gt;  // select the pins used on the LCD panel   LiquidCrystal lcd(8, 9, 4, 5, 6, 7);  // define some val…»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Página nueva&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Esquemático=&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Lcdshieldschematic.jpg&lt;br /&gt;
Esquema-LCD-shield.png&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Codigo=&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//Sample using LiquidCrystal library  &lt;br /&gt;
#include &amp;lt;LiquidCrystal.h&amp;gt;  &lt;br /&gt;
/*******************************************************  &lt;br /&gt;
 * This program will test the LCD panel and the buttons  &lt;br /&gt;
 * Mark Bramwell, July 2010  &lt;br /&gt;
 ********************************************************/&lt;br /&gt;
&lt;br /&gt;
// select the pins used on the LCD panel  &lt;br /&gt;
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);&lt;br /&gt;
&lt;br /&gt;
// define some values used by the panel and buttons  &lt;br /&gt;
int lcd_key    = 0;  &lt;br /&gt;
int adc_key_in = 0;  &lt;br /&gt;
#define btnRIGHT  0  &lt;br /&gt;
#define btnUP     1  &lt;br /&gt;
#define btnDOWN   2  &lt;br /&gt;
#define btnLEFT   3  &lt;br /&gt;
#define btnSELECT 4  &lt;br /&gt;
#define btnNONE   5  &lt;br /&gt;
&lt;br /&gt;
// read the buttons  &lt;br /&gt;
int read_LCD_buttons()  &lt;br /&gt;
{  &lt;br /&gt;
  adc_key_in = analogRead(0);   // read the value from the sensor   &lt;br /&gt;
  // my buttons when read are centered at these valies: 0, 144, 329, 504, 741  &lt;br /&gt;
  // we add approx 50 to those values and check to see if we are close  &lt;br /&gt;
  if (adc_key_in &amp;gt; 1000) return btnNONE; // We make this the 1st option for speed reasons since it will be the most likely result  &lt;br /&gt;
  // For V1.1 us this threshold  &lt;br /&gt;
  if (adc_key_in &amp;lt; 50)  return btnRIGHT;   &lt;br /&gt;
  if (adc_key_in &amp;lt; 250) return btnUP;   &lt;br /&gt;
  if (adc_key_in &amp;lt; 450) return btnDOWN;   &lt;br /&gt;
  if (adc_key_in &amp;lt; 650) return btnLEFT;   &lt;br /&gt;
  if (adc_key_in &amp;lt; 850) return btnSELECT;   &lt;br /&gt;
  // For V1.0 comment the other threshold and use the one below:  &lt;br /&gt;
  /*  &lt;br /&gt;
   if (adc_key_in &amp;lt; 50)  return btnRIGHT;   &lt;br /&gt;
   if (adc_key_in &amp;lt; 195) return btnUP;   &lt;br /&gt;
   if (adc_key_in &amp;lt; 380) return btnDOWN;   &lt;br /&gt;
   if (adc_key_in &amp;lt; 555) return btnLEFT;   &lt;br /&gt;
   if (adc_key_in &amp;lt; 790) return btnSELECT;    &lt;br /&gt;
   */&lt;br /&gt;
  return btnNONE; // when all others fail, return this...  &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void setup()  &lt;br /&gt;
{  &lt;br /&gt;
  lcd.begin(16, 2);       // start the library  &lt;br /&gt;
  lcd.setCursor(0,0);  &lt;br /&gt;
  lcd.print(&amp;quot;Push the buttons&amp;quot;); // print a simple message  &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop()  &lt;br /&gt;
{  &lt;br /&gt;
  lcd.setCursor(9,1);      // move cursor to second line &amp;quot;1&amp;quot; and 9 spaces over  &lt;br /&gt;
  lcd.print(millis()/1000);   // display seconds elapsed since power-up  &lt;br /&gt;
  lcd.setCursor(0,1);      // move to the begining of the second line  &lt;br /&gt;
  lcd_key = read_LCD_buttons(); // read the buttons  &lt;br /&gt;
  switch (lcd_key)        // depending on which button was pushed, we perform an action  &lt;br /&gt;
  {  &lt;br /&gt;
  case btnRIGHT:  &lt;br /&gt;
    {  &lt;br /&gt;
      lcd.print(&amp;quot;RIGHT &amp;quot;);  &lt;br /&gt;
      break;  &lt;br /&gt;
    }  &lt;br /&gt;
  case btnLEFT:  &lt;br /&gt;
    {  &lt;br /&gt;
      lcd.print(&amp;quot;LEFT  &amp;quot;);  &lt;br /&gt;
      break;  &lt;br /&gt;
    }  &lt;br /&gt;
  case btnUP:  &lt;br /&gt;
    {  &lt;br /&gt;
      lcd.print(&amp;quot;UP  &amp;quot;);  &lt;br /&gt;
      break;  &lt;br /&gt;
    }  &lt;br /&gt;
  case btnDOWN:  &lt;br /&gt;
    {  &lt;br /&gt;
      lcd.print(&amp;quot;DOWN &amp;quot;);  &lt;br /&gt;
      break;  &lt;br /&gt;
    }  &lt;br /&gt;
  case btnSELECT:  &lt;br /&gt;
    {  &lt;br /&gt;
      lcd.print(&amp;quot;SELECT&amp;quot;);  &lt;br /&gt;
      break;  &lt;br /&gt;
    }  &lt;br /&gt;
  case btnNONE:  &lt;br /&gt;
    {  &lt;br /&gt;
      lcd.print(&amp;quot;NONE &amp;quot;);  &lt;br /&gt;
      break;  &lt;br /&gt;
    }  &lt;br /&gt;
  }  &lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Antonio</name></author>
	</entry>
</feed>