Default memory values

Do you have a question on how to do something.
Ask in here.
Post Reply
Jim_J
Posts: 13
Joined: Sat Jun 15, 2013 3:21 pm

Default memory values

Post by Jim_J »

Hi!

I currently don't have an wifi expansion (broken, waiting for new one). If i want to write default values for lets say the DCpump memory settings, how would i do that?

In the end I'm looking for to program a custom menu that lets me change the DCpump modes and speeds directly in the RA menu

Thanks
/Jim
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Default memory values

Post by binder »

Jim_J wrote:Hi!

I currently don't have an wifi expansion (broken, waiting for new one). If i want to write default values for lets say the DCpump memory settings, how would i do that?

In the end I'm looking for to program a custom menu that lets me change the DCpump modes and speeds directly in the RA menu

Thanks
/Jim
You have to connect your controller to your computer like you would to program it. Once it's connected, you need to open up the Serial monitor and then send the commands to the controller just like the apps do via the wifi interface.

You will issue the commands:

Code: Select all

// mode
GET /mb337,VALUE 

// speed
GET /mb338,VALUE  

// duration
GET /mb339,VALUE 
[code]
where value is the appropriate value. i forget what the values need to be. also note, you MUST include an extra space after the value, otherwise the command is not processed.
Jim_J
Posts: 13
Joined: Sat Jun 15, 2013 3:21 pm

Re: Default memory values

Post by Jim_J »

Great, thanks! Very useful :)

Whats the difference between mbx,y and mix,y?
Is there any list of all different memory allocations somewhere?
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Default memory values

Post by binder »

Jim_J wrote:Great, thanks! Very useful :)

Whats the difference between mbx,y and mix,y?
Is there any list of all different memory allocations somewhere?
mbx,y is for byte based locations
mix,y is for int based locations.

the bytes are for locations that only require a value from 0-255, such as on / off hours, etc.
the ints are for locations that need a value from 0-32768, such as feeding timer, etc.

the master list of the memory locations is stored in the Globals/Globals.h file. You will need to scroll down the file to locate the define statements. you can just do a search for VarsStart and that should take you to it. the memory locations all start with either Mem_B_ or Mem_I_ depending on the value that is stored at the location.
Jim_J
Posts: 13
Joined: Sat Jun 15, 2013 3:21 pm

Re: Default memory values

Post by Jim_J »

Thank you so much binder!

So this means that Mem_B holds a byte while Mem_I holds an int? think i start to get a grip about this now :)
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Default memory values

Post by binder »

Jim_J wrote:Thank you so much binder!

So this means that Mem_B holds a byte while Mem_I holds an int? think i start to get a grip about this now :)
Yep, you are correct. :)
Post Reply