I would be extremely grateful if a similar tutorial could be written to drive a nema 17 stepper motor utilizing an Arduino uno R3 board,and an Adafruit stepper motor board.
Simple controls such as a 3 position switch for forward, stop and reverse, and a potentiometer to control speed.
What I would like to see is how each line of code is developed with an explanation of what each piece of code means along with the meaning of each character.
Once I have a piece of code, how do I get it into my computer and transfer it to the Arduino?
As you can tell, I know absolutely nothing about Aduino's or programming.
Hoping someone can throw some light on my short comings.
It looks straightforward: if you haven't looked at it, why not try now and see if it makes sense. Then ask specific questions about things that don't make sense to you.
Yes I have looked at the tutorial, but it doesn't describe what each program step does, nor how to get the program into my computer then into the Arduino.
Getting it into your Arduino's a matter of ctrl-c copying off the screen and ctrl-v pasting into the IDE, then upload.
Seems like you've not yet worked through the examples in the ide, which are also available here. I'm pretty sure that if you worked through some of those, the ada code would make a fair amount of sense and the forum will help with the missing bits.
You would then most likely be able to answer your own questions about switches for direction and a pot for speed.
You are talking to an absolute, total, novice. Reading other sketches means nothing to me. I need an example sketch to control a stepper motor with a line by line description of what each line/character means. I won't know what I'm doing otherwise.
Yep I get the novice bit, but I think the best way to become a not-a-novice, is to work through the examples that I linked to and which are in the ide in File > Examples.
Then, when you try to understand other code you'll have a fighting chance of figuring it out for yourself. Granted, right now a stepper sketch might make no sense, but it will make sense when you get your mind round some basic concepts.
Don't get me wrong: not refusing to assist, it's just that forum experience is that it's better to go it alone first, then ask for help on specifics. And going it alone, implies working through at least some of those examples.
You sent me a PM earlier today with a link to your other Thread - to which I replied that I was waiting for your response to advice I had given on 1 Nov - the same day you started the other Thread.
Now I find you have started a new Thread (quite unnecessarily) asking for advice which I had already given in the other Thread. I still don't know if you read it.
OK - that advice may not cover all of your present question but it covers at least 50% of it - and the rest (detecting buttons) is well covered in my article and in the sticky several things at a time
It seems we have crossed paths. The only response I thought I had from you was that you don't respond to PM's, and you suggested that I start a new thread, so that's what I did.
I am new to this forum and am still feeling my way around.
neksmerj:
Hi Robin2, you are correct, I am reading as much as time allows.
Can you recommend some books that will give me an insight into the Ardinuo world.
I haven't got the impression you are reading the stuff I have taken the time to write !
Sorry, I don't have any book recommendations as I have got all my info from the web. There are plenty of Arduino books but I have not read any of them. In a bookshop recently I did glance through one large book about Arduino Robots and the code was very poorly structured - i.e. it seemed to have no structure.
neksmerj:
Just out of curiosity, does it make any difference which order the lines of code are in?
The order of the code is one of the most important things.
Computers are stupid. They do things that you tell them in the order you tell them - even if what you tell them is wrong.
Two weeks ago I had never heard of Arduino
If the stuff I have written is too complex for your current level of knowledge you need to tell me and I will be happy to try to explain. But don't just ignore it.
Imagine you were driving your car down the road and were about to make a turn- you have to do two things: judge if it's time to turn, and if it is, turn. (Ok three things- if it's not time to turn, don't.) Rinse and repeat that sequence of look/decide; look/decide.
The sequence is important, since it would be crazy to decide to turn before you had looked to see if you were at the crossing. Well the Arduino is dumber than soup until you give it some instructions, and it will decide then look if that's the order you code the instructions.
You may find it beneficial to look up flowcharting to help you model the program conceptually.... it's a bit old school and there are newer ways to model things, but nevertheless it's a good way of getting the sequence of steps, the algorithm, clear in your mind.
Robin2, you put the words in my mouth, I am not ignoring your input, just having trouble understanding all of it.
If you had the time to look at my project and write a tutorial for dummies, I'm sure a lot of readers would benefit greatly from your knowledge. I still can't find where to place switches and write code for them to control direction of the stepper motor.
I'm over 70 and venturing into the Arduino world is totally new for me, always up for a challenge.
I am a retired product designer and have always had an interest in mechanical and electronic things.
My first Arduino uno R3 board arrived today, my godfather, it's so small, I did not realise.
Time to start playing with some very easy examples from the Arduino library starting with "blink"
As mentioned earlier, my Arduino board arrived today, so decided to try the "blink" example.
I reckon I've done everything correctly, but it's not doing what it's supposed to do. The green led is on all the time and the orange led is blinking at a constant rate of two blinks per second.
Windows reports all the drivers are installed and working correctly.
I have selected com3 port.
I've tried changing the time delay and it makes no difference.