then i want to make a file with that information were :
at adress 0x0 is writen F0
at adress 0x1 is writen 44
at adress 0x2 is withen 00
at adress 0x3 is withen 00
at adress 0x4 is wrinten 70
.
.
.
.
at adress 0x106 is writen 00
at adress 0x107 is writen F7
This site does what i want :
just paste the hex data there and outputs the file i want..
Put an "Ethernet shield" on your Arduino, load the Ethernet library example sketch "WebServer", and then you program a modified Arduino Webserver sketch that does the same job as the PHP script on the linked page.
i think is something like a HEXtoASCII ? may be not.. sorry
on a computer i could for example make a 264 bytes file then open in HEX editor and write the
HEX values in that list on addresses , how can a program on the IDE that ....
this image shows what i mean ( the hex is not the same as i posted ...)
ptmir:
Thanks Kent ! , but please can you comment the code so i can understand it ?
i will try it write now if i can.... get inside the logic
//USED TO send a char array (in stuff) as bytes
n is used to index through the array, 2 characters at a time until it gets to the end of the string */
for (int n=0; n< strlen(stuff); n+=2)
{
/*Read first character of current byte
if it's numeric we get it's actual value by deducting '0' from it's character code
if it's alpha we get it's actual value by deducting 'A' and adding 10 to it's character code */
byte thisbit= (stuff [n] <= '9' )? stuff[n] - '0':stuff[n] -'A' + 10;
//Multiply by 16 (because this was just the first character of the two
thisbit *=16;
//Now add on the value of the second character, using the same logic as the first to determine it's value
thisbit += (stuff[n+1] <= '9' )? stuff[n+1] - '0':stuff[n+1] -'A' + 10;
//write the byte to the file
file.write(thisbit);
}
ptmir:
the HEX data is made inside the arduino , then is writen to a file in SD card called data.txt
but what i want is not that data in the data.txt but rtather the output that the site a mention does .
also i can not use internet its a stand alone box . i must code what that site does...
any help ?
Ist this what you want:
You have written the data to a file on SD card, called "data.txt".
And now you want to read the data in from "data.txt" and then write the modiefied data back to SD card with another filename, let's name it "data.dat"?
// SAVE RANDOM SOUND TO FILE ???
//==================================
else if (buttonSaveRandS == LOW) { // INPUT_PULLUP ...
buttonSaveRandS=1;
// open the file. note that only one file can be open at a time,
// so you have to close this one before opening another.
File dataFile = SD.open("data.txt", FILE_WRITE);
// if the file is available, write to it:
if (dataFile) {