Show Posts
Pages: 1 [2] 3 4 ... 6
16  Using Arduino / Displays / Re: 1602 : problem of brightness ! Please Help Me ! on: September 12, 2013, 04:29:45 pm
Yes i changed the code to original and i pluged it as a shield on arduino and still no light :s
17  Using Arduino / Displays / Re: 1602 : problem of brightness ! Please Help Me ! on: September 12, 2013, 03:10:44 pm
Yes i did it !  smiley-roll-sweat
This is the code :
Code:
//Sample using LiquidCrystal library
#include <LiquidCrystal.h>
/*******************************************************
 * 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 >= 755) return btnNONE; // We make this the 1st option for speed reasons since it will be the most likely result
  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 < 755)  return btnSELECT;   
  return btnNONE;  // when all others fail, return this...
}
void setup()
{
  Serial.begin(9600);
  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;
   }
   }
}
I saw code contain pin 13 maybe i should activate it !
18  Using Arduino / Displays / Re: 1602 : problem of brightness ! Please Help Me ! on: September 12, 2013, 01:08:26 pm
Yes , with the variable resistance :p
19  Using Arduino / Displays / Re: 1602 : problem of brightness ! Please Help Me ! on: September 12, 2013, 12:07:11 pm
I pluged the shield on arduino ! But no changements :s
another solution ? maybe something is burned or broken :/
20  Using Arduino / Displays / Re: 1602 : problem of brightness ! Please Help Me ! on: September 12, 2013, 11:44:41 am
I just connected pins with female to male wires , i didn't plug the shield directly on leonardo .
And i don't know if i have back-light lit but i think yes :s

Any solution ? smiley-grin
21  Using Arduino / Displays / 1602 : problem of brightness ! Please Help Me ! on: September 12, 2013, 11:16:09 am
Hi ,i'm using arduino leonardo and i just bought this LCD shield from iteadstudio : http://www.robot-italy.com/en/1602-lcd-shield.html
It worked very well until i tried to change the code and pins from 4,5,6,7,8,9 to A0,A1,A2,A3,A4,A5 and try this analog output pins !
But when i connected pins i forgot to connect pin 5V to 5V and Gnd to Gnd but i did the opposite :'(
So the screen brightness has decreased very much !
And now i can't see message screen very well , but it's here , i see it when changing the message .

So i hope you can help me to increase the brightness smiley
PS : i have a variable resistance on shield , i modified it to increase brightness but it wasn't enough to see it well :s
and sorry for my bad english smiley-razz
22  Using Arduino / Project Guidance / LCD with Processing on: September 02, 2013, 06:13:00 am
Hi , i'm searching for a library to contorl my LCD 16x02 screen via processing.
I can control it very well via Arduino and LiquidCrystal library smiley So i need your help please .
PS : i searched for a library but i could not find it :s
23  Using Arduino / Programming Questions / Re: Little transformation :) on: August 31, 2013, 04:32:16 pm
Thank you all for help , the code works very well , no more problems of sending data , i'm working now on camera and the display part ! =)
24  Using Arduino / Programming Questions / Re: Little transformation :) on: August 27, 2013, 06:40:30 pm
so what is the apropriate code according to you ? =)
25  Using Arduino / Programming Questions / Re: Little transformation :) on: August 27, 2013, 05:27:02 pm
Sorry :s
I'm a little hasty :/
26  Using Arduino / Programming Questions / A solution for a little problem :) on: August 27, 2013, 04:09:20 pm
Hi , i'm using processing and i want find a solution for my problem :
I'm sending a byte wirelessly to control a car , i wana control it via keyBoard but i have a problem with "key" , when i touch 'z' it send 'z' every time until i touch another key , another problem , i can't send two or more keys instantly :/
This is the code :
Code:
byte a,b,c,d,e,f,g,h;
if (key == 'z' )       {a=1;}   else{a=0;}         // i need modifications over here :s
  if (key == 'd' )       {b=1;}   else{b=0;}   
  if (key == 'q' )       {c=1;}   else{c=0;}
  if (key == 's' )       {d=1;}   else{d=0;}
  if (keyCode == LEFT )    {e=1;}  else{e=0;}
  if (keyCode == RIGHT )  {f=1;}  else{f=0;}
  if (keyCode == UP ) {g=1;}  else{g=0;}
  if (keyCode == DOWN )  {h=1;} else{h=0;} 
 
  byte val = a;   
val |= b << 1;
val |= c << 2;
val |= d << 3;
val |= e << 4;
val |= f << 5;
val |= g << 6;
val |= h << 7;

  myPort.write(0xAA);  // sending first package
  myPort.write(val);     // sending the command
  myPort.write(0x55);  // sending the final package
  delay(100);
  val=0;           // initializing val
  key='O';        // i wana change it , i wrote it to initialize key , but it don't work very well

I hope you'll help me and sorry for bad english :s
27  Using Arduino / Programming Questions / Re: Little transformation :) on: August 27, 2013, 01:40:32 pm
I need a fonction like key which allow me to touch all keys and send the command because i can't send z,q,s,d,UP,DOWN,LEFT,RIGHT simultaneously :s
28  Using Arduino / Programming Questions / Re: Little transformation :) on: August 27, 2013, 01:35:56 pm
This is some explications : I'm controlling a wirless car via proceesing (keyboard and mouse) , everything work fine with arduino , i tried this code , work fine but i have a little problem with "key" .
Code:
byte a,b,c,d,e,f,g,h;
if (key == 'z' )       {a=1;}   else{a=0;}   
  if (key == 'd' )       {b=1;}   else{b=0;}   
  if (key == 'q' )       {c=1;}   else{c=0;}
  if (key == 's' )       {d=1;}   else{d=0;}
  if (keyCode == LEFT )    {e=1;}  else{e=0;}
  if (keyCode == RIGHT )  {f=1;}  else{f=0;}
  if (keyCode == UP ) {g=1;}  else{g=0;}
  if (keyCode == DOWN )  {h=1;} else{h=0;} 
 
  byte val = a;
val |= b << 1;
val |= c << 2;
val |= d << 3;
val |= e << 4;
val |= f << 5;
val |= g << 6;
val |= h << 7;

  myPort.write(0xAA);
  myPort.write(val);
  myPort.write(0x55);
  delay(100);
  val=0;
  key='O';
Some help ?
29  Using Arduino / Programming Questions / Re: Little transformation :) on: August 27, 2013, 09:52:31 am
Absolutly yes ! I'll try this code =) .
30  Using Arduino / Programming Questions / Little transformation :) on: August 27, 2013, 09:20:12 am
I need to transform this lines of arduino to processing !
Code:
bitWrite(commande,0,a);
  bitWrite(commande,1,b);
  bitWrite(commande,2,c);
  bitWrite(commande,3,d);
  bitWrite(commande,4,e);
  bitWrite(commande,5,f);
  bitWrite(commande,6,g);
  bitWrite(commande,7,h);
 
  Serial.write(0xAA); 
  Serial.write(commande);
  Serial.write(0x55);
Thx smiley
Pages: 1 [2] 3 4 ... 6