Ok, I understand now. I thought that by having the command typed into the serial monitor be displayed on the LCD meant that it was being run and then echo’d. So I have to figure out how to get that command to the stepper FIRST and then , have the LCD display. Seems like I have it backwards. Ok then. I’ll see if I can sort this all out. At least NOW I understand what you were telling me.
Thank you again. If I get it figured out, I’ll post here.
AVR Studio 6 comes with a plugin (free but nagware) that will compile native Arduino code. As far as I know, you can do regular C/C++ debugging as normal in the Studio.
Thanks Lyndon. I just downloaded AVR6 and DID see the Arduino plugin. I’ll give it some time tomorrow and see how it goes. Appreciate the tip. Looks very impressive.
Halfway down the page is a link to a youtube video introduction on what sort of debugging methods you have with it.
(Woops, didn’t notice it is/could be payware/trialware, I see it is mentioned as being free, but also a license pricetag is shown on the front page on the right top part of the page. No comparison info found as of yet.)
As far as I can see, the plug in IS free. At least so far. Visual Studio has a much higher learning curve than the standard IDE so at this point, I am not going to sidetrack myself, rather I am going to concentrate on learning more about the commands available to me with the ARDUINO. FOr example, when I enter the command “SETP1” and see it display on the LCD, my immediate assumption is that the command printed. However, you (Valen) tell me that this is not the case so I have to go and learn how to make that happen i.e. lcd.print(cmd) .
From there, I can attempt to sort out where the program is going wrong.
So before I can intelligently sort out my problems I need to learn more about the actual coding of the program to get where I want to go.
Yeah, Visual Studio and Atmel Studio or the older AVR Studio is quite large in scope of what you can do with it. It can help a lot with debugging, but it also takes time to learn how to deal with it. You have to learn what those (arduino/c/c++) commands do anyway, so your time is best invested in that. Whenever you come across a function you don’t know about what it does, just google it or look it up on the learning wiki on arduino.cc. And do try to make your own trial and test programs. (keep them small and simple) That is the way to learn. Just copy-paste-patching other peoples code together without knowing what each line does is not going to work.
What I did was to find examples that did or approximated what I wanted to do. I then took THAT code and added it to my project. I made sure that the code worked close to what I wanted, then modified it and added/ changed pin assignments, delays etc. As I can’t seem to get that last 10% working, it’s just probably easier and smarter to stop and learn more about the code itself.
I have always been a “visual Learner” if I can have someone show me the way something works, then I can take that information and build on it. I know a lot of people don’t like to “show the code” but for many people, that’s their way of learning. I understand the idea that if you learn it yourself, then you become better at it, but I don’t think that’s always true. Having a more knowledgeable person SHOW you how to do it stays with you more permanently (in my opinion).
This isn’t a very complicated project so I’m sure I’ll figure out where I’m making my errors and how to write it properly. At least I have some direction from you guys so I can proceed from there.
The trouble with microcontrollers is, they don’t show what’s happening inside by them selves. You really do need to add a screen of some sort and print to it, make LEDs flash with meaningfull timing, or force them to report over serial what they measured/detected or computed at important times in the code. That is the way to make it visual. I love to help and explain what the code is doing. But it’s so much more effective to let your arduino tell it to yourself.