Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Re: Using keypad to scroll. HELP PLEASE on: October 10, 2012, 08:01:36 am
oh sorry about the number of 'if's and brackets  used, i myself got confused sometimes. thank you for the help, i will try it tomorrow and let you know.
so are there any better ways to program this?
2  Using Arduino / Programming Questions / Re: Using keypad to scroll. HELP PLEASE on: October 10, 2012, 06:26:53 am
yeah I meant the LCD displaying different things, each time i press. But how do i do that with a '*' key rather than an external button?
3  Using Arduino / Programming Questions / Re: Using keypad to scroll. HELP PLEASE on: October 10, 2012, 01:02:19 am
That code is the one i used when i used an external button.
Code:
key = keypad.getKey();
 
  if (key == '*' )
  {
    {
      ds+=1;
    }
    if (ds >=4)
    {
      ds=1;
    }
    if(ds ==1){
    //write the stuffs required for page 1
    lcd.setCursor(0,0);
    lcd.print("HOME PAGE        ");
   
    lcd.setCursor(0,1);
    lcd.print("T/I= ");
    lcd.setCursor(6,1);
    lcd.print("NOT=  ");
    lcd.noBlink();
   
   
  }
  if (ds == 2){
    //write the stuffs required for page 2
    lcd.setCursor(0,0);
    lcd.print(" Set Interval:   ");
    lcd.setCursor(0,1);
    lcd.print("           ");
    lcd.setCursor(0,1);
    lcd.blink();
 }
  if (ds == 3){
    //write the stuffs required for page 3
    lcd.setCursor(0,0);
    lcd.print("Set No.of Times:");
    lcd.setCursor(0,1);
   
    lcd.print("          ");
    lcd.setCursor(0,1);
    lcd.blink();
  }
   
  }
this is the one i used to try the key '*'
but it just runs one cycle only, i can't scroll multiple times.
 
4  Using Arduino / Programming Questions / Using keypad to scroll. HELP PLEASE on: October 09, 2012, 08:04:10 am
hey i'm using a 16x2 LCD and 3x4 matrix keypad. I've programmed an external button to be pressed if i wanted to scroll through pages in my LCD. But is there a way that i can program, where i can use my keypad keys such as "#" or "*" to scroll through my pages? i tried several ways to use them but i can't. Any help would be greatly appreciated:) thanks in advance

Code:
void loop() {
  

  currentButton = debounce(lastButton);
  if (lastButton == LOW && currentButton == HIGH)
  {
    {
    ds += 1;
  }
  if (ds >= 4){
    ds=1;
  }
  if (ds == 1){
    //write the stuffs required for page 1
    lcd.setCursor(0,0);
    lcd.print("HOME PAGE        ");
    
    lcd.setCursor(0,1);
    lcd.print("T/I= ");
    lcd.setCursor(6,1);
    lcd.print("NOT=  ");
    lcd.noBlink();
    
    
  }
  if (ds == 2){
    //write the stuffs required for page 2
    lcd.setCursor(0,0);
    lcd.print(" Set Interval:   ");
    lcd.setCursor(0,1);
    lcd.print("           ");
    lcd.setCursor(0,1);
    lcd.blink();
 }
  if (ds == 3){
    //write the stuffs required for page 3
    lcd.setCursor(0,0);
    lcd.print("Set No.of Times:");
    lcd.setCursor(0,1);
  
    lcd.print("          ");
    lcd.setCursor(0,1);
    lcd.blink();
  }
    
  }
  lastButton = currentButton;
5  Using Arduino / Sensors / Help needed in installing EPIR Motion Sensor on: September 26, 2012, 09:31:38 pm
Hi Im a newbie to Arduino .Im using Arduino Mega ,I need to use this EPIR Motion Sensor  to detect motion and turn off a buzzer .I have problems in interfacing the EPIR Sensor as im not too sure about how to connect it to the hardware interfacing mode.need advice in its connection and some tutorial in programming it cos im still a noob in arduino.I also do not understand the conncetion and programme of the EPIR sensor created by DIgital jhonson.
Below are the links of EPIR sensor and The EPIR Library created by DIgital Jhonson:
1.Epir Motion Sensor
https://www.sparkfun.com/products/9587
2.EPir Library by Digital johnson (the download link is in the left hand corner)
http://code.google.com/p/epir-library-v1/downloads/list
6  Using Arduino / Project Guidance / Re: EPIR SENSOR to detect motion and turn off buzzer on: September 25, 2012, 04:01:25 am
Hello this is the link to the EPIR Motion Sensor
http://www.robot-r-us.com/sensor-motion/epir-motion-sensor.html
Here is the link for the digital johnson  epir library
http://code.google.com/p/epir-library-v1/
The EPIR Library download is on the bottom left hand corner of the link .
7  Using Arduino / Project Guidance / EPIR SENSOR to detect motion and turn off buzzer on: September 23, 2012, 10:09:19 pm
Hi everyone , I'm new to arduino and I mean Like  a real noob. My project requires me to use my epir sensor to detect motion and turn off a buzzer.but the think is i dont know how to use the epir sensor .i dont know how to connect it in hardware mode To my arduino mega.I have seen digital johnson epir library but i do not understand it .can someone pls teach me how to do so .im willing to learn not to just copy work blindly or wad so ever .pls help me thank you very much
8  Using Arduino / Programming Questions / Re: Tutorial for Keypad and LCD to Arduino MEGA on: September 20, 2012, 11:02:27 pm
I  can connect the key pad with arduino and i can connect the lcd with arduino separately but i cant seem to merge the link between the keypad and lcd together ,as my program required me to set some settings by  pressing buttons on the keypad and making the value appear on the lcd .
9  Using Arduino / Programming Questions / Re: Tutorial for Keypad and LCD to Arduino MEGA on: September 20, 2012, 03:39:01 am
Hi everyone ,I would like to rephrase my question Im asking for a example and how to connect  the LCD and Keypad together and then connect to Arduino Mega .I can find the library example of keypad and LCD separately but i need to connect them tgt so im not so sure .
10  Using Arduino / Programming Questions / Tutorial for Keypad and LCD to Arduino MEGA on: September 19, 2012, 01:55:10 am
Hi everyone, an arduino newbie over here. I have problem to get a library and tutorial to connect my keypad, LCD Display and arduino. Im using arduino Mega and a 12 button keypad .Could anyone please tell me the type or code of the keypad or any tutorial and library that I can use to connect the three things (Arduino, keypad and LCD display)? I have attached the links of the components below .Thank you .

KEYPAD
http://www.sgbotic.com/index.php?dispatch=products.view&product_id=77#
LCD
http://www.sgbotic.com/index.php?dispatch=products.view&product_id=279
Pages: [1]