Pages: [1]   Go Down
Author Topic: Reading a Script from Memory  (Read 1037 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello All,
I would like to use my arduino without my computer, something I have not done with the arduino as of yet.
This is my goal:
1) Power arduino + other devices
2) Arduino reads script from memory
3) Functions are performed

What hardware other than arduino do I need to accomplish this? And, how do I include this in my script?





Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8662
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

> 1) Power arduino + other devices

This can be done with a battery or a power supply that runs off house current.


> 2) Arduino reads script from memory

That's what a 'sketch' is: A script, in memory.


> 3) Functions are performed

That's what a sketch is:  A script, in memory, that performs functions.


> What hardware other than arduino do I need to accomplish this?   

The afore-mentioned battery or power supply.


> And, how do I include this in my script?

It's not clear what you mean by 'this'.  It will probably require programming.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

AWESOME!
What I meant by that last part is that if it was necessary to save the script on an external memory card, what would I need to include in my script in order to access the card. But I suppose that does not make any sense because I would have already had to of accessed the script in the first place. I just don't know much about the inner workings..

Really, Really helpful thank you.  smiley-grin
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8471
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The term "script" generally refers to ASCII human-readable text that is handled by an interpreter or compiler to produce code that the processor understands.

The "stuff" that's running on your Arduino is the result of this compiling, ie binary executable code not "script".

In that light you can store script on an SD card and have a program running on the Arduino that will read that script and interpret it, that's exactly what the Duinomite does and it allows you to use the board with no computer at all if you have a keyboard and a display.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
Newbie
*
Karma: 0
Posts: 15
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I may not have been totally clear. I'd like to write a script from my computer, send it to the arduino, then with the use of an external power supply have the arduino perform the functions from the script.

It sounds like the duinomite is used to write scripts when a computer is not accessible, which is not my case.

Therefore I need nothing more than my cute little arduino..

Is this all correct?
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8471
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That's correct, once the program is downloaded the Arduino runs by itself.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8662
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I may not have been totally clear.  I'd like to write a script from my computer, send it to the Arduino, then with the use of an external power supply have the Arduino perform the functions from the script.

This sounds remarkably like writing a sketch, uploading it to the FLASH memory of the Arduino, and executing it whenever the Arduino is provided power.  That's what an Arduino does.  Any Arduino will do that.  Provide power and it runs the last sketch you uploaded.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Pages: [1]   Go Up
Jump to: