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
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • 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
Raspberry Pi Projects
  • Products
  • Raspberry Pi
  • Raspberry Pi Projects
  • More
  • Cancel
Raspberry Pi Projects
Blog Raspberry Pi - Swiss Army Pi: Automated solar light switch, weather center, movable webcam, and alert center
  • Blog
  • Documents
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi Projects to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: linuxgnuru
  • Date Created: 25 Dec 2014 6:41 PM Date Created
  • Views 566 views
  • Likes 2 likes
  • Comments 1 comment
  • sensors
  • raspberry_pi_projects
Related
Recommended

Raspberry Pi - Swiss Army Pi: Automated solar light switch, weather center, movable webcam, and alert center

linuxgnuru
linuxgnuru
25 Dec 2014

So, for my 40th birthday my family decided to get me a Raspberry Pi + camera and some sensors.  In this sensor kit were some fun goodies, like a piezo buzzer, a DHT11 (humidity + temp sensor), a relay switch, a LDR, and a servo motor.  I currently live in Tanzania, where power isn't 100% guaranteed. so we have 15 solar LED security light system (125 watt panel, controller, and deep cycle battery).  Having to manually turn on every solar light at night was getting tiresome, and I just so happened to have a spare Pi not doing anything.  So, I got myself a 12v -> 5v (usb) adapter, an analog I2C sensor (with a LDR built in), and made some code that would check the light sensor, and if it was dark enough, turn on a relay which completed the circuit to solar lights.  Now I also happened to have a spare Pi camera ... so, I thought to myself, why not make a web camera?  I found a great example of a php / service script that took a picture every few seconds and created a jpg image in /dev/shm (as to not bother with writing to the SD card) and the php created a new image with the current time to display via a web server.  I took this one step further and slapped on a DHT11 sensor and (using a tutorial from Adafruit) made a crontab that ran the sample Python script from Adafruit and piped it to a file that the webcam php read in and threw it under the time embeded in the image. Now I could see what was going on outside my house, but I wished I could move it. After some experimenting / googling, I discovered a neat little PWM driver that didn't need root access.  It's called ServoBlaster and it creates a file in /dev (/dev/servoblaster to be precise) and allows non-root users to echo angles into the device and it moves the servo according to how the service was set up.  We have a security guard / handy man that every now and then we have to yell out his name if we need anything.  Then another thought came to me, why not use the piezo buzzer?  So, I threw some more wires in and got myself a rather loud buzzer that I can turn on/off via a simple command.  After some woodcrafting, I finally had something; a webcam that gave me the current time, temperature, and humidity, a servo / buttons that let me turn the camera from a web page, and now a buzzer button that would alert our guard if we needed him.  If anyone wants me to make a far better / more detailed account of what all I've done (including source code) let me know, I'd be more than happy to spread the word on what all I did.

 

[Pics - https://plus.google.com/photos/117833478491757346228/albums/6096843358101406833?authkey=CMCS3NPCiP6gwgE]

  • Sign in to reply
  • DAB
    DAB over 10 years ago

    Sounds like you got a good toy to play with.

     

    Look forward to seeing what you can do with it.

     

    DAB

    • 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