Pages: [1]   Go Down
Author Topic: clock on arduino  (Read 4407 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 50
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


* krusduino_r14.pde (45.66 KB - downloaded 11 times.)
« Last Edit: February 08, 2011, 07:46:55 am by ktnch » Logged

Central Europe
Offline Offline
Edison Member
*
Karma: 7
Posts: 1220
Use the Source, Luke.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 50
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 50
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


* sensor and rtc.txt (3.45 KB - downloaded 17 times.)
* code to use.txt (10.64 KB - downloaded 14 times.)
« Last Edit: February 09, 2011, 08:02:17 am by ktnch » Logged

Central Europe
Offline Offline
Edison Member
*
Karma: 7
Posts: 1220
Use the Source, Luke.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 50
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Red Sea, Saudi Arabia
Offline Offline
God Member
*****
Karma: 12
Posts: 579
..On The Red Sea
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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...)  smiley-razz
Logged

Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 50
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: