[go: up one dir, main page]

Menu

Home

Viktor Mlej

Welcome to your wiki!

This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: [SamplePage].

The wiki uses Markdown syntax.

Project Members:


Discussion

  • Viktor Mlej

    Viktor Mlej - 2017-09-15
    • This is example with name: ** STAIRS BUILDER **

    • First check if you are in english (or just write >ENGLISH into dialog(bottom place))

    • Insert/replace this COMMANDS data into black place to right of the Karel:

    COMMAND cvz BEGIN
    LEFT-SIDE 2
    END
    command g begin
    while is free work walk *while
    if is brick then cvz walk cvz put g *if
    end

    • Insert/replace this ROOM data into blue place(right) and enter command in dialog(bottom place) >ROOM 2

    ROOM:
    X.1-Y.4-ZK.1
    X.2-Y.4-ZZ.1
    X.3-Y.4-ZZ.1
    X.4-Y.4-ZZ.1
    X.5-Y.4-ZT.2
    X.6-Y.4-ZT.1
    X.7-Y.4-ZZ.1
    X.8-Y.4-ZZ.1
    X.9-Y.4-ZZ.1
    X.10-Y.4-ZT.3
    X.11-Y.4-ZT.2
    X.12-Y.4-ZT.1
    X.13-Y.4-ZZ.1
    X.14-Y.4-ZZ.1
    X.15-Y.4-ZT.1
    X.16-Y.4-ZT.3

    • Insert/replace into dialog(bottom place) this all commands >LEFT-SIDE G
      (and press Enter)

    • Now you see: Robot rotate and looks into bricks, then go to end of room
      but if are here some bricks (not free walk), then robot build stairs and continue.
      (LEFT-SIDE and G is separate commands)

     

    Last edit: Viktor Mlej 2017-09-15
  • Viktor Mlej

    Viktor Mlej - 2017-09-16
    • Toto je slovenský príklad ( example in slovak ) : ** ZNIČ MOST TAK, ABY SI NESPADOL **
      Spúšťa sa v dialógu príkazom (run in dialog): znicmost

    English: Name: Destroy bridges that so robot do not fall.
    For automatic translate commands in this example, After copy & paste,
    insert into dialog commands >SLOVENSKY ENGLISH

    • Najprv skontroluj že si v slovenskom jazyku (alebo do dialógového riadku napíš: >SLOVENSKY )
    • Príkazy skopíruj na čierne miesto v pravo, vedľa miestnosti v ktorej je Karel:

    PRIKAZ cvz ZACIATOK
    VLAVO-BOK 2
    KONIEC

    prikaz znicmost zaciatok
    urob 4 krat
    ak je most tak
    spalitmosty
    stop
    *ak
    vlavo-bok
    *urob
    koniec

    prikaz spalitmosty zaciatok
    vlavo-bok
    jediera
    ak je pravda tak
    spalitmosty
    inak
    krok cvz zdvihni poloz krok
    *ak
    koniec

    prikaz jediera zaciatok
    nepravda
    ak je jama tak
    ak nie je most tak
    poloz
    ak je jama tak pravda *ak
    zdvihni
    inak
    pravda
    *ak
    *ak
    koniec

    • Miestnosť skopíruj do modrého okna, namiesto jeho pôvodného obsahu
      a zadaj do dialógu (spodný riadok so znakom > ) príkaz MIESTNOST 2 ( English: ROOM 2 ):

    MIESTNOST:
    X.6-Y.4-ZT.5
    X.6-Y.4-ZK.6
    X.7-Y.4-ZB.6
    X.7-Y.4-ZZ.1
    X.8-Y.4-ZB.6
    X.8-Y.4-ZZ.1
    X.9-Y.4-ZB.6
    X.9-Y.4-ZZ.1
    X.10-Y.4-ZB.6
    X.10-Y.4-ZZ.1
    X.11-Y.4-ZS.1
    X.6-Y.5-ZT.4
    X.6-Y.6-ZT.3
    X.6-Y.7-ZT.2
    X.6-Y.8-ZT.1

    • Po spustení prikazom v dialógu >ZNICMOST
      robot zistí či je tam, kde stojí most, cúvne na voľné miesto tak aby nespadol, vezme a položí
      tehličku, čo pripojený most zničí a vráti sa na miesto.
     

    Last edit: Viktor Mlej 2017-09-16
  • Viktor Mlej

    Viktor Mlej - 2018-01-11

    Wave effect of boxs, see screen shot or video on YT.

     
  • Viktor Mlej

    Viktor Mlej - 2018-01-16

    // How does a Robot know where the bigger block is?

    // place mark under Karel if block before is bigger
    // than block of brick on left

    // write: mark-bigger
    // into dialog on bottom
    // for run program

    command mark-bigger begin
    unmark
    if is brick then
    take
    move-left
    if is brick then
    take
    move-right
    mark-bigger
    put
    move-left
    put
    move-right
    else
    move-right
    mark-bigger
    put
    mark
    *if
    *if
    end

    command move-left begin left-side walk right-side end
    command move-right begin right-side walk left-side end

     

    Last edit: Viktor Mlej 2018-01-16
  • Andrej Podhajsky

    find path and traverse it
    - kids can draw their own path and test program
    room:
    X.2-Y.1-ZT.1
    X.2-Y.1-ZK.2
    X.3-Y.1-ZT.1
    X.4-Y.1-ZT.1
    X.8-Y.1-ZT.1
    X.9-Y.1-ZT.1
    X.10-Y.1-ZT.1
    X.11-Y.1-ZT.1
    X.12-Y.1-ZT.1
    X.13-Y.1-ZT.1
    X.14-Y.1-ZT.1
    X.15-Y.1-ZT.1
    X.16-Y.1-ZT.1
    X.4-Y.2-ZT.1
    X.5-Y.2-ZT.1
    X.6-Y.2-ZT.1
    X.8-Y.2-ZT.1
    X.16-Y.2-ZT.1
    X.6-Y.3-ZT.1
    X.8-Y.3-ZT.1
    X.10-Y.3-ZT.1
    X.11-Y.3-ZT.1
    X.12-Y.3-ZT.1
    X.13-Y.3-ZT.1
    X.16-Y.3-ZT.1
    X.2-Y.4-ZT.1
    X.3-Y.4-ZT.1
    X.4-Y.4-ZT.1
    X.5-Y.4-ZT.1
    X.6-Y.4-ZT.1
    X.8-Y.4-ZT.1
    X.10-Y.4-ZT.1
    X.13-Y.4-ZT.1
    X.14-Y.4-ZT.1
    X.15-Y.4-ZT.1
    X.16-Y.4-ZT.1
    X.2-Y.5-ZT.1
    X.8-Y.5-ZT.1
    X.10-Y.5-ZT.1
    X.2-Y.6-ZT.1
    X.6-Y.6-ZT.1
    X.7-Y.6-ZT.1
    X.8-Y.6-ZT.1
    X.10-Y.6-ZT.1
    X.2-Y.7-ZT.1
    X.6-Y.7-ZT.1
    X.10-Y.7-ZT.1
    X.2-Y.8-ZT.1
    X.3-Y.8-ZT.1
    X.4-Y.8-ZT.1
    X.5-Y.8-ZT.1
    X.6-Y.8-ZT.1
    X.10-Y.8-ZT.1
    X.11-Y.8-ZT.1
    X.12-Y.8-ZT.1
    X.13-Y.8-ZT.1
    X.14-Y.8-ZT.1
    X.15-Y.8-ZT.1
    copy text to room and switch it by command >room 2

    command findPath:
    command findPath begin
    while is brick work
    walk
    *while
    if not is brick then
    left-side
    if is brick then findPath
    else right-side
    *if
    right-side
    if is brick then findPath
    else left-side
    *if
    stop
    *if
    end

     

    Last edit: Viktor Mlej 2020-11-16

Log in to post a comment.