Hello all, I’m very new to arduino and am currently working on a linear positioning system using an arduino mega, as stepper motor and the accelstepper library. I am only able to get about 1000 pulses per second out of the mega due to the speed of the device. I just received my faster Due and it is capable of roughly 4000 pulses per second, so I’m planning on sticking with the Due. My machine has two buttons to adjust speed, one increases the speed by 1 and the other decreases the speed by 1. Currently I am storing the speed value using EEPROM so after a power cycle the speed will be at the last used value. My new Due does not have the ability to do EEPROM writes, so I’m looking for another method.
I have just attached an SD card reader to my Due and have successfully done read/write to a file. However due to the way arduino reads the text file I need to do some conversion to end up with the correct value (I believe this has something to do with ASCII).
Here is what i'm trying to do Save a variable or a set of variables as values to a text file on my SD card (or multiple text files, one per variable if that is easier) Perform power cycle Read values from SD card and assign them to variables Every time a variable changes, the value in the SD card would be overwritten.
Essentially I’m looking for a way to replace the standard EEPROM function with an SD card. Speed is the simplest of all the variables and will be in the form of 1 to 100. I also need position values to two decimal places.
Any help is greatly appreciated Thanks