array size
Andy Wolff
Posts: 3
I am considering purchasing a prop development board for my iRobot Create.· I have been reading about the memory (cog ram, hub ram, eeprom, ect.) but I am still unsure about maximum variable size at runtime.· I need to create an environment map with my robot that is a 100 x 100 grid.· If each cell of the grid is a byte, then this array would take up 10kb.· Can I use an array at runtime that is this large?· The cog RAM is only 2kb.
I know that data can be stored in the EEPROM or hub RAM, but I am not sure if the cog RAM is always used when manipulating data.· The cog RAM would overflow quickly with a 2D grid of data.
·
I know that data can be stored in the EEPROM or hub RAM, but I am not sure if the cog RAM is always used when manipulating data.· The cog RAM would overflow quickly with a 2D grid of data.
·
Comments
You have in total:
Free Memory = COG RAM + HUB RAM - programa code.
cog ram is only used when writing in pasm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
Yes, you can store large amounts of data in EEPROM or on SD cards, but it's not the same as arrays in the HUB (shared) memory. There are routines available for reading and writing data from/to EEPROM and there are routines for reading and writing PC compatible files to an SD card, but it's like having files on a PC, you can't just declare an array as being on an EEPROM or SD card.
I have several programs that store tables on an EEPROM. One table is a dictionary of variable length names and associated data. You just have to be careful about writing repeatedly to the same location(s) since EEPROM can wear out after 100,000 or so writes to the same location.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
I think I understand now... even if I store an array in the EEPROM or external SD card, it will need to be loaded into HUB RAM before I can modify/read elements of the array. Is this correct?
Thank you all for your responses. This is a great forum!
you can get s lot of code in 22k so you may not need anything more.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
One thing though, the prop is well capable of doing what you want, I believe. I wouldn't let the 2k cog thing scare you away from what you want to do. All you'd need an eeprom or sd card for is for nonvolatile storage.