Created
April 17, 2013 14:56
-
-
Save felixge/5404974 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# setup fd 3 as udp connection to drone | |
exec 3<>/dev/udp/192.168.1.1/5556 | |
# takeoff | |
echo -e "AT*REF=1,512\r" >&3 | |
# landing | |
echo -e "AT*REF=2,0\r" >&3 | |
... | |
# profit? |
@jed : D
that's the cutest. nerdiest. name. ever.
@felixge so cool!! :D
I continued a bit, haven't tested this on the drone D:
#!/bin/bash
seq=1
exec 3<>/dev/udp/192.168.1.1/5556
echo -e "AT*REF=$seq,512\r" >&3
while [ true ]
do
sleep 0.033;
seq=$((seq+1))
echo -e "AT*REF=$seq,512\r" >&3
seq=$((seq+1))
# TODO: map axes into float signed int32s
echo -e "AT*PCMD=$seq,0,0,0,0,0\r" >&3
# TODO: code script break
done;
seq=$((seq+1))
echo -e "AT*REF=$seq,0\r" >&3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
it's a Shellicopter™!