C Code - just a pointer..

The "Eleven" is our Uno-equivalent Arduino-compatible board, but with a number of improvements including prototyping area, a mini-USB connector, LEDs mounted near the edge, and the D13 LED isolated using a FET. [Product page]
Post Reply
vk3jap
Posts:1
Joined:Fri Jan 17, 2014 7:30 am
C Code - just a pointer..

Post by vk3jap » Fri Jan 17, 2014 7:47 am

Hi Guys,

Way New to Arduino.. but have written Shell, PERL, PYTHON, PHP, BASIC.. and played a fair bit with PICAXE - just because I've tinkered, doesn't meen I've mastered!

so I am real new to C, been playing seems ok. I have played with the sketch that just flashes D13, the one that allows me to talk to the DS3232 board etc - all good. So now I would like to just have a sketch that flashes D13 twice, reads the time in(non interactive to the console user) an does a serial print. So I am thinking, just take bits and pieces from the code I have been using, which I tried, but then I got compile errors about variables not being defined, labels unknown etc etc. I think what's confusing me is I don't know what is a C core statement, and what is a function from a .H file etc.

SO.. I went and opened up a .H file (DS3232RTC.h) and then RTC.H etc.. they're pretty full on. I guess what I'm thinking is I don't want to write a full set of code from the ground up, but these .H files - are they documented.. ie at a high level can a dummy like me look for a doco on RS3232RTC.h which tells me how to use it, what syntax to use and what to expect back etc..?

Appols for perhaps stupid question!

please tell me there are some people in the Australian time zone on here :-)

Ian
(Melbourne, AU)

jebz
Posts:33
Joined:Sun Feb 12, 2012 10:58 pm

Re: C Code - just a pointer..

Post by jebz » Fri Jan 17, 2014 10:39 pm

You need to put the RTC and DS3232 libraries in the Arduino libraries folder then restart the IDE. Then from the File menu open the examples menu and browse for your examples relating to hardware time devices. This will give you a good start.

andrew
Freetronics Staff
Freetronics Staff
Posts:978
Joined:Sun Jul 14, 2013 7:06 am
Location:Melbourne, Australia
Contact:

Re: C Code - just a pointer..

Post by andrew » Fri Jan 17, 2014 11:00 pm

vk3jap wrote:Hi Guys,

Way New to Arduino.. but have written Shell, PERL, PYTHON, PHP, BASIC.. and played a fair bit with PICAXE - just because I've tinkered, doesn't meen I've mastered!

so I am real new to C, been playing seems ok. I have played with the sketch that just flashes D13, the one that allows me to talk to the DS3232 board etc - all good. So now I would like to just have a sketch that flashes D13 twice, reads the time in(non interactive to the console user) an does a serial print. So I am thinking, just take bits and pieces from the code I have been using, which I tried, but then I got compile errors about variables not being defined, labels unknown etc etc. I think what's confusing me is I don't know what is a C core statement, and what is a function from a .H file etc.

SO.. I went and opened up a .H file (DS3232RTC.h) and then RTC.H etc.. they're pretty full on. I guess what I'm thinking is I don't want to write a full set of code from the ground up, but these .H files - are they documented.. ie at a high level can a dummy like me look for a doco on RS3232RTC.h which tells me how to use it, what syntax to use and what to expect back etc..?

Appols for perhaps stupid question!

please tell me there are some people in the Australian time zone on here :-)

Ian
(Melbourne, AU)
We have a DS3232 tutorial here:
http://www.freetronics.com/pages/rtc-re ... tart-guide

Post Reply