this is the project about the arduino which controls the machine up and down.
Download the zip from GitHub - IRremote and add to the Arduino IDLE library.
Connect the IR receiver to pin 11
on the Arduion board and upload readIR.ino
Open the serial monitor
in IDLE, then press the up
and down
button on the IR Controller. The result will show on the monitor window.
Copy the hex code get from Step 2
and paste it in sketch.ino
.
Upload the code and open serial monitor
. If everything correct, it will print "Motor up/down" signal.
Connect the motor up pin
to 9 and down pin
to 10. Pressing the button on IR Controller and see whether the motor moves.
Move the motor to one side, pressing up
botton and starting the timer. When the motor stop on the other side, stop and read the timer.
Paste the data get from Step 2 and Step 5 into the sketch_with_timer.ino
, upload it and see whether it runs well.