Pages: [1] 2   Go Down
Author Topic: Using the computer as data storage?  (Read 1441 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 285
Posts: 25623
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

"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.

0
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No i haven't.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 285
Posts: 25623
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: April 09, 2011, 03:53:54 pm by AWOL » Logged

"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.

France
Offline Offline
Sr. Member
****
Karma: 2
Posts: 380
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 285
Posts: 25623
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: April 10, 2011, 12:47:10 pm by AWOL » Logged

"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.

0
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

how do i calculate that out?
Logged

France
Offline Offline
Sr. Member
****
Karma: 2
Posts: 380
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 !
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok - What i really want to do is to display a video like But instead of a full LCD i want to display it on my GLCD display. Whats the best way of going on to this.
Logged

Pages: [1] 2   Go Up
Jump to: