Spin version of abdrive (ActivityBot driving)
Michel L
Posts: 141
I'm trying to keep the spin and c version of BlocklyProp equal. But while the simple libraries for c contain the handy abdrive lib, I can't find anything equal in spin.
I checked the obex I could not find anything specific for the ActivityBot.
If any of you have an equal spin equivalent of an other c library file it's also welcome, as I want to implement as much sensors and interfaces as possible.
Thanks in advance
Michel
I checked the obex I could not find anything specific for the ActivityBot.
If any of you have an equal spin equivalent of an other c library file it's also welcome, as I want to implement as much sensors and interfaces as possible.
Thanks in advance
Michel
Comments
Libraries for Spin and C have evolved separately, so there are not always equivalents.
Two libraries that are pretty close and have lots of important features for beginners are simpletools (C) https://propsideworkspace.googlecode.com/hg/Learn/Simple%20Libraries/Utility/libsimpletools/Documentation%20simpletools%20Library.html and BS2 Functions (Spin) http://obex.parallax.com/object/164.
There is currently a Spin to C translator http://forums.parallax.com/showthread.php/152730-spin2cpp-version-1.05 that works for many libraries, and a C to Spin translator that's somewhat earlier in its development cycle http://forums.parallax.com/showthread.php/119342-CSPIN-A-C-to-Spin-Converter. I have used the Spin to C translator to translate a number of libraries for offline requests from teachers and students. I usually do a by-hand translation or write them from scratch before adding them to the Simple Libraries https://propsideworkspace.googlecode.com/hg/Learn/Simple%20Libraries%20Index.html folder.
Andy
P.S. I've seen numerous discussions about making a Spin equivalent of abdrive, and although there isn't one yet, I'm sure one will surface soon.
thanks, I'll take a look at those links. And for some items, I just might write an object myself. I expected to have to do that when I started the project as I want to keep code that BlocklyProp generates to be as simple as possible.
Using objects I can confine complex blocks of instructions to pre-written code that I provide in the lib directory for the compiler.
Michel