November 21, 2024, 05:21:54 PM

News:

You can now use Vixen to program your Prop-1 and Prop-2 controllers!  Get started quickly and easily, without having to learn PBASIC.  Details in the Library forum.


EZ Prop-1 Editor

Started by The Pod, August 20, 2013, 09:38:19 AM

Previous topic - Next topic

The Pod

August 20, 2013, 09:38:19 AM Last Edit: August 28, 2013, 10:28:32 AM by The Pod
I've been writing a GUI windows application to assist the non-techies in writing and editing their own programs for a Prop-1 controller without having the knowledge or need to write any PBasic code. The application is functional and can create, edit and load programs on to a Prop-1 but I still consider it in a BETA form as there is still so much more I want to try adding to it.

The main screen:


The configuration screen:


The table editing screen:

JonnyMac

We're always excited to see new tools for our controllers -- in the end, it's now how the show gets into the controller, its the entertainment the show provides.

As a Windows user and a master of the Prop-1 (grin), I'd be happy to give the program a try (seems familiar -- maybe I did before). Can you send me your latest beta for checkout/feedback?
Jon McPhalen
EFX-TEK Hollywood Office

The Pod

Yes Jon, I met you at 2013 Transworld and sent you an early BETA to look at.  You provided me with a bunch of suggestions and comments which I tried to implement into this latest release.  I just sent you over the latest BETA to look at again.

bsnut

First, let me welcome you to the forums.

It's always good to see another way for someone to program the Prop-1 (Basic Stamp 1) that's easy to use that has no programming experience and I have been programming in PBasic for years just like Jon, but I'm not the master like Jon.

When you're ready for us try your GUI please post a link for us to download it or attach it as a zip file so everyone can try it out.
William Stefan
The Basic Stamp Nut

The Pod

August 22, 2013, 07:06:54 AM #4 Last Edit: August 28, 2013, 10:28:06 AM by The Pod
Quote from: bsnut on August 22, 2013, 03:29:58 AM
First, let me welcome you to the forums.

It's always good to see another way for someone to program the Prop-1 (Basic Stamp 1) that's easy to use that has no programming experience and I have been programming in PBasic for years just like Jon, but I'm not the master like Jon.

When you're ready for us try your GUI please post a link for us to download it or attach it as a zip file so everyone can try it out.
Thanks, but I've been lurking this forum for a couple years......

I've attached the latest BETA version of the program as a zip file.  Hopefully people will try it out and provide feed back or point out the bugs.  I met Jon this year at Transworld and sent him an earlier BETA to test and he provided a bunch of suggestions which I tried to get them all in.

You still need to have the Parallax software installed on the PC as I use some command line functions to send and communicate with the Prop-1.

bsnut

Thanks for posting the Zip file of the EZ Prop-1 Editor. I will downloaded it later on today and will be happy to provide any feedback with some of my points and any bugs that I may find.

William Stefan
The Basic Stamp Nut

The Pod

Someone found a bug in the BETA version 5 which I fixed and uploaded BETA version 6. 

Also attached the file download to the first post with the screen shots to keep it all together.

JonnyMac

Suggestion: Add "X" over pin 1 or pin 2 of the ULN2803 if either P7 or P6 has the setup jumper in the UP position. For example, when using a serial controlled audio player, the ULN can interfere with the serial coms.

On another note, I can't figure out how to enter a sequence in the table editor after I've defined a configuration. I keep wanting to find a button that says, "Add Step"
Jon McPhalen
EFX-TEK Hollywood Office

JonnyMac

Okay, 10 seconds later -- and through just playing around -- I discover that double-clicking on a device icon adds it to the sequence. Am I the only one that was lost at this step?
Jon McPhalen
EFX-TEK Hollywood Office

JonnyMac

August 28, 2013, 11:55:06 AM #9 Last Edit: August 28, 2013, 11:56:43 AM by JonnyMac
Suggestion: Insert the warm-up/inter-show delay after the IO pins are defined. By doing this those pins that are "on" in the idle state will be preset before entering that delay on power-up.

BTW... when viewing the source, the form is unnamed (defaults to Form 1 with generic icon); this is one of those niggly things that makes programs look unfinished (IMHO).
Jon McPhalen
EFX-TEK Hollywood Office

bsnut

