top of page

[Project] Control a Windmill Linkbot System with Lego Parts


Introduction:

Linkbot can be linked with Lego parts and controlled together with multiple Mindstorms NXT/EV3 bricks in a single program using Linkbot Lego Connection Pack. In this project, a Windmill Linkbot System, with one Linkbot-I and one Linkbot-L with Lego parts, is used as an example to demonstrate how Lego parts can be used as accessories for a Linkbot system.

Information:

  • Grades: 5 – 12

  • Duration: 2-8 Hours

  • Level: Intermediate

Parts Used in the Project:

  • 1 Linkbot-I (used as a moving base)

  • 1 Linkbot-L (used as a rotor)

  • 3 Cube Connector

  • 5 Snap Connector

  • 2 Lego Wheel Connector

  • 2 Lego Wheel

  • 1 Lego Technic Connector

  • 1 Lego windmill

Setup:

As shown in Figure 1, one Linkbot-I is used for the moving base of the windmill. A Linkbot-L is used for the rotor of the windmill. Two Lego wheels are connected using two Barobo Lego Wheel Connectors to Linkbot-I, rather than the Linkbot wheels. The Barobo Lego Technic Connector is used to connect to the Lego Windmill. Cube Connectors are used to elevate the rotor of the windmill.

Figure 1: The configuration with Linkbot-I and Linkbot-L and Lego parts for the Windmill Linkbot System.

Programming the dog in Ch:

A Ch program crane.ch can be used to control this Windmill System. Details for each robot member function for CLinkbotI and ClinkbotL can be found in the textbook “Learning Robot Programming with Linkbot for the Absolute Beginner”. The entire PDF file for this textbook is available in C-STEM Studio.

/* File: windmill.ch

Drive a windmill and spin its rotors.

Wheels and rotors are Lego parts

connected by Lego Wheel Connectors and

Lego Technic Connector */

#include <linkbot.h>

CLinkbotI robot1;

CLinkbotL robot2;

double radius = 1.75;

double trackwidth = 3.69;

// move windmill forward

robot1.driveDistance(5, radius);

// turn windmill base

robot2.move(0, 270, NaN);

// spin rotars

robot2.move(360, 0, NaN);

// move windmill forward as rotar base moves

robot1.driveDistanceNB(15, radius);

robot2.move(0, 360, NaN);

robot1.moveWait();

// turn windmill right as rotors spin

robot1.turnRightNB(120, radius, trackwidth);

robot2.move(180, 0, NaN);

robot1.moveWait();

// move windmill forward as rotars spin and turn side to side

robot1.driveDistanceNB(15, radius);

robot2.move(360, 360, NaN);

robot1.moveWait();

bottom of page