To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 13501
13500  |  13502
Subject: 
Opening RCX Code programs in Web Browser gives text
Newsgroups: 
lugnet.robotics, lugnet.robotics.rcx
Date: 
Sun, 17 Dec 2000 01:49:54 GMT
Viewed: 
728 times
  
I don't know if this has already been discovered a dozen times before (I
would search to find out, but the text search cgi is down!)... but I just
found something cool.

If you put a link to any RCX Code program with a .rcx extension in a web
browser and click on that link, a text version of that program comes up in
the browser.  Pretty nifty.  Here is the result of one of my programs in my
up and coming book, Creative Projects with LEGO Mindstorms.  I found this
cool feature while QA-ing my CD-ROM, which is filled with example programs,
movies, and instructions.

and here is a little plug for the book:
http://shop.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=0201708957

This program is for the Flashlight Follower.

PROGTXT1Â// Flashlight2.rcx

#source RIS1.5
#target RCX

main [
  sensor s1 on 1
  output motorA on 1
  output motorB on 2
  output motorC on 3
  forward [motorA motorB motorC]
  power [motorA motorB motorC] 7
  s1 is light as percent
  start progTask
  wait 10
  watch s1 [
    when 0..50 [ ]
    when 51..100 [ start task1 ]
  ]
]

task progTask [
  on [motorA motorC]
  forever [
    power [motorA motorC] 0
    forward motorC
    backward motorA
    wait 30
    forward motorA
    backward motorC
    wait 30
  ]
]

task task1
[
  while s1 is 50..100 [
    backward [motorA motorC]
  ]
]

DESCTXT2zRobot's name:

What it looks like:

What it can do:


So the real question is, can someone write a utility that will automatically
translate this code into spirit.ocx usable code, like in Visual Basic, or
translate it into NQC, etc.???  That would be pretty neat.

-Ben



Message has 3 Replies:
  Re: Opening RCX Code programs in Web Browser gives text
 
I should add that this was Internet Explorer 5.5. I just discovered that this does not work with Netscape... although maybe there is some setting that you can do to make it happen. Of course, I could always link the .rcx extension with launching (...) (24 years ago, 17-Dec-00, to lugnet.robotics, lugnet.robotics.rcx)
  Re: Opening RCX Code programs in Web Browser gives text
 
(...) That is not very surprising, as RCX Code is text. So there is no LEGO-awareness in the browser. (...) Yes, they did the right thing using text for storage of programs. Jürgen (24 years ago, 17-Dec-00, to lugnet.robotics, lugnet.robotics.rcx)
  Re: Opening RCX Code programs in Web Browser gives text
 
"Ben Erwin" <ben@alum.mit.edu> wrote in message news:G5ovr6.Jro@lugnet.com... (...) my (...) programs, (...) I don't think the real RCX Code is ever in this text form. You find these text files on the CD, but when you make RCX Code programs they (...) (24 years ago, 18-Dec-00, to lugnet.robotics, lugnet.robotics.rcx)

8 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    
Active threads in Robotics

 
Verified and Trusted Team of Hackers
48 minutes ago
Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR