test
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
test [2019/11/13 13:03] – [Adjust Hardware Configuration File] graf | test [2021/10/06 11:14] – [Encoders] ursgraf | ||
---|---|---|---|
Line 4: | Line 4: | ||
Before testing your assembled electronics plug in the 12V DC power supply or the Li-Po battery, otherwise the motors won't run. We will now test each component individually. ssh into the BeagleBone blue board and run | Before testing your assembled electronics plug in the 12V DC power supply or the Li-Po battery, otherwise the motors won't run. We will now test each component individually. ssh into the BeagleBone blue board and run | ||
< | < | ||
- | debian@beaglebone:$ rc_test_motors -m 1 -d 1 | + | ost@bblue:$ sudo rc_test_motors -m 1 -d 1 |
</ | </ | ||
//-m 1// selects the first motor while //-d 1// specifies a duty cycle of 1. The motor should lift its bar. If a motor turns in the opposite direction, change the + and - wire of the motor. You can stop the program by pressing '' | //-m 1// selects the first motor while //-d 1// specifies a duty cycle of 1. The motor should lift its bar. If a motor turns in the opposite direction, change the + and - wire of the motor. You can stop the program by pressing '' | ||
< | < | ||
- | debian@beaglebone:$ rc_test_motors -m 2 -d 1 | + | ost@bblue:$ sudo rc_test_motors -m 2 -d 1 |
- | debian@beaglebone:$ rc_test_motors -m 3 -d 1 | + | ost@bblue:$ sudo rc_test_motors -m 3 -d 1 |
</ | </ | ||
==== Encoders ==== | ==== Encoders ==== | ||
- | Ssh into the BeagleBone blue board and run: | + | ssh into the BeagleBone blue board and run: |
< | < | ||
- | debian@beaglebone:$ rc_test_encoders | + | ost@bblue:$ sudo rc_test_encoders |
</ | </ | ||
- | If you move the axis you should see encoder values changing. | + | If you move the axis you should see encoder values changing. Lifting the bar must lead to decreasing encoder positions. If not, switch A and B signals of the encoder or change sign in the hardware configuration file. |
==== LEDs and buttons ==== | ==== LEDs and buttons ==== | ||
Next we want to check if all leds and buttons work as desired. Change to root mode | Next we want to check if all leds and buttons work as desired. Change to root mode | ||
< | < | ||
- | debian@beaglebone:$ su | + | ost@bblue:$ su |
</ | </ | ||
The password is " | The password is " | ||
< | < | ||
- | root@beaglebone:$ cd / | + | root@bblue:$ cd / |
</ | </ | ||
and add the pins involved to the gpio array with | and add the pins involved to the gpio array with | ||
< | < | ||
- | root@beaglebone:$ echo 49 > export | + | root@bblue:$ echo 49 > export |
- | root@beaglebone:$ echo 57 > export | + | root@bblue:$ echo 57 > export |
- | root@beaglebone:$ echo 97 > export | + | root@bblue:$ echo 97 > export |
- | root@beaglebone:$ echo 98 > export | + | root@bblue:$ echo 98 > export |
- | root@beaglebone:$ echo 113 > export | + | root@bblue:$ echo 113 > export |
- | root@beaglebone:$ echo 116 > export | + | root@bblue:$ echo 116 > export |
</ | </ | ||
The blue led should light up with | The blue led should light up with | ||
< | < | ||
- | root@beaglebone:$ echo out > gpio98/ | + | root@bblue:$ echo out > gpio98/ |
- | root@beaglebone:$ echo 1 > gpio98/ | + | root@bblue:$ echo 1 > gpio98/ |
</ | </ | ||
and stop lighting with | and stop lighting with | ||
< | < | ||
- | root@beaglebone:$ echo 0 > gpio98/ | + | root@bblue:$ echo 0 > gpio98/ |
</ | </ | ||
Do the same with the red led | Do the same with the red led | ||
< | < | ||
- | root@beaglebone:$ echo out > gpio49/ | + | root@bblue:$ echo out > gpio49/ |
- | root@beaglebone:$ echo 1 > gpio49/ | + | root@bblue:$ echo 1 > gpio49/ |
- | root@beaglebone:$ echo 0 > gpio49/ | + | root@bblue:$ echo 0 > gpio49/ |
</ | </ | ||
And the green led | And the green led | ||
< | < | ||
- | root@beaglebone:$ echo out > gpio116/ | + | root@bblue:$ echo out > gpio116/ |
- | root@beaglebone:$ echo 1 > gpio116/ | + | root@bblue:$ echo 1 > gpio116/ |
- | root@beaglebone:$ echo 0 > gpio116/ | + | root@bblue:$ echo 0 > gpio116/ |
</ | </ | ||
Read the state of the blue button with | Read the state of the blue button with | ||
< | < | ||
- | root@beaglebone:$ echo in > gpio97/ | + | root@bblue:$ echo in > gpio97/ |
- | root@beaglebone:$ cat gpio97/ | + | root@bblue:$ cat gpio97/ |
</ | </ | ||
Repeat the last command with the button pressed. Do the same with the red button | Repeat the last command with the button pressed. Do the same with the red button | ||
< | < | ||
- | root@beaglebone:$ echo in > gpio57/ | + | root@bblue:$ echo in > gpio57/ |
- | root@beaglebone:$ cat gpio57/ | + | root@bblue:$ cat gpio57/ |
</ | </ | ||
And the green button | And the green button | ||
< | < | ||
- | root@beaglebone:$ echo in > gpio113/ | + | root@bblue:$ echo in > gpio113/ |
- | root@beaglebone:$ cat gpio113/ | + | root@bblue:$ cat gpio113/ |
</ | </ | ||
Exit root mode with | Exit root mode with | ||
< | < | ||
- | root@beaglebone:$ exit | + | root@bblue:$ exit |
</ | </ | ||
Line 84: | Line 84: | ||
< | < | ||
- | cat / | + | sudo cat / |
</ | </ | ||
Line 91: | Line 91: | ||
Check the direction of the encoders. Lower your TCP and run | Check the direction of the encoders. Lower your TCP and run | ||
< | < | ||
- | debian@beaglebone:$ rc_test_encoders | + | ost@bblue:$ rc_test_encoders |
</ | </ | ||
on your target. When raising the TCP the encoder values should be positive. Change each negative encoder in the // | on your target. When raising the TCP the encoder values should be positive. Change each negative encoder in the // | ||
Line 123: | Line 123: | ||
---- | ---- | ||
- | **Next: | + | **Next: |
test.txt · Last modified: 2021/10/06 11:15 by ursgraf