Meccanoid LEDs

Meccanoid LEDs are available from Meccano. They actually contain two full-colour LEDs that may be lit in one of eight different colours.

Meccanoid LED

Up to four Meccanoid Servos, or up to three Meccanoid Servos and one Meccanoid LED, may be connected in a chain to any of the digital pins on your Arduino/Genuino Uno or Mega, labelled 2-13 on the Uno and 2-53 on the Mega, as shown in this example:

Meccanoid circuit diagram

If you are connecting several Meccanoid devices to your Arduino/Genuino Uno or Mega, you will probably need to power them from a separate 5V DC regulated power supply. When adding Meccanoid devices to an existing chain, always turn the power off and on again (and press the Reset button on your Arduino/Genuino Uno or Mega) to allow them to be initialised.

The MECControl shop stocks a Meccanoid Devices Lead which has built-in resistors so that you may connect a chain of Meccanoid devices directly to your Arduino/Genuino Uno or Mega without soldering using the pins attached to the lead, and then control them from MECControl.

Once a chain of Meccanoid devices that includes a Meccanoid LED is connected to your Arduino/Genuino Uno or Mega, use the Connect command to give it a name and tell MECControl which pin it is connected to:

Connect Eyes MeccanoidLED To Pin 3

In this example, a MeccanoidLED named Eyes has been connected to the digital pin labelled 3. You can then refer to the LED by name in later commands, as in this example:

Light Eyes

This will light the Eyes LED in its default colour. You can also choose the colour you desire:

Light Eyes Red
Light Eyes Yellow
Light Eyes White
Light Eyes Black

An LED can be lit Black, Red, Green, Blue, Magenta, Yellow, Cyan or White.

Brightness can be specified as one of seven percentages — 0, 20, 40, 50, 60, 80 and 100 percent:

Light Eyes 20 Percent Red

You can also refer to a brightness level stored in a previously defined variable:

Light Eyes Brightness Percent Red

LEDs can fade from their current colour to another over a given period of time:

Fade Eyes To Green Over 2 Seconds

The time period can be specified as one of seven durations — 0.2, 0.5, 0.8, 1, 2, 3, and 4 seconds.

You can also refer to a time period stored in a previously defined variable:

Fade Eyes To Green Over Time Seconds

MECControl won’t wait for the fade to complete, but you can use a Wait command to pause the sequence:

Fade Eyes To Green Over 2 Seconds
Wait For 2 Seconds