OGEL: LEGO Mindstorm Controller Language - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

OGEL: LEGO Mindstorm Controller Language

Description:

Textual language removes the graphical metaphors that limit the type ... Supported by several IDEs (WinNQC, MacNQC, Visual NQC, NQCEdit, Bricx Command Center) ... – PowerPoint PPT presentation

Number of Views:75
Avg rating:3.0/5.0
Slides: 12
Provided by: Gerardo63
Category:

less

Transcript and Presenter's Notes

Title: OGEL: LEGO Mindstorm Controller Language


1
OGELLEGO Mindstorm Controller Language
  • Michael Ching
  • Gerardo Flores
  • Matt Kalish
  • Charles ODonnell
  • May 13, 2003

2
LEGO Mindstorms
  • Robotic architecture that allows one to build
    components from Legos and control sensors and
    motors from a microcontroller
  • Complexity of microcontroller can be chosen
    (Scout, RCX 1.0, RCX 2.0, CyberMaster)
  • Different development environments may be chosen
    that vary from a drag and drop approach to a
    C-syntax based language

3
Not Quite C
  • Targets experienced programmers
  • C syntax and semantics
  • Textual language removes the graphical metaphors
    that limit the type of programs that may be
    written
  • Supported by several IDEs (WinNQC, MacNQC, Visual
    NQC, NQCEdit, Bricx Command Center)
  • Not modular in nature
  • Does not support hierarchy or abstraction of code
  • Questionable event-based support

4
OGEL
  • Designed to support the RCX 1.0 but offers
    support for future firmware (Compatible with 2.0)
  • Merge desirable characteristics of available
    technologies
  • Built scalable hierarchy which improves code
    reuse

5
OGEL (Contd)
  • Able to create code for multiple target
    microcontrollers from one file
  • Improved message passing architecture
  • Improved modularity which leads to a more stable
    hierarchy
  • Allows imbedded self-contained Not Quite C code
  • Permits separation of RCX, task, message, and
    function declarations into library files which
    can be added to any existing code by means of
    include statements

6
Architecture
7
Architecture Discussion
  • 5 Stages Preprocessor, Lexer/Parser,
    Static-Semantic Checking, UNI-OGEL Generator,
    Architectural Translator.
  • Preprocessor include, define, task/function
    order independence

8
Architecture Discussion
  • Lexer/Parser Static-Semantic Checking
  • UNI-OGEL Generator code duplication port
    mapping, source code profiling
  • Architectural Translator any architecture,
    architecture-specific errors discovered (task
    limit, recursion), optimization

9
Testing
  • Testing was done in 3 phases
  • Isolated Module Testing
  • Integration Testing
  • Final Testing

10
Sample OGEL Code
  • define TIME_REV 100
  • message done
  • rcx demo
  • SENSOR_TOUCH hit 1
  • left_motor A
  • right_motor C
  • task go(in hit)(out left_motor, out right_motor)
  • when (hitgt0) do reverse()
  • nqc.OnFwd(left_motor right_motor)
  • void turn()()(out left_motor, out right_motor)
  • nqc.OnRev(left_motor)
  • nqc.OnFwd(right_motor)
  • nqc.Wait(TIME_REV)
  • nqc.Off(left_motor right_motor)
  • throw done

void reverse()()(out left_motor, out right_motor)
nqc.OnRev(left_motor right_motor)
nqc.Wait(TIME_REV) nqc.Off(left_motor
right_motor) turn() task rev_task()(out
left_motor, out right_motor) int x 1
while (x gt 0) catch done reverse()
task main() rcx demo first_born
first_born.addTask(rev_task)
first_born.addTask(go)
11
Watch This Puppy run!
  • Division of Work
  • Front-End Michael Ching / Gerardo Flores
  • Back-End Charles ODonnell
  • Floater, Docs Compilation Matt Kalish
Write a Comment
User Comments (0)
About PowerShow.com