Sample Space
1.0.0
1.0.0
  • Initial page
  • Sample Group
    • Sample Guide
    • Sample API
    • Sample FAQ
    • Sample Changelog
  • Sample External Link
  • Github Import
    • pcmola/lego-magic-train
      • network
        • pcmola/lego-magic-train
        • pcmola/lego-magic-train
      • pcmola/lego-magic-train
      • pcmola/lego-magic-train
      • blob
        • main
          • pcmola/lego-magic-train
          • pcmola/lego-magic-train
          • pcmola/lego-magic-train
      • pcmola/lego-magic-train
      • pcmola/lego-magic-train
      • pcmola/lego-magic-train
      • pcmola/lego-magic-train
      • Build software better, together
      • pcmola/lego-magic-train
      • tree
        • Build software better, together
        • pcmola/lego-magic-train
      • pcmola/lego-magic-train
      • pcmola/lego-magic-train
      • archive
        • refs
          • heads
            • Bad request · GitHub
      • commits
        • pcmola/lego-magic-train
      • pcmola/lego-magic-train
      • pcmola/lego-magic-train
      • graphs
        • pcmola/lego-magic-train
        • pcmola/lego-magic-train
        • pcmola/lego-magic-train
      • pcmola/lego-magic-train
      • pcmola/lego-magic-train
      • stargazers
        • Build software better, together
      • pcmola/lego-magic-train
      • pcmola/lego-magic-train
Powered by GitBook
On this page
  • Using an ultrasonic sensor, I created a piece of moving a LEGO train.
  • Prerequisite
  • Bill Of Materials
  • Circuit
  • Movie
  • References
  • Full Explanation Page

Was this helpful?

  1. Github Import

pcmola/lego-magic-train

imported from https://github.com/pcmola/lego-magic-train

PreviousSample ChangelogNextnetwork

Last updated 4 years ago

Was this helpful?

Using an ultrasonic sensor, I created a piece of moving a LEGO train.

The train speeds up when I put my hand close to the sensor. If I move my hand away from the sensor, it slows down.

Prerequisite

You must have PowerFunctions.cpp, PowerFunctions.h file in advance.

These files could be downloaded at .

Bill Of Materials

Label

Part Type

LED1

Red (633nm) LED

R1

220Ω Resistor

Part1

KY-005 Infrared Transmitter Module

Part2

HC-SR04 Ultrasonic Sensor

Part3

Arduino Uno (Rev3)

Circuit

Movie

References

Full Explanation Page

[1]

[2]

YouTube - Controlling Lego Train By Palm
HC-SR04 Ultrasonic Sensor
Lego Power Functions Infrared Control for Arduino
https://blog.naver.com/pcmola/221195632598
https://github.com/jurriaan/Arduino-PowerFunctions
Image Of Circuit
Snapshot
Snapshot