I like what you have done so far and here are my suggestions and comments from what I noticed before you made the changes to this neat little program.
Quote from: JonnyMac on August 28, 2013, 11:36:06 AM
Okay, 10 seconds later -- and through just playing around -- I discover that double-clicking on a device icon adds it to the sequence. Am I the only one that was lost at this step?
I also noticed this as well.

Here are some of my questions that I noticed when playing around with the program.

1) What does the "Tap-Add Sequence" do?
2) What does the "Parallax" in the file menu do?
3) What are difference between in the menu selection "Configuration", since I "Run Routine   Randomly" and "Use Multiple Routines"   

Suggestion: I think with a simple help file will answer a lot of questions on how to work with the program.

William Stefan
The Basic Stamp Nut

The Pod

Quote from: JonnyMac on August 28, 2013, 11:34:09 AM
Suggestion: Add "X" over pin 1 or pin 2 of the ULN2803 if either P7 or P6 has the setup jumper in the UP position. For example, when using a serial controlled audio player, the ULN can interfere with the serial coms.

On another note, I can't figure out how to enter a sequence in the table editor after I've defined a configuration. I keep wanting to find a button that says, "Add Step"
I like the "X" over the ULN leg suggestion and will put it on my list to add.
Besides double clicking the device icon, you can drag and drop it or right click for a menu option to insert the step above or below current location.

Quote from: JonnyMac on August 28, 2013, 11:55:06 AM
Suggestion: Insert the warm-up/inter-show delay after the IO pins are defined. By doing this those pins that are "on" in the idle state will be preset before entering that delay on power-up.

BTW... when viewing the source, the form is unnamed (defaults to Form 1 with generic icon); this is one of those niggly things that makes programs look unfinished (IMHO).
Have to look at renaming the two delays.  The warm up is used to allow the VMusic or PIR to initialize, then there is a delay before reset that appears right after the DIRS and PINS callout.

The code view, I put in for my purpose of debugging the program and just left it in there.  But yes, thanks for pointing that out.  Will make a nice icon and title for that view.

Quote from: bsnut on August 29, 2013, 02:36:39 AM
I like what you have done so far and here are my suggestions and comments from what I noticed before you made the changes to this neat little program.

I also noticed this as well.

Here are some of my questions that I noticed when playing around with the program.

1) What does the "Tap-Add Sequence" do?
2) What does the "Parallax" in the file menu do?
3) What are difference between in the menu selection "Configuration", since I "Run Routine   Randomly" and "Use Multiple Routines"   

Suggestion: I think with a simple help file will answer a lot of questions on how to work with the program.


Will have to make the add step a little more user friendly somehow.  There is a balloon tip that should appear if you hold the mouse over the icon telling you to double click to add.

1) Tap-Add is a quick and dirty way to create a routine.  Simply start tap-add and use the number keys 0-7 to create a routine.  If you want device 0 on, press the 0 key and hold it, now after 2 seconds of running you want to add turning on device 1, press and hold key 1 while still holding 0 key.  When you want the device to turn off, just release that key.  Does this make sense to you?  Tried to use terms that other key banging controllers like the picaboo, nerve center and other stand-a-lone controllers where you program by pressing and holding buttons.  There is some issues with this if using the keypad on the right of the keyboard, but if using the number keys across the top of the keyboard, this work perfect.

2) The Parallax menu is the link to the Parallax PBasic editor.  You can open it from my program or has the command line code which I use to load programs from my program to the Prop-1.  I'm hoping to add more of the Parallax command lines functions as I learn them like the memory map or checking for a connected serial interface/prop-1 controller.  To me, the memory map is a key item as I need to find a way to track the memory in my program so I don't allow people to go beyond that.  I know when messing around with keybanging and going nuts, I can blow right by the 256 bytes in no time!  I know there is the Tokenizer.DLL from Parallax and I've been messing with that but going slow.  I've searched for examples on the web and most links I find are dead or the files are no longer available.
If anyone knows where to find the vbSampleTok.zip file that use to be on the basicstamps yahoogroups, please let me know as I've been looking for it.

