This is the mirror repository. Original repository is hosted under:
LEGO Power Functions IR RC Library
Let's assume you already assembled your favorite rover, railway or a robot using LEGO power functions. You might have used up to 8 motors, servos or LEDs. Every of 4 receivers is tuned to one of 4 channels and can be used to control 2 actuators. Controlling
all that requires 4 IR transmitters or .. a Netduino + 1 x IR LED and this library.
Using this library is as simple a building LEGO.
Q: What is LEGO Power Functions?
- You need a Netduino hardware
- .NET Micro Framework development environment
An Infrared LED and an appropriate resistor
Add LegoRC.Net NuGet package to your project. Or alternatively clone this repository and add the project
Lego.PowerFunctions.csproj to your solution.
How to connect
This trivial circuit will work with most of IR LEDs and for short distances. For longer distances you would probably need a better circuit. See: Infrared
transmitter driver for Netduino.
How to use
Using this library is literally like building you LEGO vehicle. Like in the reality you are putting components together. Components which won't work together don't fit together.
public static void Main()
using (var transmitter = new Transmitter())
var receiverTrain = new Receiver(transmitter, Channel.Ch1);
var motor = new Motor(receiverTrain.RedConnector);
var light = new Led(receiverTrain.RedConnector);
//Rover on another channel
var receiverRover = new Receiver(transmitter, Channel.Ch2);
var drive = new Motor(receiverRover.BlueConnector);
var steeringWheel = new Servo(receiverRover.RedConnector);