Anybody Know a good way to learn SPIN?
AwesomeCronk
Posts: 1,055
in Propeller 1
Hello, I am trying to learn SPIN, and need a better way to do so. My platform for my Prop is the Propeller BOE. Does anybody out there know a good technique?
Comments
-Phil
https://learn.parallax.com/tutorials/spin
Specifically, are the "Get Started with the Propeller Board of Education" page:
https://learn.parallax.com/tutorials/language/spin/get-started-propeller-board-education
As a whole, it is hard to find the SPIN tutorials now. With the push for C and BlocklyProp, SPIN has taken a back seat in my opinion. I still program primarily in SPIN (as do many, many others) so I am sure there will be others that add more SPIN resources that I forgot about or didn't recall.
When I learned SPIN, I simply loaded demo code from various accessory product pages, the OBEX, or the forums. From there I dug in to the code and began manipulating parts to understand the changes. After that, I went through the Propeller Education Kit and migrated projects to the BOE, Activity board, and even the Quickstart. The Propeller Education Kit PDF can be also pulled from the Propeller Tool software under the Help menu (along with the Propeller Manual for all things syntax!). In my opinion, the PE Kit book and the Propeller Manual is what taught 70% of what I know of the Propeller. The other 30% came straight from these forums and fellow forum users answering my questions.
Other:
Link to additional Propeller Documentation and app notes
https://learn.parallax.com/educators/teach/spin-programming-multicore-propeller
some links on this thread may be broken, but: https://forums.parallax.com/discussion/comment/1049896/#Comment_1049896
My introduction to the Propeller was when they still had the Spin tutorial in the Prop manual. I would go through each exercise step by step, made sure it worked the way it was supposed to, and then I would "break" it by slowly modifying it until it didn't work anymore. Understanding what made it break was just as important as knowing what made it worked, because only then would I "understand" why it worked.
Looking at those links to the Parallax site though it is sad to see that there are extensive tutorials for C, and then Blockly, and then PBASIC, and lastly Spin, as if they are ashamed of it. But Spin is very easy to learn and if you "break" something, the important thing is that is mostly the software, and not a complicated tool, so you know where to look. So the 3Ps of learning, that of Practice Practice Practice can in "practice" be practised in this manner
spin-code-examples-for-the-beginner-public-version
I tried the very first example in Dave's thread and Propeller Tool and Propeller IDE did not like the following statement: with the following error message: Removing all references to noparse allowed the program to compile and seemed to run as indicated - blinking an LED on A16 5 times.
Can someone explain what noparse was supposed to do?
Spin is kinda like a complex version of basic in my opinion.
The biggest tool any new or old programmer has, is full page prints of every command possible with examples below the command description and syntax.
Use one page per command to allow plenty of examples in the extra space(and on the back), laminate them, and use them like a deck of cards that you try to memorize(or can flip through real fast)
(this is great in the classroom)
This might be a good idea for a parallax product.. Command with syntax plus examples, laminated flip card deck sets for specific languages.
Opening the pdf manual and pressing CTRL+F is also useful, but sometimes we don't know what or how to do, what we are doing and flipping through commands till you see something that might work... seems easier with a deck of cards...
-- industrial road sign controller and associated display controller (they communicate via RS-485 or XBee)
-- professional laser tag controller
-- multi-camera pan/tilt controller (uses XBee between base and camera platforms) -- pan/tilt platforms use LANC to control camera
-- paratrooper jump trainer for US Army
-- kiddie ride controller
-- DEF CON 22 badge (with Parallax and Ryan Clarke who also used to work at Parallax)
-- EFX-TEK AP-16+ Audio player (serial/DMX)
-- EFX-TEK AP-8+ Audio player (serial)
-- EFX-TEK FC-4+ Lighting controller (serial/DMX)
-- EFX-TEK HC-8+ DC lighting controller (serial/DMX)
-- EFX-TEK RC-4+ Relay controller (serial/DMX)
-- DMX lighting controllers for multiple companies
(Full disclosure: I'm one half of EFX-TEK)
Those are the ones I can remember -- there has been a lot more over the past 10 years. And the HC-8+ is very general-purpose and gets used in a lot of applications. Lately the escape rooms industry is loving the HC-8+ and I write a lot of puzzle code for companies that build escape rooms and associated products.
You can see some of the artistic work I've done with the Propeller -- again, programmed in Spin -- on this page:
-- https://www.pinterest.com/jonmcphalen/techno-art/
As with anything new it will take a little time to learn, but it's worth it. I find it allows me to adapt to my client needs very quickly. Those Hollywood projects are usually programmed under a lot of pressure with very little time.
You can see more of my projects in the Customer Projects section.
Go easy on yourself, and do try to give yourself a little time each day.
And then one day you try using the led as a sensor.. and the joy starts all over again..
(i created an entire project based on using the led as an emitter AND sensor)
http://forums.parallax.com/discussion/comment/1248240/#Comment_1248240
https://forums.parallax.com/discussion/comment/574644/#Comment_574644
That was one of my first projects on a Propeller. Satisfying, right behind flashing the LED. Read it and flash it in quick succession.
I like to learn through reading. There are a couple of decent books on Amazon that I have read:
Getting Started With the Propeller
ASIN: B004X6U6II
Programming the Propeller with Spin: A Beginner's Guide To Parallel Processing (Tab Electronics)
ISBN-13: 978-0071716666
The first is a quick read but contains a lot of really useful information. The second book has a bit more detail but is (at least for me) about twice the length it should be. The author repeats far too much for my taste. Still, I think both are useful.
Hope this helps!
Jim
first of all welcome to this forum. Be warned right at the beginning that the Propeller and this forum are very addictive.
I am a quite fast reader and read a lot. But as I hit SPIN for the first time I started with the PE-Kit, breadboarded my first Propeller and just dove into all the sample programs provided with the PropTool.
I have to admit that the language has it's 'quirks', most confusing the max and min being the wrong way around.
But else it is a very nice and thought thru language.
Like you can not learn to ride a bike by reading about it, you can not learn a language by reading about it. You need to practice it, play around with it.
And that is where the Propeller shines. You can get very fast success because of the overall simplicity.
Start with some serial Object and a terminal program and you have in a couple of lines some input and output routines as a testbed for any future exploration.
and Enjoy it,
Mike
The Propeller Education Kit text was designed for beginners such as yourself and it is what gave me a good introduction to Spin.
https://www.parallax.com/sites/default/files/downloads/122-32305-PE-Kit-Labs-Fundamentals-Text-v1.2.pdf
https://www.parallax.com/downloads/propeller-education-kit-labs-fundamentals-example-code
This might also be helpful. (text and code links are on the bottom) - Based on What's A Microcontroller for the BS2
https://www.parallax.com/news/2015-07-09/now-available-preview-whats-multicore-microcontroller-chapters-1-6
If you feel adventurous then look this over. (links on the bottom for text and code)
https://www.parallax.com/news/2015-02-26/download-new-book-jon-titus-experiments-propeller-quickstart
Of course the best way to learn is to look at programs written by others and if you have any questions just ask.