programming reference?

New members questions
Post Reply
fwadiver
Posts: 37
Joined: Fri Oct 19, 2012 9:00 am

programming reference?

Post by fwadiver »

Is there a programming reference somewhere that lists the function prototype calls and what they pass in and return? I know I can dig through the C code and pull them out that way but it seems like that would be something that should exist somewhere.
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: programming reference?

Post by binder »

fwadiver wrote:Is there a programming reference somewhere that lists the function prototype calls and what they pass in and return? I know I can dig through the C code and pull them out that way but it seems like that would be something that should exist somewhere.
Programming reference for the libraries on the controller? I believe there is a website compiled from the source code that shows the functions. Also, arduino has a master list of the core c/c++ functions that they support and in what libraries. http://arduino.cc/en/Reference/HomePage
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: programming reference?

Post by rimai »

Roberto.
fwadiver
Posts: 37
Joined: Fri Oct 19, 2012 9:00 am

Re: programming reference?

Post by fwadiver »

the doxygen link is not working for me, but that would be infinitly helpful :) manly struggling with dosing pump setup, want to basically run for 20 mins starting at 9am

edit: i also love how the arduino reference just glosses over pointers :-P reason i failed c++ the first 2 times i took it, that and the prof wouldnt let us use vectors....
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

programming reference?

Post by lnevo »

That's cause my power is out and that site runs in my basement
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: programming reference?

Post by binder »

fwadiver wrote:the doxygen link is not working for me, but that would be infinitly helpful :) manly struggling with dosing pump setup, want to basically run for 20 mins starting at 9am
If this is all you want, then here's what you need...well, there's actually 2 ways to do it:

Here is the function prototype:

Code: Select all

void DosingPump(byte DPRelay, byte DPTimer, byte OnHour, byte OnMinute, int RunTime);
If you hard code your dosing pump (start time and run time cannot be changed by the app), then you would do this:

Code: Select all

// Inside setup()
// run dosing pump for 20 minutes (1200 seconds) starting at 9am
ReefAngel.DosingPump(Port1, 1, 9, 0, 1200);
If you are using internal memory, you would set the OnHour, OnMinute and RunTime (in seconds), then use this:

Code: Select all

// Insidet setup()
// run dosing pump 1 based off of internal memory schedule
ReefAngel.DosingPump1(Port1);
It's that simple. I did have to look up what units RunTime needed to be in because I didn't remember.
Side note, you can always look at the code of the libraries for information. A lot of functions are commented as to how they work and what they do.
fwadiver
Posts: 37
Joined: Fri Oct 19, 2012 9:00 am

Re: programming reference?

Post by fwadiver »

Thanks Curt, if you are in northern indiana I owe you a beer. What memory locations are used for duration and start time? Is there a memory map somewhere or is the best thing to use for that the memory sketch?

If I ever get more free time at work I wanna play with trying to get the RA libraries to compile on a 32bit ARM.... then we will all be in real trouble :-P
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: programming reference?

Post by rimai »

:)
I think there is a port already...
Goggle has done it and released a 32bit ARM library with their ADK 2012
I didn't look much into it.
The main hardware features of the ADK are as follows:
•An ARM 32-bit Cortex M3 micro-processor
•Separate USB connections for an Android device and computer connection for programming and debugging
•Sensors for light, color, proximity, temperature, humidity, barometric pressure, and acceleration
•Micro SD Card slot
•Bluetooth support
They have a special Arduino IDE build for download somewhere... I can't find it now.
Roberto.
fwadiver
Posts: 37
Joined: Fri Oct 19, 2012 9:00 am

Re: programming reference?

Post by fwadiver »

yeah, i was looking at the teensyduino IDE for it, there are still some issues with bitwise operators (mainly shift) from going from the 8 bit to 32 bit, need to sit down with some proto hardware and try and build one. I'm thinking design a high end RA head unit with 32bit arm M4, built in wireless and larger display possible a nice crisp OLED
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: programming reference?

Post by rimai »

Awesome!!!
Roberto.
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: programming reference?

Post by binder »

fwadiver wrote:Thanks Curt, if you are in northern indiana I owe you a beer.
I'm in the middle of western indiana on the in/il border.
What memory locations are used for duration and start time? Is there a memory map somewhere or is the best thing to use for that the memory sketch?
The memory locations are in several different places. You can look either:
  • Inside ReefAngel.h, search for MEM_ and that will give you all the locations
  • Use the Java Status app and then under the memory settings, a list of the locations are there
  • Use the Android app and on the internal memory page, a list of the locations are there
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: programming reference?

Post by lnevo »

My web server is back online...
fwadiver
Posts: 37
Joined: Fri Oct 19, 2012 9:00 am

Re: programming reference?

Post by fwadiver »

now if someone could just make the arduino ide do the pull down selection for functions like visual studio does.....

:-D
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: programming reference?

Post by rimai »

Yeah.... That would be cool... :)
You can however use the VS2012 to code your stuff and it will do code completion thing just fine.
You can even upload right from VS.
The only thing it gets me is that it takes about 10seconds to open up, compared to Arduino that takes just a couple.
Roberto.
Post Reply