test
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| test [2021/03/31 18:25] – [Motors] ursgraf | test [2026/05/20 11:35] (current) – 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 | ||
| < | < | ||
| - | ost@bblue:$ rc_test_motors -m 1 -d 1 | + | ost@bblue: |
| </ | </ | ||
| //-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 '' | ||
| < | < | ||
| - | ost@bblue:$ rc_test_motors -m 2 -d 1 | + | ost@bblue: |
| - | ost@bblue:$ rc_test_motors -m 3 -d 1 | + | ost@bblue: |
| </ | </ | ||
| ==== Encoders ==== | ==== Encoders ==== | ||
| - | Ssh into the BeagleBone blue board and run: | + | Enable |
| < | < | ||
| - | debian@beaglebone:$ rc_test_encoders | + | ost@bblue:$ echo 1 | sudo tee / |
| + | ost@bblue:$ echo 1 | sudo tee / | ||
| + | ost@bblue:$ echo 1 | sudo tee / | ||
| </ | </ | ||
| - | If you move the axis you should see encoder | + | The counter0 does not have to be enabled. Then watch the counters with |
| + | < | ||
| + | ost@bblue:$ watch -n 0.5 cat / | ||
| + | ost@bblue:$ watch -n 0.5 cat / | ||
| + | ost@bblue:$ watch -n 0.5 cat / | ||
| + | ost@bblue:$ watch -n 0.5 cat / | ||
| + | </ | ||
| + | If you move the axis you should see counter | ||
| ==== LEDs and buttons ==== | ==== LEDs and buttons ==== | ||
| - | Next we want to check if all leds and buttons work as desired. | + | Next we want to check if all leds and buttons work as desired. |
| + | The blue led should light up on pin GPIO3_2 with | ||
| < | < | ||
| - | debian@beaglebone:$ su | + | ost@bblue:$ sudo gpioset -c gpiochip2 2=1 |
| </ | </ | ||
| - | The password is " | + | Do the same with the red led on pin GPIO1_17 |
| < | < | ||
| - | root@beaglebone:$ cd / | + | ost@bblue:$ sudo gpioset -c gpiochip0 17=1 |
| </ | </ | ||
| - | and add the pins involved to the gpio array with | + | And the green led on pin GPIO3_20 |
| < | < | ||
| - | root@beaglebone:$ echo 49 > export | + | ost@bblue:$ sudo gpioset -c gpiochip2 20=1 |
| - | root@beaglebone: | + | |
| - | root@beaglebone: | + | |
| - | root@beaglebone: | + | |
| - | root@beaglebone: | + | |
| - | root@beaglebone: | + | |
| - | </ | + | |
| - | The blue led should light up with | + | |
| - | < | + | |
| - | root@beaglebone: | + | |
| - | root@beaglebone: | + | |
| - | </ | + | |
| - | and stop lighting with | + | |
| - | < | + | |
| - | root@beaglebone: | + | |
| - | </ | + | |
| - | Do the same with the red led | + | |
| - | < | + | |
| - | root@beaglebone: | + | |
| - | root@beaglebone: | + | |
| - | root@beaglebone: | + | |
| - | </ | + | |
| - | And the green led | + | |
| - | < | + | |
| - | root@beaglebone: | + | |
| - | root@beaglebone: | + | |
| - | root@beaglebone: | + | |
| </ | </ | ||
| Read the state of the blue button with | Read the state of the blue button with | ||
| < | < | ||
| - | root@beaglebone:$ echo in > gpio97/ | + | ost@bblue:$ sudo gpioget -c gpiochip2 1 |
| - | root@beaglebone: | + | |
| </ | </ | ||
| - | Repeat the last command with the button pressed. Do the same with the red button | + | When the button |
| < | < | ||
| - | root@beaglebone:$ echo in > gpio57/ | + | ost@bblue:$ sudo gpioget -c gpiochip0 25 |
| - | root@beaglebone: | + | |
| </ | </ | ||
| And the green button | And the green button | ||
| < | < | ||
| - | root@beaglebone:$ echo in > gpio113/ | + | ost@bblue:$ sudo gpioget -c gpiochip2 17 |
| - | root@beaglebone: | + | |
| - | </ | + | |
| - | Exit root mode with | + | |
| - | < | + | |
| - | root@beaglebone: | + | |
| </ | </ | ||
| Line 91: | Line 68: | ||
| 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 // | ||
test.1617207937.txt.gz · Last modified: by ursgraf
