Go Down

Topic: Storing Data On Computer For Arduino To Read? (Read 2420 times) previous topic - next topic

ryanteck

Hi
I would like to know how to store data (.h files ) on my computer so the arduino can read them.

I can not get a external storage before you ask and i would prefer if you could just give me a code or like a tutorial not " Go and find out how yourself" or " try and code one yourself" as i do not have the time ( Full time education )

Thankyou
Ryan Walmsley

PaulS

I'll keep it really simple, then.

You can't.

The Arduino does not have access to your computer. Period.

You need something on your computer to send data to the Arduino. Sending .h files that need to be compiled to produce a hes file that needs to be uploaded to the Arduino won't work, either,

AWOL

#2
Jan 14, 2011, 06:35 pm Last Edit: Jan 14, 2011, 06:55 pm by AWOL Reason: 1
From your previous posts, you seem very hung-up on .h files, but you should know that the effort in programming the Arduino to parse ASCII header files far outstrips the benefits.
I suspect your grasp of the concept of compilation is quite tenuous.
Why don't you tell us what it is you are trying to achieve, not what you think you ought to do?
(full-time jobs)
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

ryanteck

when my glcd screen displays images it uses .h files to store the image code.
i want to store this image code on my computer

AWOL

Your glcd screen does no such thing.

I'll repeat, tell us what you want to do, not how you think you ought to do it.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

ryanteck

the bitmap converter stores the data in a .h file!
i need to store these for the arduino to read off the computer!

AWOL

#6
Jan 15, 2011, 07:20 pm Last Edit: Jan 15, 2011, 08:29 pm by AWOL Reason: 1
No you don't.
You need a simple Processing app to store the bitmaps in arrays, and then pass them to your Arduino.
Haven't you been paying attention?

Your .h files are not 'read' by the Aduino; they are compiled into the sketch.
Have you thought about using PROGMEM?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Barx

Ha ha, loving your replies to this AWOL. Vey funny. ;)

AWOL

They're not intended to be amusing.
These threads started before Christmas, and it feels like talking to a brick wall.

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

PaulS

Embedding the data in a .h file is convenient when the file is to be read by a compiler. The Arduino does not have a compiler on it.

The compiler extracts text from the header file, and converts that into values that it stores in memory locations. The linker then uses that data to create a hex file.

You don't have a linker on the Arduino, either.

The avrdude command then communicates with the Arduino, talking to to bootloader, to send the hex file to the Arduino. The bootloader stores the incoming serial data (the hex file) in flash memory.

The avrdude command does not run on the Arduino either.

So. the .h file has meaning only on the PC.

The data IN the header file, now, that is a different story.

You need to write some application on the PC that can extract that data, in the same way that the compiler does, and send it to the serial port.

Then, you need to modify the Arduino sketch that is running to be able to read that serial data, and store it somewhere/somehow.

You are limited as to how much data you can store in SRAM on the Arduino, which will limit how big a picture you can store. That's probably not too big an issue since there is a limit to how big a picture you can display anyway.

At your current level of understanding, this is too big a project for you to take on.

AWOL

You're limited also, by the speed you can transfer the data from the PC to the Arduino, as was pointed out before Christmas.

If you've got sufficient PROGMEM, then you're not quite so limited.

(thanks are due to PaulS for a very thorough and lucid explanation)
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Go Up