Shop OBEX P1 Docs P2 Docs Learn Events
learning SPIN — Parallax Forums

learning SPIN

PFloyd36069PFloyd36069 Posts: 135
edited 2008-06-23 17:09 in Propeller 1
Hi,

Well im fairly good at programming the BASIC Stamp. I ordered a Propeller demo board on friday, and was wondering how hard the SPIN language is to learn vs. BASIC.

Thanks,

Bryan

Comments

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-06-23 02:31
    Welcome to the Propeller..

    Your having used the BASIC stamp should make it an easy transition.
    Give this a read while you are waiting for your kit.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • ColeyColey Posts: 1,110
    edited 2008-06-23 08:09
    Hi Bryan,

    I had a rudimentary knowledge of BASIC when I took up SPIN, it is very similar in lots of ways.
    The main difference is in that is is more object orientated that a 'flat' BASIC language.
    I suppose you could say it is a cross between BASIC and C.

    The main hurdle for me was thinking in parallel with regard to the 8 cogs, once you have that clear you will be fine.

    The best thing though is this forum, it is a great resource and there are many many great coders willing to guide you along the way.

    Good luck!

    Coley

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    PropGFX Forums - The home of the Hybrid Development System and PropGFX Lite
  • hippyhippy Posts: 1,981
    edited 2008-06-23 14:04
    I don't think you'll have too many problems. I thought it would be harder than it was and got to grips with the basics of Spin in just a day or two, and once you've done that it's very easy to write code quickly and fluidly. You'll trip up over :=, => and =< a few times but that should soon pass.

    One thing I'd say is don't get bogged down over Objects to start with. Think of them as sub-modules or include files ( the full details can come later ). Things like multi-Cog programming look daunting at first but get to grips with single Cog programs turning LED's on and off and it soon falls into place.

    Build up your knowledge incrementally rather than trying to understand all that is Spin in one go and you should be successful. I'd personally recommend not looking at other people's code too much to start with as that can be daunting ( it was for me ). Dive in too deeply and you may flounder but it becomes a lot more understandable once your basic knowledge is off the ground.
  • DynamoBenDynamoBen Posts: 366
    edited 2008-06-23 17:09
    I too came from Basic, you end up·looking for BASIC equivalents in the Spin manual. Once you get a handle on that its all down hill.

    As far as objects I think of them as subroutines. The nice thing is instead of one giant file you have several small files each with its own purpose. Objects allow you to write code once then reuse it over and over in other projects...which is a lot better than trying to remember what project you wrote some code in and then copy/paste into your new project.
Sign In or Register to comment.