Tag Archives: pBrick2pBrick

Controlling a MicroScout from an RCX using VLL

The MicroScout brick has one motor, a light sensor, display and can make R2D2-like beepy noises. It has 7 built-in programs, and a mysterious “P” mode in which it can be respond to external commands and can even be programmed via the light sensor. LEGO calls this Visible Light Link (VLL), and it has been used in other bricks as well, like the Code Pilot.

So I decided to hook up a standard LEGO 9v Light 2×1 brick to one of the OUT ports on my RCX, and see if I could get it to work. Here is the setup (and my first attempt at Leocad):rcxvll building instructionsThe lamp doesn’t really show up well in the above picture, but it’s simply one of these.

Continue reading

Share

Controlling a Spybotics pbrick using an RCX

The LEGO MindStorms RCX is capable of sending remote control IR signals to a LEGO Spybotics brick. This opens up a ton of new possibilities, essentially giving the RCX access to two more motors (theoretically even six as you can control up to three Spybotics over different channels).

The RCX has been set up real simply with three touch sensors, one for left, one forward and one right. The programming is made pretty easy using NQC:

task main()
{
  /* Set all three Sensor types to Touch sensors */
  SetSensorType(SENSOR_1, SENSOR_TYPE_TOUCH);
  SetSensorType(SENSOR_2, SENSOR_TYPE_TOUCH);
  SetSensorType(SENSOR_3, SENSOR_TYPE_TOUCH);

  /* Set infrared power to High, so we can cover longer distance. */
  SetTxPower(TX_POWER_HI);

  while(true) // Loop forever
  {
    if (SensorValue(0)==1) //button 1 pressed
    {
      SendRCMessage(RC_CHANNEL_1, RC_CMD_REV, RC_CMD_FWD);
    }
    if (SensorValue(1)==1) //button2 pressed
    {
      SendRCMessage(RC_CHANNEL_1, RC_CMD_FWD, RC_CMD_FWD);
    }
    if (SensorValue(2)==1) //button3 pressed
    {
      SendRCMessage(RC_CHANNEL_1, RC_CMD_FWD, RC_CMD_REV);
    }
    Wait(5);
  }
}

This of course assumes your Spybotics brick has been configured to RC channel 1. Download the program: rcx2spy_remote.nqc

Share