3) I tried to set it up to allow you to create multiple routines on a single controller.  Then have to option to run them in sequence or randomly.  An example of this is I had someone with two barrel popup skeletons that spit water.  He wanted me to write a propgram that each time it triggered he got different results.  So I had sequence one where right barrel popped up and spit.  Sequence 2 - 2nd barrel popped up and spit. Sequence 3 - both barrels popped up and spit.  Sequence 4, barrel 1 popped up but no spit. Sequence 5 barrel two popped up but no spit. and last sequence 6 both popped up but no spit.  Then I had the propgram set to random so each time the PIR would trigger, it would select a different routine/sequence to run.  If it wasn't random, then each PIR trigger would run sequence 1, then when triggered again, sequence 2, then 3, etc until 6 and then start over.

As for the help file, I'll try to work on something. 

I still consider the program to be a BETA as I'm still debugging and adding to it and I really appreciate all the feed back and comments I get as it'll help me make it better for everyone.  BIG THANK YOU!

BigRez

This looks really nice and seems to be a great tool to jump-start a project.  (Or for those of us who had to step away from the prop1 projects for a while ;)  I've noticed a few things you may want to look into:

Thanks for the info on using Tap-Add; I couldn't figure it out at first.  I tried paying around with that and tried the following:
2=light
5=air cylinder 1
3= air cylinder 2
4=air cylinder 3

So what I tried to do is activate 2 and 5 at the start (I pressed and held them down) and then randomly activate 3 and 4.  4 would not register as part of the sequence. If I let go either of 2 or 5, then 4 would register.  Tied several combinations but couldn't make it work.  (I was using the numbers across the top of the keyboard.)

The program also abended with a "subscript out of range" error after a short while; probably the sequence was too large and the program didn't catch that. 

I noticed if I hit Run Routine without actually creating one, the program abends with an "Invalid property Array Index". Should be a simple fix for you ;)

I noticed that the right scrollbar width when viewing the program is somewhat cropped. Not sure if this is my machine or not.

When in the Configuration page, if you hit the Save Configuration button it'll go back to the main page.  However, when in the Routine Table editor and you hit Save, it'll remain on that page and you actually have to go to the file menu and close the editor.  Seems like maybe they should be consistent?

I'd would be nice to be able to define the I/O enhancement or Amigo boards - maybe you can to get those in time.

The program was closed earlier today but this afternoon, it was sucking all of the CPU on my machine and I had to kill it from Task Manager.  Not sure how this happened and I haven't been able to repeat it. 

Very nicely done and looking forward to checking out the updates.


The Pod

Thanks for the feedback BigRez.

I tried your setup on my keyboard and with the number keys across the top, I could hold 2 & 5 and still trigger 3 and 4, but on the keypad to the right, holding 2 & 5 would not allow 3 or 4 to be pressed which I knew of because of the associated arrow move keys/num-lock.  Could I ask what OS you're running and type of keyboard/computer (laptop or desktop).  I may have to consider using letter keys rather than the numbers...... maybe use the standard typing rest keys "ASDF JKL:" to see if that works any better.

Will look into the crashes, thanks for the how to create them..... makes debugging much quicker.  The subscript out of range could be hitting the max number in the array I set.  We have to remember the basic stamp1 is very limited to memory space  >:( and I can only fit about 60 commands max.....  When you start adding the trigger code and delays, etc..... the number of commands available lessen, when tap adding you can easily bang through that many in no time.  ::)  I know one of my big issues is I need to find away to tokenize the code to make sure it fits in 256 bytes and provide some sort of command count (used and available).

And will look at the save buttons for consistency.

Will have to look at getting a couple I/O and amigo boards to mess around with after Halloween when I'll have more time.  It's crunch time and I need to focus on my props......   I do like the idea of having lots of options available for people to program with.  Makes it more of a challenge for me to write code to write PBasic code.

JonnyMac

QuoteI know one of my big issues is I need to find away to tokenize the code to make sure it fits in 256 bytes and provide some sort of command count (used and available).

Have you played with Vixen and the Prop-1 Code Generator Add-In? Our approach with that was to use a template file with the basic player engine. In that file we used tags (kind of like HTML tags) and then replaced them with user selections. By knowing which user selections were installed we could provide a warning if the program was going to be too long (max length based on selections was determined empirically).  It's a little easier in Vixen because it's frame based, anyway. What you might have to do is build your output array, and then check its length against predetermined limits.

I've attached the files Vixen uses as an example; perhaps they'll spawn an idea or two. The nice thing about these external files is that I was able to add the AP-16+ into the mix without having to change the Add-In DLL.
Jon McPhalen
EFX-TEK Hollywood Office