imbuedhope / land-yacht

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

##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:

  1. Write some controllers!
  2. 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.
  3. 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

  1. Install Debian 7.9 image to SD card.

  2. Set device IP to static (currently 192.168.0.105).

  3. Set up users as shown in info file.

  4. git clone this repo as hotsail home directory.

  5. 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.

  6. Run visudo as root, under Defaults env_reset add two lines:

    Defaults        env_keep += "SLOTS"
    Defaults        env_keep += "PINS"
  7. Now the Beaglebone is set up to easily add device tree overlays.

  8. 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
  9. 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
  10. Change the capemgr.enable/disable_partno to the overlays you'd like to enable or disable.

  11. To use the Exploring BeagleBone library, there are a few steps needed.

    1. You will need to have cmake installed, which may or may not be in the repositories. I had to build it from source.
    2. You will need to run cmake .. && make && sudo make install in the exploringBBlibrary/build folder. If you're running into trouble look at "https://github.com/derekmolloy/exploringBB/tree/master/library".

Examples

  1. 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
  2. To enable eQEP2b (encoder support) on boot

    add CAPE=PyBBIO-eqep2b to /etc/default/capemgr
  3. 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.

About


Languages

Language:C++ 80.5%Language:CSS 13.9%Language:C 2.9%Language:HTML 1.5%Language:Makefile 0.5%Language:CMake 0.4%Language:Shell 0.2%