Raspi.tv has posted part 4 of their pi twitter app series and this week the lesson is how to take a tweet photos using your pi.
Today it gets a bit more exciting. We’re going to take a photo with the Raspberry Pi camera and tweet it.
These are basic building blocks for manipulating a twitter account from your Raspberry Pi. So what do we need to know about tweeting photos?
The maximum photo file size you can upload to a tweet is 3Mb. This is plenty for the kind of photos I’m thinking about. I’m going to use 1024 x 768 pixels, which is adequate resolution for twitter. It’s a lot less than the Pi camera is capable of, but you can tweak it in your script if you want to use the full 3Mb allowance.
Unfortunately, although tweepy is quite a good Python library, its documentation is rather out of date. I had no idea how to tweet a photo, but last week I happened across a post by Dougie Lawson on the Raspberry Pi Forums (Python section). This gave me most of what I needed to be able to tweet a photo.
Each Friday is PiDay here at Adafruit! Be sure to check out our posts, tutorials and new Raspberry Pi related products. Adafruit has the largest and best selection of Raspberry Pi accessories and all the code & tutorials to get you up and running in no time!
Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.
Join us every Wednesday night at 8pm ET for Ask an Engineer!
Learn resistor values with Mho’s Resistance or get the best electronics calculator for engineers “Circuit Playground” – Adafruit’s Apps!
Maker Business — Presentation: Ten Year Futures – Benedict Evans
Wearables — Toy with inspiration
Electronics — Servo Pulses
Biohacking — Nutrigenomics – Personalized Vitamin Supplements Based on DNA
No comments yet.
Sorry, the comment form is closed at this time.