Lego Elevator © LGPL

Give the axis of an inkjet printer a new job.

  • 2,740 views
  • 0 comments
  • 9 respects

Components and supplies

Apps and online services

About this project

Take boredom, open-mindedness and Lego bricks and mix it with an Arduino device, a Sharp distance sensor (2-10 cm) or alternatively, you can also use an Ultrasonic HC-SR04, as well as an axis of a disused inkjet printer/scanner/All-in-one device.

*) In the Lego housing, both the Arduino is made invisible and the axis of the printer is stabilized in the horizontal.

The axis has to be freed of paint residues from the color cartridges. It is better to put on disposable gloves and think of a pad for your desk. Usually, the axis is used horizontally in the printer: in our project, the baskets now transport the Lego helicopter pilots up from the elevator entrance instead of the color. How?The trigger is triggered by the hand: as soon as the Sharp sensor detects the hand, the "elevator" goes down. If the hand is removed from the sensor, it moves upwards.

Technical pictures from DC Motor, axis, Jumper and Shart Distance Sensor:

Lego figures like Batman, elevator passengers, astonished passers-by and trellis standing escorts:

and in action

Spend time with children!

Code

Lego elevatorC/C++
int sharpState = 0;

int EN1 = 5;
int IN1 = 4;

void Motor1(int pwm, boolean reverse) {
analogWrite(EN1, pwm); //set pwm control, 0 for stop, and 255 for maximum speed

if (reverse) {
digitalWrite(IN1, HIGH);
}
else {
digitalWrite(IN1, LOW);
}
}

void setup() {
}

void loop() {

  sharpState = digitalRead(3), BIN;
    
    if (sharpState == HIGH) {
    Motor1(240, true); // play around this values to make it slower/faster
  } else {
    Motor1(100, false);
  }
}

Comments

Similar projects you might like

LEGO Traffic Light

Project showcase by matteoPrada

  • 900 views
  • 0 comments
  • 2 respects

Autobot Using Lego NXT Motors and Sensor

Project tutorial by Mark Tashiro

  • 19,584 views
  • 6 comments
  • 27 respects

Lego Clock-First Build!-I2C LCD-DS3231

Project showcase by Tishin

  • 2,068 views
  • 1 comment
  • 6 respects

Easy Spectrum Display Arduino and Lego

Project in progress by Recon85

  • 1,696 views
  • 0 comments
  • 2 respects

LEGO Wall-E with Arduino

Project tutorial by monsterbacke

  • 25,229 views
  • 14 comments
  • 101 respects

Lego Compatible Name Display

Project tutorial by Lunchbox Electronics

  • 2,616 views
  • 0 comments
  • 6 respects
Add projectSign up / Login