Skip to content

Instantly share code, notes, and snippets.

@jadonk
Last active October 6, 2023 10:23
Show Gist options
  • Save jadonk/6080ca92d6e225eb89d33ad7744e1775 to your computer and use it in GitHub Desktop.
Save jadonk/6080ca92d6e225eb89d33ad7744e1775 to your computer and use it in GitHub Desktop.

Shopping List

Mechanical assembly

Motor positions

The motors should be configured as "Quad X" where BeagleBone Blue's USB connector is forward-facing. ArduCopter QuadX and QuadPlus configs

Wiring

ESC connection from BeagleBone Blue

  1. yellow
  2. orange
  3. green/black
  4. blue

Software setup and test

#!/bin/bash
cd /opt/scripts/tools
git pull
sudo ./update_kernel.sh --ti-rt-channel --lts-4_4
yes | sudo developers/update_bootloader.sh
# Be sure to not try to run "apt-get upgrade" from within Cloud9. "dpkg --configure -a" to fix.
sudo apt-get upgrade -y
sudo apt-get install -y ardupilot-copter-blue
sudo sed -i 's/GOVERNOR="ondemand"/GOVERNOR="performance"/g' /etc/init.d/cpufrequtils
echo "uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo" | sudo tee -a /boot/uEnv.txt
echo "enable_uboot_overlays=1" | sudo tee -a /boot/uEnv.txt
sudo mkdir -p /var/APM/logs
sudo mv /etc/rc.local /etc/rc.local.bak.$RANDOM
cat <<EOX | sudo tee /etc/rc.local
#!/bin/sh
echo pruecapin_pu > /sys/devices/platform/ocp/ocp\:P8_15_pinmux/state
sleep 10
echo 4a334000.pru0 > /sys/bus/platform/drivers/pru-rproc/unbind
echo 4a338000.pru1 > /sys/bus/platform/drivers/pru-rproc/unbind
/usr/bin/ardupilot/blue-arducopter -A udp:10.0.0.10:14550 -l /var/APM/logs 2>&1 > /var/APM/logs/blue-arducopter.log &
exit 0
EOX
sudo chmod +x /etc/rc.local
sudo xxd -r -a - /var/APM/ArduCopter.stg <<EOF
0000000: 5041 0600 0002 0000 7800 0602 f303 0f00 PA......x.......
0000010: 0601 0415 000b 4401 0000 0000 000b 8400 ......D.........
0000020: 00bd 7a76 442a 0200 0000 0003 c500 006c ..zvD*.........l
0000030: 095f bc4e c2a7 3c02 2463 bd03 8307 0011 ._.N..<.$c......
0000040: 6824 0003 c501 0000 0000 0000 0000 0000 h$..............
0000050: 0000 0003 c307 0000 0000 0003 8502 0000 ................
0000060: 0000 0000 0000 0000 0000 0003 0308 0000 ................
0000070: 0000 0006 0313 0000 0000 0006 0323 0094 .............#..
0000080: 5604 0006 0333 00ea 74ea 0249 c100 0001 V....3..t..I....
0000090: 7102 0000 fc00 06c1 0300 0195 0100 0001 q...............
00000a0: 9345 0000 0000 6fc3 0000 bcc2 0080 c643 .E....o........C
00000b0: 93c3 0300 110c 0400 0345 0300 3ea1 b53d .........E..>..=
00000c0: 71d4 8e3d 6b17 6bbf 0305 0300 c606 803f q..=k.k........?
00000d0: 6ca3 7f3f bccb 7f3f 0343 0800 1168 1600 l..?...?.C...h..
00000e0: 0383 0800 0000 0000 03c5 0300 0000 0000 ................
00000f0: 0000 0000 0000 0000 0385 0300 0000 0000 ................
0000100: 0000 0000 0000 0000 03c3 0800 0000 0000 ................
0000110: 0345 0400 0000 0000 0000 0000 0000 0000 .E..............
0000120: 0305 0400 0000 0000 0000 0000 0000 0000 ................
0000130: 9f05 0200 9bd7 133b d2d9 043c 0000 0000 .......;...<....
0000140: 0642 1408 db05 ffff 3f00 0000 0000 0000 .B......?.......
0000150: 0000 0000 0000 0000 0000 0000 0000 0000 ................
*
0000600: ae65 0000 0000 0000 0000 0000 0000 0000 .e..............
0000610: 0000 0000 0000 0000 0000 0000 0000 0000 ................
*
0003ff0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
EOF
@jadonk
Copy link
Author

jadonk commented Jun 6, 2022

Can you bring this discussion over to https://forum.beagleboard.org? Please feel free add a link to that discussion here or e-mail me directly with a link to that discussion. The best thing for me is to reply on the forum.

@Antonstr
Copy link

Antonstr commented Jun 8, 2022 via email

@Antonstr
Copy link

Antonstr commented Jun 8, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment