Shop OBEX P1 Docs P2 Docs Learn Events
Noob questions.... — Parallax Forums

Noob questions....

cthomascthomas Posts: 17
edited 2012-02-01 12:45 in Propeller 1
Trying to learn Spin....

The Basic Stamp practically wrote it's own programs, the propeller is more of a challenge.

1. Is there a document somewhere that explains how to talk to the Parallax Serial Terminal?
I can find examples of folks doing it but haven't uncovered a manual that explains it. (and of course I just found the Serial Terminal discussion in the 'stickies')

2. I've been puzzling over things like the use of the "." , the Method reference symbol. Ouch. One of those cases where I have to learn enough to ask a good question.

It's clear I know so little, it's hard to know where to start.
I have the Propeller Education Kit Labs: Fundamentals.....it's useful but has it's limits, and I haven't gotten all the way through it yet.

3. Any good "Spin" tutorials out there?

Thanks for anything.

Comments

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-01-22 14:50
    Here's one Serial Terminal introduction, part of this tutorial series..

    OBC
  • cthomascthomas Posts: 17
    edited 2012-01-22 14:53
    Good stuff.

    Thank you.

    .
  • Cluso99Cluso99 Posts: 18,069
    edited 2012-01-22 16:45
    Check the stickies above, and also do the examples that come with PropTool.
  • TymkrsTymkrs Posts: 539
    edited 2012-01-22 19:41
    We do a podcast (that's in the stickies) called First Spin where we go through Propeller architecture from the ground up. Roy and Whisker help me learn how to program with zero prior programming experience - and though you have some already, you might learn a bit from it?

    http://firstspin.tv
  • gclousegclouse Posts: 5
    edited 2012-02-01 12:09
    About method references

    Spin is object oriented, pBASIC isn't. A lot of confusion about object oriented programming centers around the terminology of object oriented programming, which I'll call OOspeak.

    In the simplest terms an Object is a program that can be used by another program. In Spin, the instructions in a PUB or PRI block are the program logic, and in OOspeak are called methods. PUB defines public methods that can be used by other Spin programs. PRI methods are hidden from other programs.

    When you write a PUB or PRI block, you give it a name, usually that describes what that block does. For example PUB SendData might send a message to the tv output. You can also have your program use another program that has a SendData method already written and debugged called TVO.spin. You could copy and paste TVO.spin into your current program , or you could use an OBJ block to add TVO.spin ilke
    OBJ TV "TVO". OBJ creates an object reference called TV to TVO.spin.

    Then you can call the SendData method by using TV.SendData. This tells the compiler to use the SendData method in the object referred to by TV. Think of it like the area code in a phone number. you don't need it for local calls, only for long distance.

    You can also use several object references in the same program. That way you can have TV.SendData that sends data to the TV screen, and USBHost.SendData that sends data to the host PC in the same program.
  • RaymanRayman Posts: 15,004
    edited 2012-02-01 12:45
    You might try PropBasic, if you want to stay with BASIC...
Sign In or Register to comment.