To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 3837
3836  |  3838
Subject: 
Re: remote
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Mon, 8 Nov 2004 01:21:38 GMT
Viewed: 
6514 times
  
In lugnet.robotics.rcx.legos, Chris Daniel wrote:
Hello, I’m just recently getting back into playing with Legos.  I bought my
first house and had to fix it up before I could play.  BrickOS was a lot easier
to get into this time around thanks to BricxCC.  BrickOS itself is better
documented and has new features namely support of the Lego remote.  Which brings
me to my question how do I use it inside my program?  This code is a simplified
version of code that I wrote to control motor speed and direction on my marble
rail. I would like to implement code that every time LRKEY_A1 is pressed rc_b +=
1 and every time LRKEY_A2 += -1. Any help or push in the right direction would
be greatly appreciated. Thanks in advance Chris

Hi Chris,

The remote control code now resides in remote.h
http://cvs.sourceforge.net/viewcvs.py/brickos/brickos/include/remote.h?view=markup
and basically comes down to defining a callback function which gets called when
any remote key is pressed or released. I haven't kept up with the development,
but there is an early example of it's use here:
http://www.brickshelf.com/gallery/RoscoHead/towercrane/programming/crane2.c

HTH

ROSCO

NOTE: This code could be tidied up A LOT - it was just a quick hack really.



Message is in Reply To:
  remote
 
Hello, I’m just recently getting back into playing with Legos. I bought my first house and had to fix it up before I could play. BrickOS was a lot easier to get into this time around thanks to BricxCC. BrickOS itself is better documented and has new (...) (20 years ago, 8-Nov-04, to lugnet.robotics.rcx.legos)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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