Shop OBEX P1 Docs P2 Docs Learn Events
How to do the architecture for this application ? (Arlo) — Parallax Forums

How to do the architecture for this application ? (Arlo)

NicoHEINicoHEI Posts: 15
edited 2016-05-08 19:00 in Robotics
Hi everybody

My Arlo run now with simpleIde

So I need you're help for this project

I explain

My arlo will start to the point O
with a pushbutton I will select A, B or C (Example B )
Arlo will go to the good place. (B)
Then you will select O, A or C (Exemple C)
Arlo will go to the good place (C)
...

v9QOSj.png

Can you help me to organise the program?

I thank use functions

function 0
select A
go to A
-- > Return function A
select B
go to B
-- > Return function A
select C
go to C
-- > Return function C

function A
select O
go to O
-- > Return function O
select B
go to B
-- > Return function A
select C
go to C
-- > Return function C

function B
select A
go to A
-- > Return function A
select O
go to O
-- > Return function A
select C
go to C
-- > Return function C

Etc...

I don't know if you understand... and i don't know if it's the best way...

v9QOSj.png

Comments

  • kwinnkwinn Posts: 8,697
    The simplest would be nested case statements:
    case current_location
      a:
         case destination
           b:
              ........
           c:
              ........
           d:
              ........
      b:
         case destination
           a:
              ........
           c:
              ........
           d:
              ........
    
Sign In or Register to comment.