Go Down

Topic: Using the computer as data storage? (Read 1 time) previous topic - next topic

ryanteck

Hi
i know i have asked this question before but im asking again,
how can i ( With a pre written code or a tutorial on how to write the code as i do not know how to code any processing language) use the computer as a storage device for my arduino so then it can read .H files produced by the GLCD bitmap converter off of the computer as i do not have enough money to buy a sd card shield.

Thank you Ryan

PaulS

Quote
how can i use the computer as a storage device for my arduino so then it can read .H files produced by the GLCD bitmap converter off of the computer

I'm wondering just which part of "You can't" you don't understand? The .h extension is for files that a compiler reads. Your Arduino does not have an operating system or compiler on it, and it can not build it's own programs.

As for reading the values in a .h file at run time, from a text file on the PC, again that is not possible.

The Arduino could send some data to an application running on the PC, informing it of the need for some data. The application on the PC could then stream data back to the Arduino, which would REPLACE data in an array previously allocated, as long as the new data streamed in fit in the existing array.

However, this requires an application on the PC that can receive data from the Arduino, and send data to the Arduino, which appears to be well beyond your skills at this time.

It also requires programming for the Arduino.

ryanteck

so even if i brought an sd card reader it would still not work?

AWOL

Quote
so even if i brought an sd card reader it would still not work?

That's a different question, but you still don't seem to have grasped the concept of .h files and compilation.
"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.


AWOL

#5
Apr 09, 2011, 10:29 pm Last Edit: Apr 09, 2011, 10:53 pm by AWOL Reason: 1
Re-read this thread:
http://arduino.cc/forum/index.php/topic,45865.msg332746.html#msg332746
particularly PaulS' reply #9, and come back to us with sensible questions.
Repeatedly asking the same question in the hope that eventually the answer you want to hear will come up is insane.
"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.

Grag38

If it is for reading bitmap datas or things like that you can perform it by serial port.

You would have to program an protocol and create another sotfware on the pc to send datas as many time the arduino asks for it.

Exemple :

Arduino to computer -> Give me data of picture 5 by Serial
Software on pc -> Ok I will send you XXX bytes of datas, the size is X*Y pixels
Arduino to computer -> Start sending me datas please
Software on pc -> Sending datas
Software on pc -> all is done
Arduino to computer -> ok Thanks.

So from, you must do this kind of softwares to drive it. But serial may be quit slow to do it.

ryanteck

Now it makes more sence,
The average video is 30-60 frames per second,
Il hunt on how to do it :)

PaulS

Quote
The average video is 30-60 frames per second

How many pixels per frame?
How many bytes of data per pixel?
The number of bytes per frame will tell you how frames you can send per unit of time.

It is unlikely that, at the highest baud rate, you can send 30 frames per second.

ryanteck

Each file is 5kb big and is the size of 128X64 pixels ( i converted it to this before converting into the .h Files it compiles with.

AWOL

#10
Apr 10, 2011, 07:43 pm Last Edit: Apr 10, 2011, 07:47 pm by AWOL Reason: 1
Quote
Each file is 5kb big and is the size of 128X64 pixels

And each pixel is how many bits?

Let us,for a moment, assume they are simply single bits.

128 x 64 is 8192 bits.
Times 30Hz is 245 760 bits per second.
Assuming a standard serial protocol overhead of two bits for every eight data bits (bare minimum, remember) you're going to have to manage well over 300 kbits per second.

This is simple arithmetic you could have done.
"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


Grag38

to calculate it it's easy :

w*h*b*f = total bytes to read/write

w = width of oneimage
h = height of one image
b = bits for one pixel (1 for black-white / 8 for 255 colors / 16 for 65534 / ...)
f = frames/secondes.

so from :

128*64*1*30 = 245760 bytes per secondes...

So from : ethernet or sdcard shoulb be better than using serial port !

PaulS

Quote
128*64*1*30 = 245760 bytes per secondes

Actually, that's bits per second, or 30720 bytes per second.

The 30720 bytes require 10 bits per byte to send. That's 307200 bits per second. With a maximum baud rate of 115200 bits per second, your absolute maximum frame rate for a black and white image is going to be 15 frames per second. For 8 bit color, plan on 2 frames per second. For full color, plan on doing something else.

ryanteck

Ok - What i really want to do is to display a video like http://www.youtube.com/watch?v=sNCqrylNY-0&feature=related But instead of a full LCD i want to display it on my GLCD display. Whats the best way of going on to this.

Go Up