Create a gist now

Instantly share code, notes, and snippets.

@jadonk /README.md
Last active Jul 14, 2018

Embed
What would you like to do?

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
@AJRepo

This comment has been minimized.

Show comment
Hide comment
@AJRepo

AJRepo Oct 20, 2017

Did you use the 2S LiPo battery to drive just the BB Blue (and have other batteries for the motors) or did you use just the one 2S LiPo battery to drive the entire quadcopter?

Followup question: Did you use the PDB that came with the frame or did you use the 4 DC motor drivers?

AJRepo commented Oct 20, 2017

Did you use the 2S LiPo battery to drive just the BB Blue (and have other batteries for the motors) or did you use just the one 2S LiPo battery to drive the entire quadcopter?

Followup question: Did you use the PDB that came with the frame or did you use the 4 DC motor drivers?

@jadonk

This comment has been minimized.

Show comment
Hide comment
@jadonk

jadonk Nov 5, 2017

I used a single 2S LiPo for both, but I never finished with my flight test. I had some motor cut-out and I think it is due to solder joints, but I haven't confirmed. I'll try to pick it up and test again this week.

I used the ESCs I mentioned in the BOM with the PWM output, not the DC motor drivers.

Owner

jadonk commented Nov 5, 2017

I used a single 2S LiPo for both, but I never finished with my flight test. I had some motor cut-out and I think it is due to solder joints, but I haven't confirmed. I'll try to pick it up and test again this week.

I used the ESCs I mentioned in the BOM with the PWM output, not the DC motor drivers.

@dacobi

This comment has been minimized.

Show comment
Hide comment
@dacobi

dacobi Feb 7, 2018

Hi

I'm getting this error:

No INS backends available

Any idea what I can do?

/Jacob

dacobi commented Feb 7, 2018

Hi

I'm getting this error:

No INS backends available

Any idea what I can do?

/Jacob

@silver2row

This comment has been minimized.

Show comment
Hide comment
@silver2row

silver2row Apr 3, 2018

Hello,

This is a great project. I see the project is working/not working due to whatever. I am going to replicate the idea and get back to this board. Thank you again for posting cmds.

Seth

Hello,

This is a great project. I see the project is working/not working due to whatever. I am going to replicate the idea and get back to this board. Thank you again for posting cmds.

Seth

@silver2row

This comment has been minimized.

Show comment
Hide comment
@silver2row

silver2row Apr 3, 2018

Hello,

I had to add sudo to line 24. I had to retype line 13 after line 23 was typed up.

Seth

silver2row commented Apr 3, 2018

Hello,

I had to add sudo to line 24. I had to retype line 13 after line 23 was typed up.

Seth

@jadonk

This comment has been minimized.

Show comment
Hide comment
@jadonk

jadonk Apr 3, 2018

@silver2row line 34? Did you mean 24? I updated based on our IRC chat.

Owner

jadonk commented Apr 3, 2018

@silver2row line 34? Did you mean 24? I updated based on our IRC chat.

@silver2row

This comment has been minimized.

Show comment
Hide comment
@silver2row

silver2row Apr 3, 2018

Yes Sir.

Seth

Yes Sir.

Seth

@silver2row

This comment has been minimized.

Show comment
Hide comment
@silver2row

silver2row Apr 3, 2018

Hello Again,

Thank you for taking time out to accompany my minor issue. I will test things out and get back to this Gist and the #beagle Freenode thing.

Seth

P.S. If you have time to review this gist again, I will stay up-to-date and test more images and kernels.

Hello Again,

Thank you for taking time out to accompany my minor issue. I will test things out and get back to this Gist and the #beagle Freenode thing.

Seth

P.S. If you have time to review this gist again, I will stay up-to-date and test more images and kernels.

@silver2row

This comment has been minimized.

Show comment
Hide comment
@silver2row

silver2row Apr 4, 2018

Sir,

If you have time to understand, please let me know from your perspective why rc.local is not showing for line 13 when /etc/rc.local is already a directory and I get this error: mv: cannot stat '/etc/rc.local': No such file or directory.

I will look it up while you are busy doing whatever. I will reply to me, myself, and I until I hear from another person.

Seth

P.S. I think the /etc/rc.local directory was added by me and was not present on the system beforehand. I will check that out, too.

silver2row commented Apr 4, 2018

Sir,

If you have time to understand, please let me know from your perspective why rc.local is not showing for line 13 when /etc/rc.local is already a directory and I get this error: mv: cannot stat '/etc/rc.local': No such file or directory.

I will look it up while you are busy doing whatever. I will reply to me, myself, and I until I hear from another person.

Seth

P.S. I think the /etc/rc.local directory was added by me and was not present on the system beforehand. I will check that out, too.

@silver2row

This comment has been minimized.

Show comment
Hide comment
@silver2row

silver2row Apr 4, 2018

Hello Sir,

