12Blocks- v1.2 launched!
Hanno
Posts: 1,130
EDIT:
I started my latest project with the thought that the Propeller is (or should be) as easy to use as a Basic Stamp. Several people chimed in that it could be even easier. One late night, I came up with the concept of 12Blocks (first named Spinner) and spent the next couple hours defining the language. This thread now nicely documents how a new product is made. Enjoy!
(Edit February 20th )
Version v1.2 is now here! Should be quite stable and lots of new features- more about that soon.
Check out the tutorial:
12blocks.com/tutorial.pdf
Read about 12Blocks in the Parallax Newsletter:
www.parallax.com/tabid/581/Default.aspx
Many thanks to everyone that's helped and inspire me- especially to my family, Brian and Chad!
Chad's starting to use 12Blocks to teach robotics to kids and says: " I really think 12Blocks
is turning out to be the best graphical programming environment for kids out there."
Hanno
ORIGINAL POST, with subject: "I think a Propeller is as easy as a Basic Stamp"
Hi,
We all know that a Propeller is much more capable than a Basic Stamp with the 8 cogs, video, counters, 32bit, assembly, adjustable frequencies, object...
I would like to make the case that for equivalent functionality, the Propeller is just as easy to use as the Basic Stamp.
That is, if all you want to do is some basic math and pin toggling at slow speed, then it's just as easy to use a Propeller as it is to use a Stamp. The Propeller Tool makes it just as easy to type a short spin program and run it on the Propeller as the Basic Stamp tool did. While the Propeller allows you to mix assembly with spin, use objects, counters and much more, you're not forced to do that. A simple program to toggle a pins state is as simple as:
What could be simpler? (I purposely didn't use the cryptic ~~ and ! operators, they should be banned for simple non time/space programs like this)
Why do people keep insisting that a Propeller is harder to use than a Basic Stamp? It's more CAPABLE, but it's not more difficult. Programming FPGA is more difficult- setting up the tool chain, getting something to compile, and running it on the hardware takes a Phd by itself.
Please enlighten me if I'm missing something- if there really is something, I'm sure it can be fixed with an Andy Lindsay guide or by software [noparse]:)[/noparse]
Hanno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Co-author of the official Propeller Guide- available at Amazon
Developer of ViewPort, the premier visual debugger for the Propeller (read the review here, thread here),
12Blocks, the block-based programming environment (thread here)
and PropScope, the multi-function USB oscilloscope/function generator/logic analyzer
Post Edited (Hanno) : 2/19/2010 7:58:01 PM GMT
I started my latest project with the thought that the Propeller is (or should be) as easy to use as a Basic Stamp. Several people chimed in that it could be even easier. One late night, I came up with the concept of 12Blocks (first named Spinner) and spent the next couple hours defining the language. This thread now nicely documents how a new product is made. Enjoy!
(Edit February 20th )
Version v1.2 is now here! Should be quite stable and lots of new features- more about that soon.
Check out the tutorial:
12blocks.com/tutorial.pdf
Read about 12Blocks in the Parallax Newsletter:
www.parallax.com/tabid/581/Default.aspx
Many thanks to everyone that's helped and inspire me- especially to my family, Brian and Chad!
Chad's starting to use 12Blocks to teach robotics to kids and says: " I really think 12Blocks
is turning out to be the best graphical programming environment for kids out there."
Hanno
ORIGINAL POST, with subject: "I think a Propeller is as easy as a Basic Stamp"
Hi,
We all know that a Propeller is much more capable than a Basic Stamp with the 8 cogs, video, counters, 32bit, assembly, adjustable frequencies, object...
I would like to make the case that for equivalent functionality, the Propeller is just as easy to use as the Basic Stamp.
That is, if all you want to do is some basic math and pin toggling at slow speed, then it's just as easy to use a Propeller as it is to use a Stamp. The Propeller Tool makes it just as easy to type a short spin program and run it on the Propeller as the Basic Stamp tool did. While the Propeller allows you to mix assembly with spin, use objects, counters and much more, you're not forced to do that. A simple program to toggle a pins state is as simple as:
pub toggle 'a program starts with the first public procedure dira[noparse][[/noparse] 4]:=1 'set io pin #4 to be an output repeat 'continually repeat the next 2 instructions outa[noparse][[/noparse] 4]:=1 'set io pin #4 to on outa[noparse][[/noparse] 4]:=0 'set io pin #4 to off
What could be simpler? (I purposely didn't use the cryptic ~~ and ! operators, they should be banned for simple non time/space programs like this)
Why do people keep insisting that a Propeller is harder to use than a Basic Stamp? It's more CAPABLE, but it's not more difficult. Programming FPGA is more difficult- setting up the tool chain, getting something to compile, and running it on the hardware takes a Phd by itself.
Please enlighten me if I'm missing something- if there really is something, I'm sure it can be fixed with an Andy Lindsay guide or by software [noparse]:)[/noparse]
Hanno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Co-author of the official Propeller Guide- available at Amazon
Developer of ViewPort, the premier visual debugger for the Propeller (read the review here, thread here),
12Blocks, the block-based programming environment (thread here)
and PropScope, the multi-function USB oscilloscope/function generator/logic analyzer
Post Edited (Hanno) : 2/19/2010 7:58:01 PM GMT
Comments
Renesas r8c tiny
TI 420 day
Motrola hc6811
and of all of them the propeller is the easiest and most useful to work with.
OK assembly is much easier on the hc6811 then on the propeller.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
propmod_us and propmod_1x1 are in stock. Only $30. PCB available for $5
Want to make projects and have Gadget Gangster sell them for you? propmod-us_ps_sd and propmod-1x1 are now available for use in your Gadget Gangster Projects.
Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
If you can make a number of individual simple demo programs like this one,
that exactly translate simple PBASIC into SPIN, it will be totally fantastic,
immensely useful, and we'll need to label you a genius!
humanoido
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Stamp SEED Supercomputer
Basic Stamp Supercomputer
Three Dimensional Computer
Penguin with 12 Brains
Penguin Tech
StampOne News!
Penguin Robot Society
I agree with you that we need more, and simpler tutorials that make the Propeller less scary for beginners. That's partly what inspired me to start this thread. Would be great for someone to put together a bunch of simple programs that progress in difficulty. And no, the first sample should NOT start with esoteric concepts like clkfreq, plldiv, or impossible to decipher symbols like ! and ~~. Target the programs to a beginner and don't confuse them with concepts that they don't need to understand yet. Don't talk about 8 cogs, counters, video, assembly, frequency settings until they're actually required. The Propeller should be sold as the world's easiest to use processor- which is capable enough to do some really cool stuff.
Hanno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download a free trial of ViewPort- the premier visual debugger for the Propeller
Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!
This is especially great as one can go from the simplest "flash a LED" code starting, from knowing nothing, all the way up through objects, multi-processing, assembly language, video...all with the same hardware and software tool.
I do agree that a heap of "getting started" tutorial examples with the minimum of not immediately obvious squiggles would be desirable.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
In the code above are the comments really needed? Maybe all that is needed is one comment to indicate what the number 4 is. So its not that tasks can be accomplished with only a few lines of code but how easy it is to understand what the code is doing with out the help of added comments.
A device I'm making needed a simple circuit at the last minute to handle charging the batteries, so instead of using the propeller for that to, I decided to use a Stamp1. I had to call tech support to re learn how to use the pins! Not that the stamp is hard, we all know it's easy to program, but when I get my head wrapped around a propeller, basic goes out the window!
But than again maybe it's just me, when I think I am never going to use something again, I tend to forget it. A customer came in the other day wanting DOS 6.0 loaded on there computer. Not until my flash backs subsided did I remember how easy that was!
Post Edited (bambino) : 6/30/2009 2:09:57 PM GMT
http://forums.parallax.com/showthread.php?p=794096
I'll be playing with it this weekend.
I agree with FearTurtles as to how easy the code is to "read" without being completely fluent in the spin language. BASIC is very basic, so to speak, and that's why I was able to learn it in 7th grade (many moons ago on a TRS-80). I am really looking forward to playing with my recently acquired propeller proto board however, with both SPIN and Bean's emulator. I haven't dove into SPIN yet, but as I am looking for lower cost alternatives to stamp modules, I am heading towards the SX using SX/B for time and will be looking at the propeller for the long haul.
I also play with Cypress' line of PSoC microcontrollers and from that, started venturing into C and assembly. I have a few good books on learning the PSoC and when I have the time to sit and read, it is easy to learn. My issue is with the time (I have none) so SX/B and Bean's Stamp emulator for the prop will be my avenue. I will still use the PSoC for a couple of my projects (capsense touch board and wireless RS232) I know that several people have stated that when allocated the proper amount of focused time, SPIN was not difficult.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Williams
WBA Consulting
IT / Web / PCB / Audio
complete immersed in Propeller most of the time.
My initial impression (from a Propeller point of view) is
that the Basic Stamp is easier commandwise, but extremely
restricted. I'm simply SPOILED by all the features in the
Propeller. [noparse]:)[/noparse]
Oldbitcollector
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
Of course following that with a corollary: if you know SPIN and not PBASIC, then PBASIC is harder [noparse]:)[/noparse]
If harder means doing more with less, then PBASIC is harder than SPIN.
If harder means someone gives you a compass to debug a power supply instead of an oscope and/or
multimeter (an interview question I had once - no joke), then you have to stretch your mind to make it work.
Hopefully you will end up with the right tools.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
1. Variable space: You can really spread out in Spin, if you want to, and don't have to share variables just to conserve variable space.
2. Local variables: The use of local variables in methods reduces the chance of errors that can occur when all variables are global, as is the case in PBASIC.
3. 32-bit signed longs: Who hasn't had to jump through hoops in PBASIC to manage large numbers and/or negative numbers?
-Phil
An example:
You will output a PWM signal with 20% with on a Pin for 1 second.
In PBasic this is 1 command, something like:
PWM 4,20,1000
(don't know the exact syntax, because I never coded in PBasic).
How do you that in Spin?
1) You read about counters and how to start new cogs, and build your own PWM object....
2) You search for a PWM object and include it in your code. Then you need to study how this object works, how you must
initialize it, and how to pass the pulswith and so on... and it's not shure that this informations are well described in the object.
It's the same if you wanna count pulses, want output a frequency, want measure an RC time and much more. As long as PBasic
has a built in command, then it's definitly easier.
But when you need more power, or functionality which is not built in, then Spin and the whole concept of the Propeller is much easier.
Andy
Spin has the same approx learning curve as SXB.
BUT,,,, WITH the massive OBEX objects available, the prop is as easy to program as a BS2.
However, with spin's intuitive nature combined with its almost limitless program paths..... ,
I find myself running into walls, due to me not being able to choose HOW to go about programming it.
There are too many choices and ways to get your end result in spin.
Many of my ways are not efficient, but they WORK.
I then figure out ways to trim it all down, using yet another method...
Post Edited (Clock Loop) : 7/1/2009 12:21:04 AM GMT
What else makes the Propeller so much harder to use than the Basic Stamp? (Again, for EQUIVALENT functionality)
Hanno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download a free trial of ViewPort- the premier visual debugger for the Propeller
Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ D Rat
Dave Ratcliff· N6YEE
demo-programs about objects and cogs (sharing variables, IO-oring)
The documentation-style of the objects has to be improved
adding different demos with detailed explanations of the object-parameters
programming tutorials about how debugging can be used to analyse what's going on
programming tutorials about how to create your own new commands built up with the elementary commands of SPIN
The Prop never had that, it just had at best a mediocre manual that really lent itself to experienced coders and is in need of revision, especially the SPIN tutorial section.
As to the languages themselves,PBASIC is just a limited version of BASIC - its dirt simple and easy to learn period. And it had to be given that it had to fit a mc with almost no ram.
SPIN is a mish-mash of C and other languages and as a result its more complex,quirky and flexible compared to Pbasic. Which means more of a learning curve for novices if they have no HLL experience.
Mind you all of this is irrelevant if its experienced programmer looking at either. To them both are a cinch.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download a free trial of ViewPort- the premier visual debugger for the Propeller
Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!
you made me so curious. Can you say a date ?
She's not quite 5.
She can't read yet.
Besides making the Propeller much easier to use, it'll also introduce a new programming style based on messages. Should make enough progress this weekend to show something early next week. Who wants to beta test?
Hanno
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Download a free trial of ViewPort- the premier visual debugger for the Propeller
Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
"We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ain't gadetry a wonderful thing?
aka G. Herzog [noparse][[/noparse] 黃鶴 ] in Taiwan
Post Edited (Loopy Byteloose) : 7/3/2009 4:15:11 PM GMT
The Prop makes you find an object for a lot of those things the BS's do natively and a lot of those objects have a much steeper learning curve than the BS's do ... but once you overcome it, you can do a LOT more with the prop, a lot more easily and a lot more flexibly. Personally, I think it really shows that the prop is the end result of what a BS user would get if he gave his blue-sky wish list to a genie as wish #2. (As for wish #1, I'd guess the blue skinned slave girl would be very impressed.)
I'll volunteer to do beta testing for you
TrapperBob
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Basic Stamp,···· Propeller,·· · SX,·· FUN!
START:·
>Proccessing Data. . . .··
>Task Complete. . .·.
>Saving Data. . . .
>Entering SLEEP Mode. . . .
>Signing OFF
·
Do we need View Port Ultimate to beta test "Spinner?"
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
"We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
John Abshier
is not an issue for me.
phil kenny
Post Edited (phil kenny) : 7/5/2009 3:59:02 AM GMT
Don't be so sure. A five year old, and less, can break things in ways an adult could never dream of[noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
We are retired and have the time !
Earl