Lego scheme
This presentation is the property of its rightful owner.
Sponsored Links
1 / 8

Lego/Scheme PowerPoint PPT Presentation


  • 68 Views
  • Uploaded on
  • Presentation posted in: General

Lego/Scheme. By Rusty Burchfield and Brent Hepburn. Background. Limited implementation of Scheme for the standard firmware Developed at Indiana University by three CS undergraduates Developed start to finish in three days. Environment. Petite Chez Scheme 6.1 LegoScheme compiler

Download Presentation

Lego/Scheme

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Lego scheme

Lego/Scheme

By Rusty Burchfield and Brent Hepburn

LEGO name and Symbol are registered trademarks of the LEGO Group.


Background

Background

  • Limited implementation of Scheme for the standard firmware

  • Developed at Indiana University by three CS undergraduates

  • Developed start to finish in three days

LEGO name and Symbol are registered trademarks of the LEGO Group.


Environment

Environment

  • Petite Chez Scheme 6.1

    • LegoScheme compiler

    • LegoScheme source

  • Lego Mindcontrol

    • Visual Basic output from LegoScheme

LEGO name and Symbol are registered trademarks of the LEGO Group.


Features

Features

  • 10 concurrent tasks

  • Support for most built-in scheme functions

  • Support for lambda definitions

  • Functions defined for direct interaction with RCX

LEGO name and Symbol are registered trademarks of the LEGO Group.


Limitations

Limitations

  • Requires Lego Mindcontrol

  • Tail-recursive ONLY and without parameters

  • Limited support for bindings

  • Only 8 functions

  • Only 30 signed integers available

  • Concurrency issues

LEGO name and Symbol are registered trademarks of the LEGO Group.


Example

(define task_zero

(lambda ()

(setup-sensor 1 'reflection 'percent)

(set-engine-direction "02" 'forward)

(set-engine-speed "02" 4)

(set-engine-on/off "02" 'on)

(task_one)

(task_two)

(task_three)))

(define task_one

(lambda ()

(let ((x (read-from-sensor 0)) (y (read-from-sensor 2)))

(if (= x #t)

(set-engine-on/off "02" 'off))

(if (= y #t)

(flip-engine-direction "02"))

(task_one))))

(define task_two

(lambda ()

(wait 500)

(flip-engine-direction "0")

(wait 200)

(flip-engine-direction "0")

(wait 500)

(flip-engine-direction "2")

(wait 200)

(flip-engine-direction "2")

(task_two))

(define task_three

(lambda ()

(let ((z (read-from-sensor 1)))

(if (> z 50) (play-system-sound 'fast-slide-up) (task_three)))))

Example

LEGO name and Symbol are registered trademarks of the LEGO Group.


Conclusion

Conclusion

  • Difficult to use

    • Many restrictions

    • Hard to setup

  • Lacking the power of Scheme

LEGO name and Symbol are registered trademarks of the LEGO Group.


Resources

Resources

  • References

    • http://www.cs.indiana.edu/~mtwagner/legoscheme/

    • http://home.zonnet.nl/ericbrok/legomind/projects/robo/mindcontrol.htm

  • More Information

    • http://www.cs.rit.edu/~bah5108/

LEGO name and Symbol are registered trademarks of the LEGO Group.


  • Login