test
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| test [2026/05/20 08:47] – [LEDs and buttons] ursgraf | test [2026/06/03 15:14] (current) – [Mouse] 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:$ sudo rc_test_motors | + | ost@bblue:$ sudo gpioset |
| </ | </ | ||
| - | //-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 '' | + | Open two other shells |
| < | < | ||
| - | ost@bblue:$ sudo rc_test_motors | + | ost@bblue:$ sudo gpioset |
| - | ost@bblue:$ sudo rc_test_motors | + | </ |
| + | and | ||
| + | < | ||
| + | ost@bblue:$ sudo gpioset | ||
| + | </ | ||
| + | Changing the polarity of MDIR_1A and MDIR_1B will change the direction. In a forth shell, configure the pwm signal as follows: | ||
| + | < | ||
| + | ost@bblue:$ echo 0 | sudo tee / | ||
| + | ost@bblue:$ echo 1000000 | sudo tee / | ||
| + | ost@bblue:$ echo 500000 | sudo tee / | ||
| + | ost@bblue:$ echo 1 | sudo tee / | ||
| </ | </ | ||
| + | Check the second motor with | ||
| + | < | ||
| + | ost@bblue:$ sudo gpioset -c gpiochip0 MDIR_2A=1 | ||
| + | </ | ||
| + | and | ||
| + | < | ||
| + | ost@bblue:$ sudo gpioset -c gpiochip3 MDIR_2B=0 | ||
| + | </ | ||
| + | Changing the polarity of MDIR_2A and MDIR_2B will change the direction. In a forth shell, configure the pwm signal as follows: | ||
| + | < | ||
| + | ost@bblue:$ echo 1 | sudo tee / | ||
| + | ost@bblue:$ echo 1000000 | sudo tee / | ||
| + | ost@bblue:$ echo 500000 | sudo tee / | ||
| + | ost@bblue:$ echo 1 | sudo tee / | ||
| + | </ | ||
| + | |||
| + | Check the third motor with | ||
| + | < | ||
| + | ost@bblue:$ sudo gpioset -c gpiochip1 MDIR_3A=1 | ||
| + | </ | ||
| + | and | ||
| + | < | ||
| + | ost@bblue:$ sudo gpioset -c gpiochip1 MDIR_3B=0 | ||
| + | </ | ||
| + | Changing the polarity of MDIR_3A and MDIR_3B will change the direction. In a forth shell, configure the pwm signal as follows: | ||
| + | < | ||
| + | ost@bblue:$ echo 0 | sudo tee / | ||
| + | ost@bblue:$ echo 1000000 | sudo tee / | ||
| + | ost@bblue:$ echo 500000 | sudo tee / | ||
| + | ost@bblue:$ echo 1 | sudo tee / | ||
| + | </ | ||
| ==== Encoders ==== | ==== Encoders ==== | ||
| - | ssh into the BeagleBone blue board and enable | + | Enable |
| < | < | ||
| ost@bblue:$ echo 1 | sudo tee / | ost@bblue:$ echo 1 | sudo tee / | ||
| - | ost@bblue:$ echo 1 | sudo tee / | + | ost@bblue:$ echo 1 | sudo tee / |
| - | ost@bblue:$ echo 1 | sudo tee / | + | ost@bblue:$ echo 1 | sudo tee / |
| </ | </ | ||
| - | 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 / | ost@bblue:$ watch -n 0.5 cat / | ||
| Line 27: | Line 67: | ||
| </ | </ | ||
| If you move the axis you should see counter values changing. | If you move the axis you should see counter values changing. | ||
| + | |||
| ==== 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 with | + | The blue led should light up on pin GPIO3_2 |
| < | < | ||
| - | ost@bblue:$ sudo gpioset -c gpiochip0 2=1 | + | ost@bblue:$ sudo gpioset -c gpiochip2 GPIO3_2=1 |
| </ | </ | ||
| - | Do the same with the red led | + | Do the same with the red led on pin GPIO1_17 |
| < | < | ||
| - | ost@bblue:$ sudo gpioset -c gpiochip0 | + | ost@bblue:$ sudo gpioset -c gpiochip0 |
| </ | </ | ||
| - | And the green led | + | And the green led on pin GPIO3_20 |
| < | < | ||
| - | ost@bblue:$ sudo gpioset -c gpiochip2 | + | ost@bblue:$ sudo gpioset -c gpiochip2 |
| </ | </ | ||
| Read the state of the blue button with | Read the state of the blue button with | ||
| < | < | ||
| - | ost@bblue:$ sudo gpioget -c gpiochip2 | + | ost@bblue:$ sudo gpioget -c gpiochip2 |
| </ | </ | ||
| When the button is pressed it will return //" | When the button is pressed it will return //" | ||
| < | < | ||
| - | ost@bblue:$ sudo gpioget -c gpiochip0 | + | ost@bblue:$ sudo gpioget -c gpiochip0 |
| </ | </ | ||
| And the green button | And the green button | ||
| < | < | ||
| - | ost@bblue:$ sudo gpioget -c gpiochip2 | + | ost@bblue:$ sudo gpioget -c gpiochip2 |
| </ | </ | ||
| Line 60: | Line 101: | ||
| < | < | ||
| - | sudo cat /dev/input/event1 | + | sudo cat /dev/input/event0 |
| </ | </ | ||
| If you move the mouse you should see some characters on the screen. This shows that the mouse inputs are received by the BBBlue. | If you move the mouse you should see some characters on the screen. This shows that the mouse inputs are received by the BBBlue. | ||
| + | |||
| ===== Adjust Hardware Configuration File ===== | ===== Adjust Hardware Configuration File ===== | ||
| - | Check the direction of the encoders. Lower your TCP and run | + | Check the direction of the encoders. Lower your TCP and run watch your encoder values.When raising the TCP the encoder values should be positive. Change each negative encoder in the // |
| - | < | + | |
| - | ost@bblue:$ rc_test_encoders | + | |
| - | </ | + | |
| - | on your target. When raising the TCP the encoder values should be positive. Change each negative encoder in the // | + | |
| < | < | ||
| " | " | ||
test.1779259640.txt.gz · Last modified: by ursgraf
