This is my first post here. I wrote a program and it is interfacing with WIFI and Bluetooth.
Just the problem is that my program is not completely written i wanted to make few more additions but my UNO Storage Space is already 95% used.
Is there any UNO with more PROGRAM STORAGE SPACE.
It has Maximum is 32,256 bytes.
Should i move to MEGA? It has 256KB of storage space instead of 32KB of UNO.
But i dont need all these pin and i am very cramped for storage space (the wooden box is small) so i dont need a bigger ARDUINO.
I offer 1284P boards in several form factors: http://www.crossroadsfencing.com/BobuinoRev17/
This one is Uno size, and the USB can be onboard like this (this picture shows it in a socket, it lower when mounted direct to the board) or an offboar FTDI Basic can be used if embedded USB support is not needed for the project.
statbat:
it is interfacing with WIFI and Bluetooth.
Just the problem is that my program is not completely written
Should i move to MEGA?
In principle, I would normally and unhesitatingly say yes, get a Mega. But I have to wonder what sort of programme is it that takes so much resources but uses so little gear?
The resources problem with a Uno is usually manifested when you add peripherals. You can expect grief when you add a clock, sensors, SD card, display, trala trala, and hit the brick wall when you include the library. Bluetooth uses virtaually nothing. I'm not au fait with WiFi at all, but I'm sure plenty of users have WiFi on a Uno and have no problem.
Nick_Pyner:
In principle, I would normally say yes, get a Mega. But I have to wonder what sort of programme is it that takes so much resources but uses so little gear?
The resources problem with a Uno is usually manifested when you add peripherals. You can expect grief when you add a clock, sensors, SD card, display trala trala, and hit the brick wall when you include the library. Bluetooth uses virtaually nothing. I'm not au fait with WiFi at all, but I'm sure plenty of users have WiFi on a Uno and have no problem.
I am using LED display matrix panel, i am using bluetooth, i am using WIFI. Plus on top of that i am using my program which manipulates with with received data. I totally agree with you. I think i need to sit down with FRESH mind and try to see how i am optimize my code and decrease its space. Otherwise I will have no option but to look into ATMega 1284
Nick_Pyner:
In principle, I would normally and unhesitatingly say yes, get a Mega. But I have to wonder what sort of programme is it that takes so much resources but uses so little gear?
The resources problem with a Uno is usually manifested when you add peripherals. You can expect grief when you add a clock, sensors, SD card, display, trala trala, and hit the brick wall when you include the library. Bluetooth uses virtaually nothing. I'm not au fait with WiFi at all, but I'm sure plenty of users have WiFi on a Uno and have no problem.
I guess it depends on how the program is setup. I just wrote this the other night, on an UNO only because I'm most familiar with it (vs VC++ or any other PC language). The only thing attached to the UNO is a 6" wire in A1 to get a better randomseed(). The grid size cannot be expanded any more as it will crash due to low memory. There's probably more obvious ways to write it, but it was a proof of concept for myself. (Suggestions (in another thread) are welcome). It's a Conways Game of Life through the serial monitor.
template<class T> inline Print &operator <<(Print &obj, T arg)
{
obj.print(arg);
return obj;
}
const byte gmax = 29; // Grid size
byte ngrid[gmax][gmax]; //new grid
byte ogrid[gmax][gmax]; //old grid
int i;
int j;
int k;
int l;
int tk;
int tl;
int scr;
unsigned int iter ;
void setup()
{
iter = 1;
Serial.begin(115200);
randomSeed(analogRead(A1));
for (i = 0; i < gmax; i++)
{
for (j = 0; j < gmax; j++)
{
ogrid[i][j] = random(0, 2); // Randomly seed grid
if (ogrid[i][j] == 2)
{
ogrid[i][j] = 1;
}
if (ogrid[i][j])
{
Serial << "X ";
}
else
{
Serial << ". ";
}
}
Serial << "\n";
}
}
void loop()
{
if (iter > 1000)
{
reboot();
}
Serial << "Iteration: " << iter ;
iter++;
Serial << "\n \n \n"; //Space out Output and pause
delay(250);
for (i = 0; i < gmax; i++)
{
for (j = 0; j < gmax; j++) // Cycle through ogrid's cells
{
scr = 0; // Set score to 0
for (k = -1; k < 2; k++)
{
tk = k; // store K value in tempK
for (l = -1; l < 2; l++)// Cycle through cells bordering ogrid(i,j)
{
tl = l; //store L vale in tempL
if (k != 0 || l != 0) // Dont score cell(i,j), score all bordering cells
{
if (i + k < 0 || i + k > gmax - 1)
{
k = k * -(gmax - 1); // If k or l put the cell out of bounds, wrap around to other side of grid, forming a taurus
}
if (j + l < 0 || j + l > gmax - 1)
{
l = l * -(gmax - 1);
}
if (ogrid[i + k][j + l] == 1) // If bordering cell is live, increment score by one
{
scr++;
}
}
k = tk; // Return K & L to temp values in case of wraparound
l = tl;
}
}
//SCORING - Rules may be changed to other automata rules
if (scr == 2 && ogrid[i][j] == 1) // 2 neighbors and and live, stays lived
{
ngrid[i][j] = 1;
}
else if (scr == 3) // 3 nieghbors, Continue living or new birth
{
ngrid[i][j] = 1;
}
else
{
ngrid[i][j] = 0;
}
// END SCORING
}
}
for (i = 0; i < gmax; i++)
{
for (j = 0; j < gmax; j++)
{
ogrid[i][j] = ngrid[i][j];
if (ogrid[i][j])
{
Serial << "X ";
}
else
{
Serial << ". ";
}
}
Serial << "\n";
}
}
void reboot()
{
iter = 1;
for (i = 0; i < gmax; i++)
{
for (j = 0; j < gmax; j++)
{
ogrid[i][j] = random(0, 2); // Randomly seed grid
if (ogrid[i][j] == 2)
{
ogrid[i][j] = 1;
}
if (ogrid[i][j])
{
Serial << "X ";
}
else
{
Serial << ". ";
}
}
Serial << "\n";
}
}