Go Down

Topic: clock on arduino (Read 4477 times) previous topic - next topic

ktnch

Feb 08, 2011, 01:42 pm Last Edit: Feb 08, 2011, 01:46 pm by ktnch Reason: 1
Need a little help, Trying to convert the code below for my controller, I have the arduino atmega 328 and this touch lcd http://www.nuelectronics.com/estore/index.php?main_page=product_info&cPath=1&products_id=18

With this data logging with rtc

http://www.nuelectronics.com/estore/index.php?main_page=product_info&cPath=7&products_id=20

Now can the arduino use the rtc of the data logger board or do i need a separate one


Any help will be great Thank you

Kev

How do i upload the code in its own box ? i have managed to attach the code that i need to modify though


Korman

The clock on the datalogger seems to be a pretty standard DS1302 module, which you should be able to access with the libraries included in the Time library. As long as you don't have conflics between your boards with used pins, all should be fine.

Korman

ktnch

Great stuff thank you, I got the two remain parts delivered but they sent the lcd for the larger version of the arduino board so have had to order another

kev

ktnch

#3
Feb 09, 2011, 01:26 pm Last Edit: Feb 09, 2011, 02:02 pm by ktnch Reason: 1
Need help as i am struggling a little, I am trying to merge the two sketches attached i have the sensor shield with the rtc built in and need the lighting code amended to use that rtc

Thank you

Kev


Korman

Look at the samples for the Time library how to use it with the RTC and get the current time. That will save you a lot of hassles. No need to reinvent the wheel every time.

Korman

ktnch

i am a complete newbie at this and at the min i am working blind

Terry King

Don't stay blind. Divide and conquer.

- Write a separate sketch for each major junction.  Fake input values if necessary.

- Put lots of intermediate results out to Serial Monitor.

- Get each subsystem to work first.

-Then review all the Constants, Variables, Libraries, subroutines for each subassembly and merge the stuff above SETUP on the simplest subassembly and make sure you can compile.

- Add the other code piece by piece, checking that you can compile OK

- Finally make the "real" data come from the "real" code and see if it works. Keep a lot of the Serial Monitor stuff working unless it messes up timing.

Slow down and make sure you understand each piece.

And Good Luck!

(Been There. Done That. Screwed It Up...)  :P
Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

ktnch

I have looked at the sketches and have not got a clue where to start think i need a 24/7 help line lol

Go Up