##Current Project Status
CAD models for the project can be found at https://grabcad.com/library/land-yacht-2015-1/ . Components are mounted, and PWM and encoder control are working. Needs to be done:
- Write some controllers!
- The encoder always starts at 0 (my code has 0 as facing forward), so you need to find a way to make sure the encoder always starts facing forward or doesn't always start from 0.
- Get GPS working with the SPI pins on the BeagleBone (I think it's SPI?).
##Connecting to the BeagleBone Black
A script connect-ssh
has been configured to connect to the BeagleBone using its ethernet adapter MAC address. Run ./connect-ssh <user>
to use the script.
##Setting up the BeagleBone Black
-
Install Debian 7.9 image to SD card.
-
Set device IP to static (currently 192.168.0.105).
-
Set up users as shown in
info
file. -
git clone
this repo as hotsail home directory. -
Edit
~/.profile
, append:export SLOTS=/sys/devices/bone_capemgr.9/slots export PINS=/sys/kernel/debug/pinctrl/44e10800.pinmux/pins
This will allow you to access $SLOTS and $PINS easily, files that are used to manipulate device tree overlays and pin status. You can read about how to use these in the Exploring BeagleBone book.
-
Run
visudo
as root, underDefaults env_reset
add two lines:Defaults env_keep += "SLOTS" Defaults env_keep += "PINS"
-
Now the Beaglebone is set up to easily add device tree overlays.
-
f you want to auto disable/enable device tree overlays on boot, run these commands as root:
mkdir /mnt/boot mount /dev/mmcblk0p1 /mnt/boot vim /mnt/boot/uEnv.txt
-
Add these lines above the
mmcargs
line:##Disable HDMI, enable PWM P9_22 optargs=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN capemgr.enable_partno=am33xx_pwm,bone_pwm_P9_22
-
Change the
capemgr.enable/disable_partno
to the overlays you'd like to enable or disable. -
To use the Exploring BeagleBone library, there are a few steps needed.
- You will need to have
cmake
installed, which may or may not be in the repositories. I had to build it from source. - You will need to run
cmake .. && make && sudo make install
in theexploringBBlibrary/build
folder. If you're running into trouble look at "https://github.com/derekmolloy/exploringBB/tree/master/library".
- You will need to have
Examples
-
To enable PWM P9_22 and P9_16 on boot
optargs=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN capemgr.enable_partno=am33xx_pwm,bone_pwm_P9_22,bone_pwm_P9_16
-
To enable eQEP2b (encoder support) on boot
add CAPE=PyBBIO-eqep2b to /etc/default/capemgr
-
The eQEP2b position can be accessed from
/sys/devices/ocp.3/48304000.epwmss/48304180.eqep/position
and it appears as if the every 360o is 4100 counts.