Shop OBEX P1 Docs P2 Docs Learn Events
Need to learn C — Parallax Forums

Need to learn C

markustermarkuster Posts: 184
edited 2013-03-06 20:40 in Propeller 1
Hi,

Just to know if I can attach a pair of servos to the Propeller
and move a robot using "C" language.


If it is possible I would like to use the Propeller Project Board USB (code 32810)
to learn "C" language.

Do you have a better idea to learn "C" language ?

Thanks.

Comments

  • shimniokshimniok Posts: 177
    edited 2013-03-06 19:14
    What other programming experience do you have? How comfortable are you with MCU programming (in any language)?

    You could probably pick up C by programming the Propeller. Not knowing anything about prop gcc -- and maybe this is sacrilege -- my suggestion would be an mbed. It's on sale right now. You get a very complete stdlib C experience. Just include "mbed.h" and start writing code like you would on Unix. Use printf/fprintf, stderr, stdout, scanf, file operations, etc. The compiler is online so no struggling to set up a toolchain. Programming it is simply a matter of dragging a bin file onto a mass storage device that the mbed makes available to your computer over USB. In fact it's probably easier to learn C on mbed than trying to do something on linux or windows+cygwin if you aren't familiar with those environments. Everything is set up and works out of the box except for driver install which is super easy.

    Another suggestion is to use MacOS after installing the XCode stuff. It doesn't get much easier to set up a C-friendly, Unix environment.

    K&R is The One True C Book. That's what I learned on. Although I took a rather bad class in college to do so. That was around '91 or so. I learned on Unix. In fact, AT&T System V Release 4 running on AT&T 3B2's, about as purist as it gets.
Sign In or Register to comment.