element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Sci Fi Your Pi
  • Challenges & Projects
  • Design Challenges
  • Sci Fi Your Pi
  • More
  • Cancel
Sci Fi Your Pi
Blog QuadCOP:  The Raspberry Pi Goes for a Fly!
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: screamingtiger
  • Date Created: 11 May 2015 2:57 PM Date Created
  • Views 1260 views
  • Likes 3 likes
  • Comments 6 comments
  • quadcop_project
  • design_challenge
  • sci_fi_your_pi
Related
Recommended

QuadCOP:  The Raspberry Pi Goes for a Fly!

screamingtiger
screamingtiger
11 May 2015

Application Information
http://www.element14.com/community/community/design-challenges/sci-fi-your-pi/blog/2015/04/22/some-information-from-my-application

ChipKit Pi Vs Arduino Pro Mini
http://www.element14.com/community/community/design-challenges/sci-fi-your-pi/blog/2015/05/01/quick-update-on-the-quadcop-and-the-chipkit-pi

Quadcopter Assembled (You call that a Quadcopter?)
http://www.element14.com/community/community/design-challenges/sci-fi-your-pi/blog/2015/05/06/quadcopter-assembled

QuadCop -The Control Switch
http://www.element14.com/community/videos/16202/l/control-switch-explanation

Quad Cop with ChipKit Pi - An "Experience" with Innovation Required

http://www.element14.com/community/community/design-challenges/sci-fi-your-pi/blog/2015/05/07/quad-cop-with-chipkit-pi--an-experience-with-innovation

 

I rigged up my raspberry pi to my quad copter and wrote a quick script so I can push a button to start and stop the camera.  The camera has a LED on it so it works great to know it is recording.

 

I haven't flown anything RC for about 6 months just coming out of winter, so its not the most glamorous flight, but I wanted to see how well the camera works.  There was a 30mph gusting wind and its been like that all week, so the wind was a major problem during this flight.  It did however make me realize I may need a few adjustments to my control protocol.

 

There are some skips in the video, I am not sure if that happened during recording or during the conversion processes.  I'll figure that out later.

 

The camera output is in H264 raw format and you can use MP4Box (use apt-get) to convert it to mp4 format for playback on a windows machine and uploading to YouTube.  I did the conversion on the Raspberry Pi itself.

 

 

Oh BTW, I got the GPS working too without the main board, this will be nice since I will have the Chip Kit Pi installed.  I still would like it for the accelerometer though.  Pics and vid below!

 

Edit:  For clarification, I am flying this quadcopter manually, it is not auto flying.  The autopilot is still under development.  I just wanted to tryout the quadcopter and the camera to ensure everything is working.

 

Here is the script I used to turn on the camera.  Right now it is connected to a  button, but going forward it will be connected the RPi2 via GPIO.  The RPi2 will set a pin to "HIGH" and that will turn the camera on.  Then it goes back to low.  Setting it to HIGH again will turn the camera off.  The output filename is set with the date and time so each capture is in its own file.

 

 

import RPi.GPIO as GPIO
import os
import time
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.IN, pull_up_down = GPIO.PUD_DOWN)
while True:
        GPIO.wait_for_edge(18, GPIO.RISING)
        print("RecordingVideo")
        filename1 = time.strftime("%Y%m%d-%H%M%S") + '.h264'
        os.system('raspivid -t 99999999 -o /home/pi/vids/' + filename1 + '&' )
        time.sleep(1)
        GPIO.wait_for_edge(18, GPIO.RISING)
        print("Stopped")
        os.system('pkill raspivid')
        time.sleep(1)
GPIO.cleanup()

image

image

Might want to have a puke bag ready.  Flight starts at around :30 seconds into the video.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

  • Sign in to reply

Top Comments

  • Former Member
    Former Member over 10 years ago +2
    Awesome!!!!
  • balearicdynamics
    balearicdynamics over 10 years ago +1
    VEEERY HAPPY !!! It is a great result. I am working with several kind of applications on drones and trrust me this is a really great result!
  • DAB
    DAB over 10 years ago +1
    Nice post and video. It looks like you have very good control of the copter and the video is very smooth. Good job, DAB
  • harsahib
    harsahib over 10 years ago

    Nice job..

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 10 years ago

    Awesome!!!!

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • screamingtiger
    screamingtiger over 10 years ago in reply to DAB

    Thanks for the compliments!

    I plan to get a better flight but the weather is just so bad in my area right now.   I hope this week to do more testing and start recording GPS coordinates and so some calculations.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 10 years ago

    Nice post and video.

     

    It looks like you have very good control of the copter and the video is very smooth.

     

    Good job,

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • screamingtiger
    screamingtiger over 10 years ago in reply to balearicdynamics

    I edited my post, this is not auto flying, I am controlling it with a radio.  Auto flight is a few weeks away.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube