Announcement

Collapse
No announcement yet.

Ordering programs within a project

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ordering programs within a project

    I've combined all the programs for the competition into a single project, and given the programs names all beginning with a number. The idea was that on the robot the programs would all appear sorted in the order they were required, so minimising the time to go from one program to the next.

    In fact, they seem to appear in the reverse of the order they were last edited, so after making little edits to several of the programs the order is all completely jumbled.

    Is there a way of getting the programs to sort in alphabetical order on the brick display? Can you do this in the memory browser?

    Grateful for advice.

  • #2
    Search around, common topic for EV3. There are some fragile techniques that take advantage of "last used" as you have discovered. But they have to be checked and re-checked (if you ask me) before every match.

    The more complete solutions (not likely something to tackle this season, but for next) - are the sequencer or menu type developments. Create a "master" program that allows operator to select options off a menu using buttons, etc. Then once selected - the master runs a MyBlock of that mission.

    Comment


    • #3
      Originally posted by dna1990 View Post
      Search around, common topic for EV3. There are some fragile techniques that take advantage of "last used" as you have discovered. But they have to be checked and re-checked (if you ask me) before every match.

      The more complete solutions (not likely something to tackle this season, but for next) - are the sequencer or menu type developments. Create a "master" program that allows operator to select options off a menu using buttons, etc. Then once selected - the master runs a MyBlock of that mission.
      Last year, someone (Dean Hystad I believe) posted a message for how to edit the ev3 files to re-order the programs. My team uses a sequencer. Even if we could have the files in order, I think the sequencer is faster/easier for my kids as they can make the font huge so it's easy to see what program you are calling.

      Comment


      • #4
        I had this same question about a year ago. I cam across the idea of a sequencer program somewhere, but my team and I mangled it somehow. Dean helped me find a solution that my team was able to implement this year with much more success. The thread is here: https://forums.usfirst.org/forum/gen...uencer-program
        Hope this helps.

        Comment


        • #5
          If you have the most recent version of the education software (home probably works the same, but why use home?) the project folder on the EV3 only contains programs and resource files (sounds and images), and any files your programs may happen to create. This is a big improvement over previous versions where a program was created for each my block. Well if not a big improvement at least it doesn't punish teams for writing my blocks. However you still might end up with several programs you don't plan to run at the table (tests, works in progress, old versions) clogging up the screens and causing confusion. But if you are running an older version of the software you should update now and this may resolve most of your issues.

          Programs are listed in chronological order. You could change that to alphabetical order by importing programs into a new project in alphabetical order, but it is hardly worth the work. If you needed to edit any program it gets saved as the newest program and appears at the end of the list. You may be thinking "Ah! All I have to do is re-save all the programs in the order I want." That will work, but it is really not worth the effort unless you only have a few programs. There are also some FLL community tools for managing EV3 project that allow setting the order that programs appear, but again this is hardly worth the effort, at least when using the newest programming software.

          I don't think the Recent Programs view is "fragile". You can order your programs by running them in reverse order. So if had 6 programs you would run program 6 followed by 5 then 4 on down to 1 and the Recent Programs view would show program 1 on the top of the list. However as soon as you run program 2, program 2 becomes the most recent program and appears at the top of the list. This actually works pretty well because if you rescue the robot the most recent program is automatically selected. Another nice thing about this method is selecting and running programs can be done without looking at the screen. To run the first program you press the enter button. To run the second program you press down and then enter. To run the third program you press down twice and enter. The downside is you need to re-order the programs before each match. This can be done in a few seconds, but anything you need to do multiple times during the day is prone to error.

          Many experienced FLL teams get around these issues by writing one program that runs all their missions. These programs aren't all that difficult to write, but there is always a lot of debugging required as you will learn that the EV3 does a lot of things at the start and end of a program of which you were unaware. If you run all missions from inside one program it becomes your responsibility to do all that setup and cleanup work and some of the steps are "subtle". I bet there are 100 posts in this forum devoted to the subtleties.

          Addressing dna1990's response, it is not required that you write missions as a my block, but it sure is a good idea. This year I judged a team that had a program sequencer that wrote all their missions inside the sequencer. The lead programmer was very proud of the program's massive size. I mentioned a few times during the interview and also commented on the evaluation sheet that "massive" is not desirable when it comes to program size.
          Last edited by Dean Hystad; 02-04-2019, 04:14 PM.

          Comment


          • #6
            Originally posted by cschaffer View Post

            Last year, someone (Dean Hystad I believe) posted a message for how to edit the ev3 files to re-order the programs. My team uses a sequencer. Even if we could have the files in order, I think the sequencer is faster/easier for my kids as they can make the font huge so it's easy to see what program you are calling.
            Why are you using words? Words are a terribly inefficient way to convey information.

            I judged a team this year that gave names to each EV3 button. The buttons were named after some feature on their robot so it was easy to associate the name with the button. When it came time to run a mission the "pit crew" yelled out which button to use. I didn't think this a particularly good way to select programs, but at least it was different and creative. So many teams use the same 2-3 mission sequencers that when I hear "sequencer" or "monster program" I start trying to guess which version they implemented. Maybe you should re-think your solution and surprise your judge.

            Comment


            • #7
              Originally posted by Dean Hystad View Post

              Why are you using words? Words are a terribly inefficient way to convey information.

              I judged a team this year that gave names to each EV3 button. The buttons were named after some feature on their robot so it was easy to associate the name with the button. When it came time to run a mission the "pit crew" yelled out which button to use. I didn't think this a particularly good way to select programs, but at least it was different and creative. So many teams use the same 2-3 mission sequencers that when I hear "sequencer" or "monster program" I start trying to guess which version they implemented. Maybe you should re-think your solution and surprise your judge.
              I dont think one word or two quick words is "terribly inefficient" way to do a menu, though you are of course are entitled to your own opinion.

              My team decided to use an up/down button methodology to scroll through missions. They have more missions than are available buttons to assign myblocks to. Each mission label on the screen has a number and a word to remind them what mission it is. Pressing the up button goes to #2, then #3, etc. Pressing down goes to a lower number. To launch a mission, the center button is pressed.

              After a mission is run, the screen will automatically increment the screen to the next mission and the user just needs to hit the center button again to launch.

              Seems efficient to me and easier to handle then assigning missions around the diamond (especially when there are more than 5 missions). One button to press to launch the next mission, and its always the same button unless you decide to rerun or skip a mission. The team hasn't implemented a mind reader yet, though they have talked of doing that in a way that the robot would just know if they wanted to run the same mission again or skip a mission depending on when the robot is interrupted.

              Comment


              • #8
                There is no reason a menu needs to use words, or even the display. There is no reason a sequencer has to use up and down buttons, or even buttons for that matter. There was a time when a sequencer was pretty cool programming. Unfortunately he internet has stomped all the "coolness" out of mission sequencers. I know most FLL partners don't judge programs, but if yours does, why not challenge the team to come up with something new instead of "sequencer B"? Don't save all your creativity for designing attachments.

                Comment


                • #9
                  Originally posted by Dean Hystad View Post
                  There is no reason a menu needs to use words, or even the display. There is no reason a sequencer has to use up and down buttons, or even buttons for that matter. There was a time when a sequencer was pretty cool programming. Unfortunately he internet has stomped all the "coolness" out of mission sequencers. I know most FLL partners don't judge programs, but if yours does, why not challenge the team to come up with something new instead of "sequencer B"? Don't save all your creativity for designing attachments.
                  Numbers are useful for quickly making sure the team are on the right item. Words are good to jog your memory if you panic. The team isn't doing this to impress judges. They are doing it to get the robot out of base quickly. They also have included elements of sound to let them know they are on the right items, etc.

                  Yes, they don't need to use buttons, as I said they have considered having the robot read their mind (interrupt before this point and they likely want to rerun, etc). They've also used touch sensors to denote when a mission is done to trigger the next mission. Again, these are all CHOICES and the choices aren't wrong as long as they understand why their choice works for them. If having visual and audible confirmations make them feel more comfortable and they average getting the robot back out on the table in sub 5 seconds even with attachment changes, who cares how they trigger it. There are a very large number of ways you can tell the robot to go and what to do (using the color/rli, gyro, US, motor rotation, touch sensors or even the sensor cables) in addition to the buttons. it's all a choice.

                  Comment


                  • #10
                    Originally posted by Dean Hystad View Post
                    ...Unfortunately the internet has stomped all the "coolness" out of mission sequencers. I know most FLL partners don't judge programs, but if yours does, why not challenge the team to come up with something new instead of "sequencer B"?
                    Creating a sequencer that uses "buttons" and "menus" on a display is still a reasonably challenging programming task for most FLL teams. Just because someone else has done it previously doesn't diminish the effort and learning required of kids on countless FLL teams. It can still help most teams shave valuable seconds off their non-scoring time in base.

                    I agree, however, that downloading or copying a sequencer off a website doesn't teach the kids very much, and shouldn't be overly rewarded by judges, unless the kids were able to fully understand and substantially enhance the original code.

                    Comment


                    • #11
                      Originally posted by cschaffer View Post

                      Last year, someone (Dean Hystad I believe) posted a message for how to edit the ev3 files to re-order the programs. My team uses a sequencer. Even if we could have the files in order, I think the sequencer is faster/easier for my kids as they can make the font huge so it's easy to see what program you are calling.
                      Originally posted by Dean Hystad View Post
                      There is no reason a menu needs to use words, or even the display. There is no reason a sequencer has to use up and down buttons, or even buttons for that matter. There was a time when a sequencer was pretty cool programming. Unfortunately he internet has stomped all the "coolness" out of mission sequencers. I know most FLL partners don't judge programs, but if yours does, why not challenge the team to come up with something new instead of "sequencer B"? Don't save all your creativity for designing attachments.
                      I believe rationale behind why I posted my initial message was missed.
                      I was simply giving credit to Dean for a cool idea and investigative work of how to order the programs on the brick, but noting that my team didn't use that by saying we used a menu program. I wasn't saying my team was cool and innovative.

                      Comment


                      • #12
                        Originally posted by cschaffer View Post
                        I believe rationale behind why I posted my initial message was missed.
                        I was simply giving credit to Dean for a cool idea and investigative work of how to order the programs on the brick, but noting that my team didn't use that by saying we used a menu program. I wasn't saying my team was cool and innovative.
                        I'm pretty sure your team is cool and innovative.

                        I am a selfish man. I think FLL exists so I get to visit with kids who like building and programming robots. Because I am a selfish man I want them to entertain me with original and imaginative ideas. Teams do a pretty good job at this and my time judging FLL is the highlight of my week. That said, I think programming gets short shrift compared to solutions and attachments. This is understandable because good solutions do not require fancy programming. However, being a selfish man and a programmer by profession, I think teams should go beyond what is required and write some cool, fun code for my enjoyment. In pursuit of my pursuits I occasionally poke the bear and post outlandish things that are probably best ignored by reasonable thinking teams. But there are plenty of teams that aren't reasonable. Maybe some of that unreasonableness can be directed at programming?

                        Seriously now, though I do enjoy being surprised I think teams should not try to be innovative just for the sake of being innovative. The reward isn't worth the effort. Conversely I think teams should not be satisfied with the first solution they come up with or assume other teams are smarter than they. Looking at the diversity among solutions to the robot game challenges I am a bit surprised by the uniformity I see in sequencers/schedulers/monster programs. Even the same names get used by teams talking about their programs. There is obviously some "research" going on, if not in code, at least in concept. Maybe this kind of code, not moving the robot or attachments, not directly applicable to the game, is more a tedious task than a fun challenge.
                        Last edited by Dean Hystad; 02-04-2019, 07:27 PM.

                        Comment


                        • #13
                          Originally posted by Tim Carey View Post
                          I had this same question about a year ago. I cam across the idea of a sequencer program somewhere, but my team and I mangled it somehow. Dean helped me find a solution that my team was able to implement this year with much more success. The thread is here: https://forums.usfirst.org/forum/gen...uencer-program
                          Hope this helps.
                          You were already 99% of the way there. I hardly helped you at all.

                          Comment


                          • #14
                            Originally posted by simonc8 View Post
                            I've combined all the programs for the competition into a single project, and given the programs names all beginning with a number. The idea was that on the robot the programs would all appear sorted in the order they were required, so minimising the time to go from one program to the next.

                            In fact, they seem to appear in the reverse of the order they were last edited, so after making little edits to several of the programs the order is all completely jumbled.

                            Is there a way of getting the programs to sort in alphabetical order on the brick display? Can you do this in the memory browser?

                            Grateful for advice.
                            Yeah, my kids chose to use the "run recent" approach. All the programs for the tournament used file names like "1 solar panel" "2" meteoroid food production" "3 tube module", etc. etc. Then, immediately before the match, the kids would go to the file navigation menu and quickly run all the programs in *backwards* order -- 7, 6, 5, 4, 3, 2, 1. Then when the match started, they'd run them all from "run recent" where they were listed in the correct order, one after the other, all ready to go. It meant when they wanted to start the next program, they simply pressed two keys -- down, middle.

                            Comment


                            • #15
                              If I have programs P1, P2, P3 and P4, I can put them in order in the Recent Programs tab by running P4 followed by P3, then P2 and finally P2. The programs will then appear as P1, P2, P3 and P4. To run P1 all I have to do is press the enter (middle) button. The list remains in the same order with P1 on top. To run P2 I have to press the down button and then enter. The order of program in Recent Programs is now P2, P1, P3, P4. To run P3 I press down twice and then press enter. The list is now P3, P2, P1, P4.. Finally to run P4 I have to press down 3 times and then enter. The list ends up in reverse order P4, P3, P2, P1.

                              Did you notice the pattern? To run program N you press the down arrow N-1 times followed by enter. This can be done without looking at the display. To run the same mission over after a rescue you only have to press the enter button because the most recent program is always on top and always selected. Try it out. For ordering mission programs it works surprisingly well.

                              Comment

                              Working...
                              X