CS 102B Robot Design Tuesday, 12704 - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

CS 102B Robot Design Tuesday, 12704

Description:

leJOS = Lego Java Operating System ... Permits Lego programming in the Java programming language ... Permits up to 255 threads (versus 10 for Lego firmware!) But ... – PowerPoint PPT presentation

Number of Views:56
Avg rating:3.0/5.0
Slides: 9
Provided by: Mathematic53
Category:
Tags: 102b | design | lego | robot | tuesday

less

Transcript and Presenter's Notes

Title: CS 102B Robot Design Tuesday, 12704


1
CS 102B Robot DesignTuesday, 12/7/04
  • Todays Class
  • Return Exam 2
  • Discuss Final Project
  • Correction to DFS and HC navigation programs
  • Intro to Java for Legos and leJOS

2
Mindstorms Software Architecture
  • System ROM Layer
  • Low Level Control Software
  • Allows a second piece of software - the firmware
  • Can be bypassed for direct control of the
    hardware
  • Lego Firmware v. 2.0 permits
  • 5 separate programs
  • 10 threads (concurrent tasks)
  • 32 global variables
  • 16 local variables per thread
  • Broadcast IR protocol

Typical Software Architecture Levels
3
Alternative Firmware/Languages
  • Firmware replacements further push the limits of
    the RCX
  • Examples
  • BrickOS
  • Environment for C programming, plus includes
    NQC (C language), and can be adapted to
    accommodate other languages, such as
  • see http//brickos.sourceforge.net
  • LejOS (Java)
  • see http//lejos.sourceforge.net/
  • RCXLisp (Lisp)
  • Part of the LMICSE project
  • See http//robotics.csc.villanova.edu/

4
What is leJOS (and how do you pronounce it?!)
  • leJOS Lego Java Operating System
  • Pronounce either leh-joase or leh-hoase
    (original designer named Jose)
  • Permits Lego programming in the Java programming
    language
  • Like NQC, it is free, open-source code
  • Unlike NQC, it uses its own firmware, which
    replaces the RCX firmware

5
Differences between leJOS and NQC
  • More RCX memory available for programs
  • leJOS firmware is smaller than RCX firmware
  • Can directly program RCX buttons
  • Programs can print on the RCX screen
  • Has floating-point numbers (numbers with
    fractional parts)
  • Permits RCX to do accurate algebraic and
    trigonometric calculations
  • Has arrays indexed lists of numbers
  • Permits up to 255 threads (versus 10 for Lego
    firmware!)
  • But NQC probably has better ease of use than
    any other full-featured lego robotics language
    available today

6
Programming Language Paradigms
  • A programming language paradigm is a philosophy
    underlying the design of a programming language,
    that affects the way you approach problem-solving
    using that language.
  • Modular design Essentially all modern languages
    are modular complex programs are built up out
    of smaller program modules
  • Special purpose libraries of program modules are
    made available to make it easier to program
    things like graphics, database processing, etc.

7
Programming Paradigms of RCX code, NQC, leJOS
  • RCX code is iconic
  • Programs are built using visual, graphical
    pieces, rather than instructions written in
    narrative language
  • NQC is procedural
  • A program module is a viewed as a sequence of
    commands to be executed
  • Java, C (hence leJOS) are OOP languages
  • OOP Object-oriented programming
  • Program modules are viewed as entities or
    objects that have properties and abilities, and
    the objects are programmed to work together to
    solve a problem.

8
IDEs for leJOS programming
  • IDE Integrated Development Environment
  • All-in-one software package providing editor,
    compiler, program execution (or download to
    robot), debugging
  • Examples Lego Mindstorms software, BricxCC
  • leJOS IDEs
  • Any Java IDE can be adapted to permit leJOS
    programs
  • BricxCC can be adapted to permit both NQC and
    leJOS programs but no color-coding for leJOS!
  • JCreator Lite free online IDE provides nice
    environment for leJOS programming (color-coding,
    automatic completion of brackets, auto-indent,
    etc.)
Write a Comment
User Comments (0)
About PowerShow.com