marzan
Senior Member
Hello everyone. I have been working on a project for years, and have changed the mechanical side of my idea several times, trying to get the simplest way of getting them working with the least amount of parts. I have gone back to the original idea of using stepper motors, because they are now so cheap and so are the drivers, thanks to 3d printers. I have written some code. some of it works, some of it dosen`t. I was hoping you could tell me where I have gone wrong.
When it is switched on for the first time, you have to press the white button to calibrate the height so the stepper knows where it is. This is where I want to send the calibrated value to non volatile memory (which dosen`t work). after setting the height it reverts back to the main program. I want to set an interrupt flag so that if the battery is disconnected for any reason and powers down the program sends the actual height value to NVM, and then sets off the fault light (all of which also dosent work)
I am using 20m`s, which I have quite a few of (yeah I know, use the m2`s) so I am also running out of code space. I was hoping to implement some sort of battery check setup with the 3 output pins which are connected to NPN transistors, but I have run out of room.
code in next post due to 1000 character limit.
Any ideas?
Thanks in advance
Marz.
When it is switched on for the first time, you have to press the white button to calibrate the height so the stepper knows where it is. This is where I want to send the calibrated value to non volatile memory (which dosen`t work). after setting the height it reverts back to the main program. I want to set an interrupt flag so that if the battery is disconnected for any reason and powers down the program sends the actual height value to NVM, and then sets off the fault light (all of which also dosent work)
I am using 20m`s, which I have quite a few of (yeah I know, use the m2`s) so I am also running out of code space. I was hoping to implement some sort of battery check setup with the 3 output pins which are connected to NPN transistors, but I have run out of room.
code in next post due to 1000 character limit.
Any ideas?
Thanks in advance
Marz.