Forget about it...the .sh script works and I am just going to ignore the error as an error until I set up everything to see if things work. I will reply.

Seth

Hello Sir,

Forget about it...the .sh script works and I am just going to ignore the error as an error until I set up everything to see if things work. I will reply.

Seth

@silver2row

This comment has been minimized.

Show comment
Hide comment
@silver2row

silver2row Apr 4, 2018

Hello,

Well...here goes it. Once I rebooted after running the .sh script w/ sudo sh ardupilot_setup.sh, I have the second LED to the USB port blinking red while the rest still blink blue. I erased the file, the .sh script file, and then I rebooted.

Only after the reboot, and this is ongoing now, did I come across the blinking LEDs in different colors and patterns.

So,

I guess I will start from scratch and get back to this board. I am finding that some people still use, in opensource, ardupilot/arducopter and I can learn a lot from this post/gist and their development.

Seth

P.S. I will stay "attached" for the time being, i.e. at least until you get tired of this specific gist. Good times and dollars!

Hello,

Well...here goes it. Once I rebooted after running the .sh script w/ sudo sh ardupilot_setup.sh, I have the second LED to the USB port blinking red while the rest still blink blue. I erased the file, the .sh script file, and then I rebooted.

Only after the reboot, and this is ongoing now, did I come across the blinking LEDs in different colors and patterns.

So,

I guess I will start from scratch and get back to this board. I am finding that some people still use, in opensource, ardupilot/arducopter and I can learn a lot from this post/gist and their development.

Seth

P.S. I will stay "attached" for the time being, i.e. at least until you get tired of this specific gist. Good times and dollars!

@silver2row

This comment has been minimized.

Show comment
Hide comment
@silver2row

silver2row Apr 5, 2018

Hello...

https://github.com/mirkix/BBBMINI/blob/master/doc/software/software.md is what I found that may work. If you are still planning on working w/ the BBBlue and ArduPilot/Copter, this person put some stuff together and did well (I think).

Seth

Hello...

https://github.com/mirkix/BBBMINI/blob/master/doc/software/software.md is what I found that may work. If you are still planning on working w/ the BBBlue and ArduPilot/Copter, this person put some stuff together and did well (I think).

Seth

@silver2row

This comment has been minimized.

Show comment
Hide comment
@silver2row

silver2row Apr 6, 2018

Hello Again Sir,

I got connected to MavLink and Mission Planner from the BBBlue. I think this is a big step. My parts will come in one day and until then, I will find tune things.

Seth

Hello Again Sir,

I got connected to MavLink and Mission Planner from the BBBlue. I think this is a big step. My parts will come in one day and until then, I will find tune things.

Seth

@jadonk

This comment has been minimized.

Show comment
Hide comment
@jadonk

jadonk Apr 12, 2018

@silver2row: how did it go?

Owner

jadonk commented Apr 12, 2018

@silver2row: how did it go?

@fatdollar

This comment has been minimized.

Show comment
Hide comment
@fatdollar

fatdollar Apr 24, 2018

Any way you could be a little more detailed on the wiring? I don't fully understand how the battery is connected to the system.

Thanks.

Any way you could be a little more detailed on the wiring? I don't fully understand how the battery is connected to the system.

Thanks.

@fatdollar

This comment has been minimized.

Show comment
Hide comment
@fatdollar

fatdollar Apr 30, 2018

I am having problems with the PRU I've run your setup.sh file and didn't have any errors. I can't find any clear cut documentation on how to enable the PRU. The one step by step post i found bricked my bone and i had to rebuild the SD card.

I'm extremely frustrated with the lack of documentation on the Beagle Bone Blue and that there seems to be no central source for help.

Any advice? The error message i'm getting is posted as well.
image

I am having problems with the PRU I've run your setup.sh file and didn't have any errors. I can't find any clear cut documentation on how to enable the PRU. The one step by step post i found bricked my bone and i had to rebuild the SD card.

I'm extremely frustrated with the lack of documentation on the Beagle Bone Blue and that there seems to be no central source for help.

Any advice? The error message i'm getting is posted as well.
image

@silver2row

This comment has been minimized.

Show comment
Hide comment
@silver2row

silver2row Jul 14, 2018

@jadonk and @fatdollar...

I was having some issues. I stopped for a while, took a break, and forgot my notes. I am up a creek right now w/ things. I am trying to follow along w/ https://github.com/imfatant/test. I will keep you updated.

Seth

P.S. I will try your script again w/ the BBBlue. I will let you know what I find.

silver2row commented Jul 14, 2018

@jadonk and @fatdollar...

I was having some issues. I stopped for a while, took a break, and forgot my notes. I am up a creek right now w/ things. I am trying to follow along w/ https://github.com/imfatant/test. I will keep you updated.

Seth

P.S. I will try your script again w/ the BBBlue. I will let you know what I find.

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