Resource for getting started coding.

Do you have a question on how to do something.
Ask in here.
Post Reply
paperdesk
Posts: 173
Joined: Fri May 23, 2014 8:09 am

Resource for getting started coding.

Post by paperdesk »

I had fun with the wizard, but it's a bit slow and limiting for everything I want to do. I don't have a background in coding, so I'm looking at this as a great learning experience.

I've read the "How the code structure works" post several times, and really got a lot out of it, but I still have a long way to even cover the basics.

Is there a resource that will help me learn the basics? For example, I know how to make simple edits to existing code but I don't know how to replace large sections of code, and for that matter don't even know where to put new code. For example, there are places that say something like "insert code below". Do I place my code there, or do I delete the old code and insert the new? I suppose that the answer is "it depends" and that's ok, but I then need to know what it depends on!

I realize there is a lot to learn, and I don't expect to be a coding guru overnight, but learning how to use other people's code would be a great place to start. I've browsed around for such a resource, but seemed to have missed it somehow. If someone can point me to a place where I can learn the basics I'd really appreciate it.

Thanks!

Ted
Image
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Resource for getting started coding.

Post by binder »

those sections "insert below here" etc, are spots to have you add new code.
if you are wanting to change code, for say port4, you would just add your new code and then delete the other references to port4 in other spots.

when the controller starts up, it executes the setup() function. think of this as like initializing the controller and code. then the controller jumps down to the loop() function and repeats it indefinitely (unless the watchdog timer kicks in and resets the controller).
inside the loop is where all the typical functions that update the controller take place. everything is executed in order from top to bottom. so if you update a port at the topp and then it is updated again towards the bottom of the function, the result of the. ist recent update will be what happens.
at the bottom of the loop() function, there is a function and a comment that says "must be last line". that line commits all the changes to the ports and updates the controller.

this is just a simple start for you. it is a little tough to get into more details while on my ipad but should help you out some.


Sent from my iPad mini
paperdesk
Posts: 173
Joined: Fri May 23, 2014 8:09 am

Re: Resource for getting started coding.

Post by paperdesk »

Great, thanks so much! I'll play with it later today!
Image
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Resource for getting started coding.

Post by binder »

paperdesk wrote:Great, thanks so much! I'll play with it later today!
I'll see if I can put some more together for you and add onto the other getting started post with how to program the controller.

I will also say this, understanding and being able to read c/c++ will help because that is the language used to program the controller.

Sent from my Moto X
User avatar
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Resource for getting started coding.

Post by cosmith71 »

Here's a good place for Arduino basics:

http://arduino.cc/en/Reference/HomePage
paperdesk
Posts: 173
Joined: Fri May 23, 2014 8:09 am

Re: Resource for getting started coding.

Post by paperdesk »

Good stuff! Thanks to both of you! Hopefully I can at least learn enough of the basics to be able to insert other people's code, even if I don't ever learn to create my own.
Image
Post Reply