I want a bigger CPU

Request new hardware or ideas for the controller
Post Reply
paulo.hanashiro
Posts: 18
Joined: Sat Mar 19, 2011 4:23 pm
Location: Sydne/Australia

I want a bigger CPU

Post by paulo.hanashiro »

I'd like to have more memory, in order to have more control over wifi instead of just monitor parameters and set ports. :twisted: :twisted: :twisted: :twisted:

But. In the meanwhile.... :mrgreen: :mrgreen: :mrgreen:


I'll try to setup an old nettop to host my web app and use the serial port to set reefangel parameters.
(i.e: change light period, change feeding mode timer, etc.)

Do anybody have a sample arduino program to read serial data and write it to eeprom?

Regards.
Paulo
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: I want a bigger CPU

Post by rimai »

I heard Curt had something already developed and Dave was in the process of getting that implemented in his client.
Maybe they have more to say.
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: I want a bigger CPU

Post by binder »

rimai wrote:I heard Curt had something already developed and Dave was in the process of getting that implemented in his client.
Maybe they have more to say.
In the latest dev libraries (0.8.5.13 and .14), there is the ability to read/write the internal memory values via the web interface. Look at the ReefAngel_Wifi.cpp file and the function processHTTP() for how that is handled.

There are a few more little changes / tweaks I'm making to the response for reading memory values that I have not released yet. The changes are to wrap the value read in an XML tag to make it easier for Dave to process in his client app. There may also be a few other minor changes (like addition of attributes) to the xml tag being sent back from the controller but this isn't confirmed yet.

Here's how the memory reading / writing works. Reading and writing the memory values from the controller are handled via the same commands, but distinguished by the length of the commands.

For the values that are BYTE values (single storage block), the commands are:
  • Read - /mbLOCATION
  • Write - /mbLOCATION,VALUE
For the values that are INT values (two storage blocks), the commands are:
  • Read - /miLOCATION
  • Write - /miLOCATION,VALUE
So a sample web request to read the BYTE value from memory location 800:

Code: Select all

GET /mb800 
Can't forget the space at the end of the request for it to work properly. So you can fire up the arduino serial monitor and issue that command and it will respond with the value.
A sample web request to write the BYTE value at memory location 800:

Code: Select all

GET /mb800,9 
This will write 9 to the memory location. Again, you need the space at the end.

The memory locations are stored in the ReefAngel_Globals.h file. The memory locations are prefixed with Mem_ followed by a B_ or I_ depending on if it is a BYTE or INT storage space (respectively). The last part of the names are easily identified for what they contain. Here is an example of a few:

#define VarsStart 800
#define Mem_B_MHOnHour VarsStart (800)
#define Mem_B_MHOnMinute VarsStart+1 (801)
#define Mem_B_MHOffHour VarsStart+2 (802)
#define Mem_B_MHOffMinute VarsStart+3 (803)
#define Mem_I_WM1Timer VarsStart+8 (808)

So as you can see, the names are pretty straight forward. The values start at 800 and go up. It should be pretty simple to determine the locations.

These locations are not going to change, if anything more will be added on. I will say that some future development ideas I have will also require additional storage than what is listed here. So some stuff may move to different locations in the future, but I will definitely point that out whenever it happens.

Having a serial program that reads/writes this should be pretty straight forward for you to do.
This is most likely the information that you are seeking.

curt
paulo.hanashiro
Posts: 18
Joined: Sat Mar 19, 2011 4:23 pm
Location: Sydne/Australia

Re: I want a bigger CPU

Post by paulo.hanashiro »

Awesome!!!

I need to restage my nettop in order to test this.

This way my nettop can run a complex web interface.

And RA will do only it's hard work of keep everything in my reef up and running as desired.


Thanks for your hard work doing this dev library for us Curt!!!

Regards.
Paulo Hanashiro

And the nettop can set the RA!!!
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: I want a bigger CPU

Post by binder »

paulo.hanashiro wrote:Awesome!!!

I need to restage my nettop in order to test this.

This way my nettop can run a complex web interface.
I'm curious to see what your complex interface looks like when you get it finished. So be sure to share this information with everybody. :D

And your welcome for working on the dev libraries. :ugeek:

curt
Post Reply