• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomepcDuinoSeawolf Submarine
Previous Next

Seawolf Submarine

Posted by: Sky Luo , December 22, 2013

[vc_row][vc_column][vc_column_text]In this tutorial, we show how to make a mini submarine with pcDuino. This mini seawolf can:

  • It can be floating in the water and diving .
  • You can control it used your cellphone or PC.
  • On your cellphone or PC display ,you can see the video from the submarine.

20[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column width=”1/1″][vc_tour][vc_tab title=”Structure” tab_id=”1387356559-1-3″][vc_column_text]Propeller:

21

Rudder:

22

[/vc_column_text][/vc_tab][vc_tab title=”Circuit structure” tab_id=”1387356559-2-93″][vc_column_text]circuit structure:

  • The PC or cellphone is connected to the pcDuino through the network.
  • The drivers board is connected to the pcDuino through the gpio(io7,io8,io9,io10).

Circuit diagram for drivers board:

21[/vc_column_text][/vc_tab][vc_tab title=”The installation of video monitoring ” tab_id=”1387696616614-2-9″][vc_column_text]Installation steps are as follows:

1.Turn on the pcDuino and open the command line.

2.

sudo su<br />sudo apt-get install libjpeg-dev subversion imagemagick

If something wrong in this step, we need to install “jpegsrc.v8c.tar.gz”.

You can download from:http://www.ijg.org/files/jpegsrc.v8c.tar.gz

tar xvfz jpeg-v8c.tar.gz<br /><br />cd jpeg-v8c<br /><br />./configure --enable-shared --prefix=$CONFIGURE_PREFIX<br /><br />make<br /><br />sudo make install

3.To enter the download folder

cd /home/ubuntu/Downloads<br /><br />svn co &lt;a href="https://svn.code.sf.net/p/mjpg-streamer/code/mjpg-streamer"&gt;https://svn.code.sf.net/p/mjpg-streamer/code/mjpg-streamer&lt;/a&gt; mjpg-streamer

If  the URL has changed, you can enter https://svn.code.sf.net/p/mjpg-streamer/code/ in the browser

cd mjpg-streamer<br /><br />make clean all<br /><br />export LD_LIBRARY_PATH=-i "input_uvc.so" -o "output_http.so -w ./www"<br /><br />sudo make DESTDIR=/usr install<br /><br />./mjpg_streamer -i "input_uvc.so -d /dev/video0 -y -r 1600*1200" -o "output_http.so -w ./www"

After this step you can see:

0:HTTP TCP port。。。。。。:8080
0:commands :enabled

4.Enter http://localhoustip:8080 in the browser and click “stream”.

And then you can see the video.[/vc_column_text][/vc_tab][vc_tab title=”Run the Program” tab_id=”1387698919271-3-9″][vc_column_text]1.Copy the  “contor.c” to the pcDuino specified folder

2.Compile and run

gcc -o contor contor.c<br /><br />./contor

[/vc_column_text][/vc_tab][vc_tab title=”Control protocol” tab_id=”1387699464669-4-10″][vc_column_text]The pcDuino is the TCP server .

So if you want control the submarine you must create a client which is Specify the port number  3490.

Control protocol:

The protocol uses string format, for example:

  • “D:30 ” Propulsion motor can rotate positively.
  • “D:-30 “Propulsion motor  can rotate reversely.
  • “D:0 “Propulsion motor can stop.
  • “A:30” Motor used to control the direction can rotate positively.
  • “A:-30” Motor used to control the direction can rotate reversely.
  • “A:0″Motor used to control the direction can stop.

If you send the string “A:xx  D:xx ” you can control two motors as the same time.

xx>20 the motor forward,xx<-20 the motor reversal and the other number can stop the motor.[/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row]

Tags: pcDuino

Share!
Tweet

Sky Luo

About the author

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors