Using PC, save data on default Arduino EEPROM?

Good afternoon

Once again here I am...
I found some info on internet about this issue... but about serial EEPROM...
I would like to know, if is possible by using PC, save data on default Arduino EEPROM?
Eg: Suppose that I have a windows application and want to use that friendly interface, instead using a LCD...

I'll appreciate your prompt help
Thanks on advance
Best regards
Pedro Ferrer

Hi Pedro.

I don't quite understand how you can use an EEPROM instead of an LCD ?

But if you have a program on the PC that can send data to Arduino, you can have a program on Arduino that stores it in the EEPROM.

But the EEPROM on Arduino is very limited.

Limited? He's got a whopping 1024 bytes to play with :slight_smile:

Of course, more can be added externally, examples in the playground

http://www.arduino.cc/playground/Main/InterfacingWithHardware#Storage

Good morning

I already communicate with Arduino... using MSComm1.Output on VB6...
The problem is when I try to receive info from Arduino using MSComm1_OnComm... appear me bad characters...

If MSComm1.CommEvent = comEvReceive Then
InString = InString & MSComm1.Input ' Read comm port data
End if

The arduino sends info to serial, as binary, hexadecimal, other??

Please let me know
Thanks on advance
Pedro Ferrer

It sounds like you want to have the arduino send data to a PC, and the data you are sending is coming from the EEPROM on the arduino.

If so, your arduino code is sending out using Serial.println or Serial.print, or something else?

Is any particular format used, such as:

Serial.println(Value); // print as an ASCII-encoded decimal
Serial.println(Value, DEC); // print as an ASCII-encoded decimal
Serial.println(Value, HEX); // print as an ASCII-encoded hexadecimal
Serial.println(Value, OCT); // print as an ASCII-encoded octal
Serial.println(Value, BIN); // print as an ASCII-encoded binary
Serial.println(Value, BYTE); // print as a raw byte value

Hello CrossRoads

Thanks by your reply.
I'm using :

Serial.print("U ARE THERE");

Best regards
Pedro Ferrer

Are your data rates set the same on both ends as well?

You have in within void setup()

Serial.begin(9600); // opens serial port, sets data rate to 9600 bps

(or one of these: 300, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, or 115200)

and the PC is set to the same speed?

I have made that mistake - opening the Serial Monitor port window and forgetting my code was set for 4800, while the window seems to like to open set for 9600, get some funny looking things on the screen that way.

Hello

I have on VB

' Fire Rx Event Every Two Bytes
MSComm1.RThreshold = 2
' When Inputting Data, Input 2 Bytes at a time
MSComm1.InputLen = 2
' 9600 Baud, No Parity, 8 Data Bits, 1 Stop Bit
MSComm1.Settings = "9600,N,8,1"
' Make sure DTR line is low to prevent Stamp reset
MSComm1.DTREnable = False
' Open COM2
MSComm1.CommPort = 2
MSComm1.PortOpen = True

and on Arduino

Serial.begin(9600);

about the bad characters, at the moment I'm at the office and can't reproduce them, but imagine a circle, with a line on top of the circle at 120ยบ...
"O" more less...

Thanks
Best regards
Pedro Ferrer

VB = visual basic?
My other thought was to see if there was the command similar to

to make sure you had a good starting point
and then

to make sure you are not reading before data actually came in.

The character you describe looks like what might come out if the incoming buffer was not cleared out first.

I'm requesting your help, because only at night I'll acceed to Arduino, and at night the time is always short...

Having:

//Par[0]=1;
//Par[1]=2;
//Par[2]=5;

int intPar;
char Par[2];

if (command == 'P'){
Par[0]=Serial.read();
Par[1]=Serial.read();
Par[2]=Serial.read();
intPar=atoi(Par);
Serial.print(intPar);
Serial.println();
}

I'll have 125 on intPar variable!?

Thanks on advance
Best regards
Pedro Ferrer

Good afternoon

I have a string class (String sText) and want to save it on EEPROM.
It happens that string class isn't accepted...

Explanation... I'm using String class to apply 'indexOf'

Which is the best way to do it?

Thanks on advance
Best regards
Pedro Ferrer

Hello

I've found this... it will work for my pourpose?

int strToInt(String str){
if(str.length() == 0) return 0;
int result = 0;

for(int i=0; i < str.length(); i++){
result = result + str - '0' * int(pow(10, str.length() - i - 1));

  • }*

  • return result;*
    }
    Thanks on advance
    Best regards
    Pedro Ferrer