Pages: [1]   Go Down
Author Topic: new here and have no clue  (Read 486 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone new to the arduino got one for xmas and have no clue to writing code and I'm 80yrs and have no desire to learn it. but because of working in electronics all my life my grandson thought it would be a good gift but I spend most of my time woodworking so here what I'm looking for is code to make a alarm clock the kit I got has a lcd display with 5 buttons that all use 1 pin as in put the lcd is not a i2c just a standard parallel lcd I did do the examples of hello world and the other LiquidCrystal examples have not played with button switches yet is there any one who can point me to some code for this thanks so much your friend noclue  
« Last Edit: December 28, 2012, 02:06:23 pm by noclue » Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 291
Posts: 25847
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There's the TimeAlarms library.
If you don't want to write your own code, do you want me to move this to "Gigs and collaborations"?
This section is really for people who have fairly specific programming questions.
At gigs, you may be able to find someone who lives nearby who can walk you through this.
« Last Edit: December 28, 2012, 01:53:48 pm by AWOL » Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm to old to be walked thru this stuff was just looking to see if any one already wrote some thing like this because I have a ds1307 that came with kit
Logged

Greenville, IL
Offline Offline
Edison Member
*
Karma: 15
Posts: 1328
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
button switches

One example is called button. This is another directly from the examples provided with the Arduino program called "Debounce".

It is a way to read a button being pressed. Another example is called button

Code:
/*
 Debounce
 
 Each time the input pin goes from LOW to HIGH (e.g. because of a push-button
 press), the output pin is toggled from LOW to HIGH or HIGH to LOW.  There's
 a minimum delay between toggles to debounce the circuit (i.e. to ignore
 noise). 
 
 The circuit:
 * LED attached from pin 13 to ground
 * pushbutton attached from pin 2 to +5V
 * 10K resistor attached from pin 2 to ground
 
 * Note: On most Arduino boards, there is already an LED on the board
 connected to pin 13, so you don't need any extra components for this example.
 
 
 created 21 November 2006
 by David A. Mellis
 modified 30 Aug 2011
 by Limor Fried
 
This example code is in the public domain.
 
 http://www.arduino.cc/en/Tutorial/Debounce
 */

// constants won't change. They're used here to
// set pin numbers:
const int buttonPin = 2;     // the number of the pushbutton pin
const int ledPin =  13;      // the number of the LED pin

// Variables will change:
int ledState = HIGH;         // the current state of the output pin
int buttonState;             // the current reading from the input pin
int lastButtonState = LOW;   // the previous reading from the input pin

// the following variables are long's because the time, measured in miliseconds,
// will quickly become a bigger number than can be stored in an int.
long lastDebounceTime = 0;  // the last time the output pin was toggled
long debounceDelay = 50;    // the debounce time; increase if the output flickers

void setup() {
  pinMode(buttonPin, INPUT);
  pinMode(ledPin, OUTPUT);
}

void loop() {
  // read the state of the switch into a local variable:
  int reading = digitalRead(buttonPin);

  // check to see if you just pressed the button
  // (i.e. the input went from LOW to HIGH),  and you've waited
  // long enough since the last press to ignore any noise: 

  // If the switch changed, due to noise or pressing:
  if (reading != lastButtonState) {
    // reset the debouncing timer
    lastDebounceTime = millis();
  }
 
  if ((millis() - lastDebounceTime) > debounceDelay) {
    // whatever the reading is at, it's been there for longer
    // than the debounce delay, so take it as the actual current state:
    buttonState = reading;
  }
 
  // set the LED using the state of the button:
  digitalWrite(ledPin, buttonState);

  // save the reading.  Next time through the loop,
  // it'll be the lastButtonState:
  lastButtonState = reading;
}
Logged


Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 291
Posts: 25847
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There's a thread here on that very subject, with posts from two other (ex) users with your IP address.
What are the chances of that?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Saskatchewan
Offline Offline
Sr. Member
****
Karma: 19
Posts: 362
When the going gets weird, the weird turn pro. - Hunter S. Thompson
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't think the OP was written by an 80 year old. The grammar doesn't really match. Most 80 year olds I know are apt to over punctuate, not ignore it entirely. Also, 80 year olds picking up something new are eager beavers when it comes to learning.

Coincidentally a good friend's dad (he's 80) is going to start playing with Arduinos. This was no surprise to me. The last words he'd ever say is that he didn't want to learn something new.

I think the OP is a sock puppet.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

that's not what I'm looking for not time alarms I want a alarm clock and after reading about ds1307 it has sram to store alarm data I found alarm clock that someone made but was using a i2c display and button switches used 1 pin for each switch and I don't have no clue as to how to make it work for me and now I can't find it again it was a video any one else seen this? and now I see that I need to download stuff and don't have internet at home  so not sure how I'll do that kinda wish my grandson never give it to me but I think the my kids are trying to get me out the woodshop because to first of december I cut my finger half off so now with this stuff I'm daze and confused maybe I should call the local schools and see if maybe there's someone there who can help thanks anyways people maybe in a few days I'll come back to the library and see if any one has posted to this
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Moderator edit: Insults deleted, user warned. (Nick Gammon)
« Last Edit: December 28, 2012, 04:10:52 pm by Nick Gammon » Logged

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12577
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm 80yrs and have no desire to learn it

Arduino is really targeted at people who view this sort of thing as a hobby, not people who want to have the working solution handed to them. If you just want an alarm clock, you would be far better just buying one. To attempt to build one yourself, with the attitude that you don't want to learn how to do it for yourself, is futile.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Pages: [1]   Go Up
Jump to: