Go Down

Topic: URGENT: Multi Dimensional Arrays with Arduino UNO (Read 2281 times) previous topic - next topic

Jazz

Hi all.. ;)
Im new to the Arduino Environment and I'am usin an Arduino Uno. I'am fluent with C++..and i was wondering if we could create multi-dimensional arrays.

I'am working on a project where I implementing an algorithm which requires me to create a 8x8 matrix.

A quick response would be appreciated!!!  :-/ :-/


Jazz

Cheers...will I have any complications using an 8x8 matrix..? I might need two 8x8s dats like 128 elements (int)

Coding Badly

#3
Oct 03, 2010, 09:17 am Last Edit: Oct 03, 2010, 09:17 am by bcook Reason: 1
Quote
Cheers

Back at ya!

sizeof(int) = 2
sizeof(MyMatrix) = 8 * 8 * 2 = 128 bytes

Number of MyMatrix = 2

Total memory for MyMatrix = 128 * 2 = 256 bytes

http://arduino.cc/en/Main/ArduinoBoardUno
SRAM 2 KB (ATmega328)

2048 - 256 = [glow]1792 bytes left for stack and data[/glow].


Go Up