Newb to spin2
in Propeller 2
I thought I would take a break from python coding. I dug out my p2 Edge setup, I installed spintools ide, and now I am completely lost.
It seems that every programming language has a "hello,world" example code. I tried to find a spin2 version, but no luck. So, where do start my spin2 beginners' journey.
Thanks
Ray

Comments
My template program for the P2 is a "Hello, World!"
Like the P1, the P2 needs a library to talk with a terminal. When the P2 first showed up I wrote an article for Nuts & Volts. While a lot has been added to Spin2 (which is updatable, unlike Spin1 that is etched in the P1 silicon), this article is still valid and will help you get a start.
-- https://www.nutsvolts.com/magazine/article/an-introduction-to-the-parallax-propeller-2
In my opinion, Spin2 is simpler and nicer than Spin1. I just spent a month updating an old P1 project that is almost 4000 lines in the main file; I constantly was wishing I had P2 syntax. That said, Spin Tools is a great choice of environment. Marco is very responsive to user inputs and serval suggestions I made while working on that big project made it into the current release, and are making my life easier.
Thanks Jon, I will see how far I get with this new stuff.
Ray
First impressions:
Spin Tools is a very complex IDE. I was expecting a simple Load , Run commands. Maybe Spin Tools should have simple, easy to use version.
I looked at the program that Jon provided; it is complex to me. I am sure that for Jon it is a very simple example program.
This is going to take some time to figure out what is going on. I can see why some people would give up on spin2 and go with python. I will give it a good try.
Ray
You're kidding, right?
1 Open (Load) -- or use File / Open...
2 Run -- or use Tools / Upload to RAM
It is easy now. And if I do say so, it takes a lot of nerve to ask for a "simpler" version of a program you haven't properly tried.
My acting coach, the late Cliff Osmond, would say to you vis-à-vis your complaints:
Don't suffer. Solve!
Don't whine. Win!
How? Instead of complaining, spend 15 or 20 minutes every day experimenting. In a week or two you'll be very comfortable with Spin Tools -- but only if you put in some effort.
Spin Tools is created by Marco Maccaferri (a consultant / Propeller developer) for Propeller developers with a lot of input from those developers. He doesn't work for Parallax, and he doesn't charge anything for the tool. Many of us have sent him gifts through his Ko-fi account (https://ko-fi.com/maccasoft).
If you'll take a breath and give yourself a bit of time with it, you'll appreciate everything that Marco has done. If there's anything to complain about, it's that Parallax didn't create a tool as full-featured as this for the Propeller years ago.
I was in your position just after Christmas just gone, didn't know a thing about Spin2 - had done a little Assembly. Today, I'm pretty comfortable with programming in both - given that I have three essential references open on my other screen:-
1. Spin2 Language Documentation
2. Propeller 2 Assembly Language
3. IRQsoft Propeller 2 Docs Just type an assembly language instruction to jump to a description, or click on the contents list.
(1) and (2) are available as google docs, but I find them more useful as pdfs with a clickable contents strip down the left hand side (you may have to open that if it isn't showing). See the attached files. I use ctrl-f a lot.
Why the Assembly Language documents if you want to program in Spin? Because many built-in methods are closely related to PASM instructions and the special hardware they support.
The hardware manual will be very useful to start with.
As for example code, the Obex is full of useful stuff. I'm currently using JonnyMac's I2C driver to talk with various external devices hooked onto the P2.
Your enthusiasm will be boosted if you can 'make lights flash' even if you have nothing connected to the P2. Get going soon with the debug windows you can create with Spin Tools. They are all described in the Spin2 manual + look at some of the code I've been posting - they were all developed in Spin Tools as demos / test sets for the methods I am developing. It helps to see exactly what your code is doing by fitting debug statements - they are so useful, rather than guessing.
Use JonnyMac's source code template - attached is my version of that
Ask questions, but do post the code you're trying to get going. That way you'll get help pretty quickly.
Happy "Spinning", bob