User Tools

Site Tools


test

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
test [2019/08/07 16:03] visentintest [2021/10/06 11:15] (current) – [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
 <code> <code>
-debian@beaglebone:$ rc_test_motors -m 1 -d 1+ost@bblue:$ sudo rc_test_motors -m 1 -d 1
 </code> </code>
 //-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 ''Ctrl-C''. The test program is located in ///usr/bin// and can be run from anywhere. Check this for all 3 motors. //-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 ''Ctrl-C''. The test program is located in ///usr/bin// and can be run from anywhere. Check this for all 3 motors.
 <code> <code>
-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
 </code> </code>
  
 +==== Encoders ====
 +ssh into the BeagleBone blue board and run:
 +<code>
 +ost@bblue:$ sudo rc_test_encoders 
 +</code>
 +If you move the axis you should see encoder values changing. 
 ==== 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 
 <code> <code>
-debian@beaglebone:$ su+ost@bblue:$ su
 </code> </code>
 The password is "root". Change into  The password is "root". Change into 
 <code> <code>
-root@beaglebone:$ cd /sys/class/gpio+root@bblue:$ cd /sys/class/gpio
 </code> </code>
 and add the pins involved to the gpio array with and add the pins involved to the gpio array with
 <code> <code>
-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
 </code> </code>
 The blue led should light up with  The blue led should light up with 
 <code> <code>
-root@beaglebone:$ echo out > gpio98/direction +root@bblue:$ echo out > gpio98/direction 
-root@beaglebone:$ echo 1 > gpio98/value+root@bblue:$ echo 1 > gpio98/value
 </code> </code>
 and stop lighting with and stop lighting with
 <code> <code>
-root@beaglebone:$ echo 0 > gpio98/value+root@bblue:$ echo 0 > gpio98/value
 </code> </code>
 Do the same with the red led Do the same with the red led
 <code> <code>
-root@beaglebone:$ echo out > gpio49/direction +root@bblue:$ echo out > gpio49/direction 
-root@beaglebone:$ echo 1 > gpio49/value +root@bblue:$ echo 1 > gpio49/value 
-root@beaglebone:$ echo 0 > gpio49/value+root@bblue:$ echo 0 > gpio49/value
 </code> </code>
 And the green led And the green led
 <code> <code>
-root@beaglebone:$ echo out > gpio116/direction +root@bblue:$ echo out > gpio116/direction 
-root@beaglebone:$ echo 1 > gpio116/value +root@bblue:$ echo 1 > gpio116/value 
-root@beaglebone:$ echo 0 > gpio116/value+root@bblue:$ echo 0 > gpio116/value
 </code> </code>
 Read the state of the blue button with Read the state of the blue button with
 <code> <code>
-root@beaglebone:$ echo in > gpio97/direction +root@bblue:$ echo in > gpio97/direction 
-root@beaglebone:$ cat gpio97/value+root@bblue:$ cat gpio97/value
 </code> </code>
 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
 <code> <code>
-root@beaglebone:$ echo in > gpio57/direction +root@bblue:$ echo in > gpio57/direction 
-root@beaglebone:$ cat gpio57/value+root@bblue:$ cat gpio57/value
 </code> </code>
 And the green button And the green button
 <code> <code>
-root@beaglebone:$ echo in > gpio113/direction +root@bblue:$ echo in > gpio113/direction 
-root@beaglebone:$ cat gpio113/value+root@bblue:$ cat gpio113/value
 </code> </code>
 Exit root mode with Exit root mode with
 <code> <code>
-root@beaglebone:$ exit+root@bblue:$ exit
 </code> </code>
- 
-==== Encoders ==== 
- 
  
 ==== Mouse ==== ==== Mouse ====
  
 +Connect the mouse and check under /dev/input which event is associated to the mouse. You can list the devices with 'ls' before and after you plug the mouse. The device associated to the mouse should be event1. 
 +If the event is available, you can type following on the terminal: 
  
 +<code>
 +sudo cat /dev/input/event1
 +</code>
 +
 +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
 <code> <code>
-debian@beaglebone:$ rc_test_encoders +ost@bblue:$ rc_test_encoders 
 </code> </code>
 on your target. When raising the TCP the encoder values should be positive. Change each negative encoder in the //HwConfigBBBlue.json// from on your target. When raising the TCP the encoder values should be positive. Change each negative encoder in the //HwConfigBBBlue.json// from
Line 110: Line 120:
 Check the encoder and gear values and adjust them if necessary. You can change //HwConfigBBBlue.json// on the host before deploying to the target or on the target directly. Check the encoder and gear values and adjust them if necessary. You can change //HwConfigBBBlue.json// on the host before deploying to the target or on the target directly.
 After that you can run the Delta application. After that you can run the Delta application.
-<code> 
-debian@beaglebone:$ cd /opt/eeros/bin 
-debian@beaglebone:$ sudo ./delta -c HwConfigBBBlue.json 
-</code> 
- 
  
 ---- ----
-**Next: [[run|]] **+**Next: [[deploy|]]**
test.1565186637.txt.gz · Last modified: 2019/08/07 16:03 by visentin