You are viewing an older revision! See the latest version

m3pi logo

An introduction to logo

Aims of the m3pi-logo project

This page will be devoted to the development and advancement of the m3pi robot for use with the logo functional programming language. The aim will be to control the full functionality of the m3pi robot through a text file that can be located on a flash/thumb drive. Users can simply write their code into the text file from a computer and then run it on the m3pi. I hope to keep what code is recognised and understood and indeed what is used as similar to the actual Logo language as possible so that it may be used as a more physical demonstration for those that studying or are looking to study the language. However there may be a few new additions...

Basic Logo language

The commands set forth are simple to understand and need nothing in the way of conventional programmers understanding. The object that is doing the actual moveing has become known as the Turtle through visualization and debugging software.

  • FORWARD 100
    • This makes the 'turtle' move forward 100 units (in this case, centimetres)
  • BACKWARD 100
    • This makes it move backward 100 units
  • RIGHT 90
    • A rotation to the right 90° although at present i have narrowed down the precise accuracy to within 5° to 10°
  • LEFT 20
    • A rotation to the left by 20°
  • REPEAT 4 [FORWARD 10 RIGHT 90]
    • This will repeat anything within the brackets the number of times stated outside (in this case, repeat the commands forward 10cm and right 90° four times)

Above is stated the commands that exist already in Logo, but we have some more things we can do, what with being a robot and all...

  • BUZZER 100
    • This will make the yet unused (and undisclosed) buzzer on the m3pi make a sound at the intended frequency.
    • NOTE there is no time limit to this, but your m3pi will not move or function whilst making the sound.
  • BUZZER 0
    • This will turn the buzzer off, and allow normal operation of the m3pi to resume

All wikipages