Is there a way for the Arduino to create and edit a text file? On the arduino codes i have found no way to. Basicaly im trying to make it so when the arduino recieves a pulse it edits a text file and puts down a tally mark for every pulse (ex. 11111111 for 8 pulses). So far im going to use Pulsein to count the pulses and my board is an original arduino mega.
Where is this file going to be stored? If you have an SD module/shield, then it's relatively straighforward.
Basicaly im trying to make it so when the arduino recieves a pulse it edits a text file and puts down a tally mark for every pulse (ex. 11111111 for 8 pulses). So far im going to use Pulsein to count the pulses
I doubt that. You make be using pulseIn to detect the pulse, but you aren't using it to count the pulses.
Why would you want to open a file and see that there was a varying number of ones in it? Wouldn't it be better to open the file and see something like 27 in it, rather than 111111111111111111111111111?
I doubt that. You make be using pulseIn to detect the pulse, but you aren't using it to count the pulses.
You're right, sorry for my puzzling post, im going to use Pulsein to detect the pulse and then use the text document to count the pulses.
Why would you want to open a file and see that there was a varying number of ones in it? Wouldn't it be better to open the file and see something like 27 in it, rather than 111111111111111111111111111?
Whatever is easier, i was planning to create a program to read the text file and count the 1's.
How fast are those pulses ? I don't have numbers at hand, but I guess dealing with a text file on a SD card is going to be "slow"...
How fast are those pulses ?
Probably around 0-20 per minute.
but I guess dealing with a text file on a SD card is going to be "slow"
Im trying to get the arduino to edit a txt file on an hdd through the computer.
Im trying to get the arduino to edit a txt file on an hdd through the computer.
In that case, all the Arduino will do is send data through serial. You'll need something running on the computer to do the file work.
Im trying to get the arduino to edit a txt file on an hdd through the computer.
That doesn't make sense IMHO. Make the Arduino output data through the serial port and write a program on the PC that reads that data and writes it into a file (possibly csv formatted, so you can easily graph it with Calc or Excel).