Show Posts
Pages: [1]
1  Forum 2005-2010 (read only) / Troubleshooting / Re: calendar on Arduino+ShieldLCDKeypad? on: August 11, 2010, 11:55:02 pm
hmm =/ wonder how to configure for the keypad button
2  Forum 2005-2010 (read only) / Troubleshooting / Re: calendar on Arduino+ShieldLCDKeypad? on: August 11, 2010, 11:29:40 am
thanks its working now  ;D, but i still confuse about the pin... is it fixed because of the LCDshield?
3  Forum 2005-2010 (read only) / Troubleshooting / Re: calendar on Arduino+ShieldLCDKeypad? on: August 01, 2010, 11:00:30 am
ok ... i only know few about the C language... but when i compare the LiquidLCD example and the one i using right now which was LCD4Bit_mod.. i found they are a lot of different... now i wanna know how to give a display on my lcd
4  Forum 2005-2010 (read only) / Troubleshooting / Re: calendar on Arduino+ShieldLCDKeypad? on: August 01, 2010, 10:06:02 am
ya... the lcd work with the example of lcd4bit_mod which use to test the button on the LCDkeypad, the lcd is exactly the one from this page,
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1206025987 except mine is from DFRobot no nuelectronic.

anyway... can the arduino dueminalove work without using an external  Ds1307 chip?
5  Forum 2005-2010 (read only) / Troubleshooting / Re: calendar on Arduino+ShieldLCDKeypad? on: August 01, 2010, 08:19:57 am
the connection.. since i just attach it on the board so i do not need to post the picture of it.. so far the coding for the date.. i include date.h and datestrings.h, the problem is i dunno how to make it display on the lcd =/ the code i use the one on the arduino.cc playground

Code:
#include <DateTime.h>
#include <DateTimeStrings.h>

#define TIME_MSG_LEN  11   // time sync to PC is HEADER and unix time_t as ten ascii digits
#define TIME_HEADER  255   // Header tag for serial time sync message

void setup(){
  Serial.begin(19200);
}

void  loop(){  
  getPCtime();   // try to get time sync from pc        
  if(DateTime.available()) { // update clocks if time has been synced
    unsigned long prevtime = DateTime.now();
    while( prevtime == DateTime.now() )  // wait for the second to rollover
      ;
    DateTime.available(); //refresh the Date and time properties
    digitalClockDisplay( );   // update digital clock

    // send our time to an app listening on the serial port
    Serial.print( TIME_HEADER,BYTE); // this is the header for the current time
    Serial.println(DateTime.now());      
  }
}

void getPCtime() {
  // if time available from serial port, sync the DateTime library
  while(Serial.available() >=  TIME_MSG_LEN ){  // time message
    if( Serial.read() == TIME_HEADER ) {        
      time_t pctime = 0;
      for(int i=0; i < TIME_MSG_LEN -1; i++){  
        char c= Serial.read();          
        if( c >= '0' && c <= '9')  
          pctime = (10 * pctime) + (c - '0') ; // convert digits to a number            
      }  
      DateTime.sync(pctime);   // Sync DateTime clock to the time received on the serial port
    }  
  }
}

void digitalClockDisplay(){
  // digital clock display of current time
  Serial.print(DateTime.Hour,DEC);  
  printDigits(DateTime.Minute);  
  printDigits(DateTime.Second);
  Serial.print(" ");
  Serial.print(DateTimeStrings.dayStr(DateTime.DayofWeek));
  Serial.print(" ");  
  Serial.print(DateTimeStrings.monthStr(DateTime.Month));  
  Serial.print(" ");
  Serial.println(DateTime.Day, DEC);  
}

void printDigits(byte digits){
  // utility function for digital clock display: prints colon and leading 0
  Serial.print(":");
  if(digits < 10)
    Serial.print('0');
  Serial.print(digits,DEC);  
}
6  Forum 2005-2010 (read only) / Troubleshooting / calendar on Arduino+ShieldLCDKeypad? on: July 30, 2010, 07:35:06 am
 ;)i wonder anyone can tell me how to do it?
7  Forum 2005-2010 (read only) / Syntax & Programs / error: ambiguates old declaration 'void setup()' on: July 29, 2010, 10:20:12 am
well... i just get started with arduino.. the tools i use is....
Hardware:Arduino duemilanove& Arduino LCD&KeyPad Shield
Software:arduino-0018 addon a libraries LCD4Bit
i was just using the example code... but come out a error.. and i dunno how to fix it ;D can any expert lend a hand?

============================================
#include <LCD4Bit.h>

LCD4Bit lcd = LCD4Bit_(2)

char msgs [5][15] = {"Right Key OK ",
                     "Up Key OK    ",
                     "Down Key OK  ",
                     "Left Key OK  ",
                     "Select Key OK  ",
int adc_key_val[5]  ={30, 150, 360, 535, 760  };

int NUM_KEYS  =  5;

int adc_key_in;

int key=-1;

int oldkey=-1;

int setup ()  {
  
  pinMode(13,OUTPUT);
  
  lcd.init();
  
  lcd.clear();
  
  lcd.printIn("KEYPAD testing... pressing");
}

void loop()

{
  adc_key_in = analogRead(0)
  digitalWrite(13, HIGH);
  key = get_key(adc_key_in);
        if (key != oldkey)
        {
          delay(50);
          adc_key_in = analogRead(0);
          key = get_key(adc_key_in);
          if (key != oldkey)
          {
            oldkey = key;
            if (key >=0){
              lcd.cursorTo(2, 0);
              lcd.printIn(msgs[key]);
            }
          }
        }
        digitalWrite(13,LOW);
}

{
  int k;
  for (k = 0; k< NUM_KEYS; k++)
  {
    if (input<adc_key_val[k])
    { return k;}
  }
  if (k >= NUM_KEYS)
      k= -1;
   return k;
}
============================================
error: new declaration 'int setup()'C:\Users\Demonx5\Desktop\Arduino Project\arduino-0018\hardware\arduino\cores\arduino/wiring.h:126: error: ambiguates old declaration 'void setup()'
============================================
                    
8  Forum 2005-2010 (read only) / Frequently-Asked Questions / Arduino Duemilanove + Arduino LCD shield.. PROBLEM on: July 29, 2010, 12:32:15 pm
just wonder... by using arduino lcd shield with keypad... which as a topping for the arduino board.. i notice that it already used all available slot on the board(i/p o/p)... so i wonder is there are any way that i can like... built an external i/p o/p? or... hmm expand it into a big board smiley-grin
9  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Arduino & Atmel? on: April 11, 2010, 11:05:11 am
a little school project which using intel 8051/ At89s52, RTC and Lcd screen to create a rtc based digital calender  =), schematic of Arduino which... you recommended
10  Forum 2005-2010 (read only) / Frequently-Asked Questions / Arduino & Atmel? on: April 11, 2010, 09:08:56 am
hmm i just wonder can i replace my Intel 8051/Atmel 89s52 with arduino? and hmm i would like to ask schematic for it =)
Pages: [1]