Hi - let me start by saying that I am a complete novice and besides basic LED and Servo controlling I have little to no knowledge about coding. I have spent the last 2 days trying to figure out what I know is basic code, but it doesn't seem to work.
I am making something that requires me to use a stepper motor (28BYJ-48). I want to be able to push one button and have the stepper motor turn X degrees CW and I want to push the other button and have it go the same degree but CCW. When nothing is pressed the motor does not move.
Currently i can get one button to work in a CW motion, but cannot get my second button working for CCW.
I am using a Mega2560 r3 at the moment but would like to use the code on a Nano also. Can anybody help me out? I'd appreciate it so much.... and you'd be saving me from losing anymore of my hair!!!
I would also like to know if anyone has any tips or best ways of learning ardunio?
Take a view into the example provided by the IDE for:
state change detection
BlinkWithOutDelay as base for timer functions
something that I´ve forgoten
Take a peace of paper, a pencil and design based on the IPO model a program structure plan.
Identify functions and their depencies. Now start with coding and testing, function by function.
At the end merge all tested function together to get the final sketch.
It's hard getting my head round this stuff... I'd love to do some sort of course. I know a lot of it comes down to hard work and persistence though.
I have actually just managed to solve the issue myself though!!! I am currently running around the room screaming.
I had previously tried to use "-stepsPerRevolution" but to not avail, but I've ended up changing it back and swapping the pole pins around on the arduino... and it's working brilliantly.