Arduino Uno and ATMEL memory chip using SPI

Er, well, instead of:

byte hello [] = "something";

You need a pointer to byte, eg.

byte * hello = "something";

Now instead of using sizeof (which will just return 2, which is the size of the pointer) you use strlen, eg.

writeEEPROM (TESTADDRESS, hello, strlen (hello) + 1);

The "+ 1" is because you need the size of the string which is pointed to, plus 1 byte for the 0x00 which marks the end of the string.

It's hard to give more advice without seeing what you are trying to do. Pointers need to point to something, and that something needs to be allocated somewhere. And of course the address you are writing to is likely to change too.

If you are pulling in an analog variable (an int, I think) then you could do something like this:

int addr = 1000;

void loop ()
  {
  int reading = analogRead (1);  // read A1
  writeEEPROM (addr, (byte *) &reading, sizeof reading);
  addr += sizeof reading;
  }

The "&" operator takes the address of "reading" - in other words, a pointer - and thus you can write that. Then we increment the address by the number of bytes (2, I think) and then we are ready for the next reading. That is the general idea, anyway. The actual program is likely to be a bit more complex. For example, you somehow need to know how many readings you took. I think the EEPROM starts of with 0xFF in every byte, so you could read back the readings until you got 0xFFFF, in which case you know you came to the end of them.