pcmola/lego-magic-train
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 https://github.com/jurriaan/Arduino-PowerFunctions .
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
YouTube - Controlling Lego Train By Palm
References
[2] Lego Power Functions Infrared Control for Arduino
Full Explanation Page
Last updated
Was this helpful?