I would like to do some machine learning with sensors attached to my Arduino. I am looking at how I am going to store data and do some pretty complicated crunching. I have an ATMega2560 that I would like to use for the application. My real question is if there is any chance that I could allocate something like a 4000 element array and process that data in a timely manner with what I assume is a pretty measly processor.
I am looking at these two methods:
Store data in ATMega RAM and use its processor (more or less looking for confirmation this is stupid and won't work.)
Use a Bluetooth hardware module which communicates with a device (PC or iPhone) and allow that hardware to store the data in RAM, do the crunching, and provide feedback to the ATMega.
Sounds like some heavy processing. Not really Mega's strong suit. A 4000 element array would be ok if the data type is char or byte, but even int would be twice that large and take up too much space.
Maybe you should consider something with more grunt. Tell us more and we can suggest something suitable. Teensy 3.x is Arduino compatible. For more power still, maybe consider Raspberry Pi Zero, which is not Arduino compatible.
Yeah, my main hope is that I can use some sort of background program on another heavier computer to do the processing and just hand back the ATMega the important information it needs for making the circuit execute logically via Bluetooth. I have a number of Arduino sensors I have bought, so I'd shy away from getting into Rasperry Pi.
Do you think a Bluetooth interface would be feasible?
The Motorola 68000 processor 1979 ran at 1 MIPS at 8 Mhz in the year 1979 as compared to the Intel Core 2 X6800 processor which ran at 27,079 MIPS at 2.93 Ghz in 2006
Knock off the AVR's are slow crap!
Mark
PS You also need to look at the delay caused by moving data around.
I would like to do some machine learning with sensors attached to my Arduino. I am looking at how I am going to store data and do some pretty complicated crunching. I have an ATMega2560 that I would like to use for the application. My real question is if there is any chance that I could allocate something like a 4000 element array and process that data in a timely manner with what I assume is a pretty measly processor.
4000 elements of which type?
4000 elements of char, byte, int8_t or uint8_t would require 4000 bytes.
This will fit into the RAM of a MEGA2560
4000 elements of 'int' would require 8000 bytes
This will NOT fit into the RAM of a MEGA2560
If you need more storage area than the RAM of a MEGA260 provides, you could store data on SD card.
Read/write to/from SD card can exceed 100KB per second, when managing it the right way.
Also what means "process the data" and "timely manner"? Do you need to do a complicated algorithm with every member of the array every millisecond or do you need to find mean value once a day?