Close

Results 1 to 5 of 5
  1. #1
    DF Admin Teajunkie's Avatar
    Join Date
    Dec 2009
    Location
    Devon
    Posts
    4,228
    Thanks
    1,827
    Thanked:        1,825
    Karma Level
    568

    Tech Lapse-Pi Touch – A Touchscreen Timelapse Controller

    Whilst Browsing the web i came across this amazing idea!
    If i had the time and patience i would make this project.



    The Latest Raspberry Pi project.
    It uses the PiTFT Mini Kit, which is a 320×240 2.8″ TFT display and Touchscreen from Adafruit Industries that fits neatly onto my Raspberry Pi, to control a user interface to drive the back-end time-lapse script I showed you in a previous blog article.


    In that article, Lapse Pi -Motorised Time-lapse Rail with Raspberry Pi, I showed you some simple python code to drive the time-lapse rail by running the script from a laptop or smartphone capable of ssh’ing into the Raspberry Pi. The PiTFT allows me to take the project up a notch, by putting the user interface right on the Raspberry Pi, so no external device or connectivity is needed. Here’s a picture of the setup.



    Functionality

    The User interface allows you to:

    • position the dolly on the rail via the motor control buttons
    • change the motor pulse duration between shots
    • change the delay between shots
    • change the number of shots
    • see what time is left for the current sequence
    • start and stop the time-lapse


    And it’s all done using a few simple screens with a simplistic, easy-to-use touchscreen user interface. The following video shows it all in action.

    As you can see in the video, there’s now a motor controller circuit in the mix to allow me to change the direction of the motor from software, rather than having to use a switch.

    Controller Parts


    • $35 – Raspberry Pi
    • $35 – PiTFT
    • $2 – DC-DC converter
    • $8 – Motor Controller (Dual H-Bridge circuit)
    • $10 Misc Connectors, transistors, etc.
    • $10 – 2 cheap acrylic Pi cases from eBay


    Total for the controller – round about $100.


    There’s now a guide covering the hardware in more detail at learn.adafruit.com

    Originally I had a laptop connected to the Pi via Wifi, and later on I had a smartphone do the same, but then I got my hands on a PiTFT, a shield that sits neatly on top of the Raspberry Pi. When I saw it on the Adafruit website, I knew I had to be quick, so 5 minutes later I had one on order, and five minutes after that they were out of stock. Shipping took a while, the order went in before Christmas, and to be fair to Adafruit, the package shipped the next day, but it took over a month to get here from the States. Small packages are usually a lot quicker than that.
    Anyway, when it arrived I started researching the best method to develop a Time-lapse User Interface. I looked a TKinter, and did a few sample apps. This was more suited to Xwindows development, and the controls were all very small and difficult to use with just your finger. Limitations in the controls also meant it was difficult to size them up to be suitable for the 2.8″ display. So I came to the conclusion that TKinter was not a suitable development environment for my needs.

    Then I came across the excellent “DIY WiFi Raspberry Pi Touchscreen Camera” tutorial on Adafruit’s website by Phil Burgess. It’s implemented using PyGame, and the GUI looked really slick and simple to use, so I got my hands on the software, installed it and got it up and running. And the amazing thing is that it was all done in about 647 lines of Python! So, I dove into the guts of the code and saw that it was a very elegant method using PyGame to display icons on the screen and allow actions to happen when those icons are touched. Ideal for a simple user interface of a couple of screens, which is what I’d planned for the time-lapse GUI. So I set about tearing it down and adapting it for my needs.

    One of the main challenges was doing a numeric keypad entry. That would require lots of icons, and a method of displaying what the user was typing. So I started on that one. Photoshop is great for throwing icons together, and putting fancy effects on fonts, so I used something similar to the Adafruit Camera’s font, a white font with a thick black stroke, and a checkered, semi-transparent background for the touchable icons.



    Next was the screen for the main display, which is what’s shown to the user when the time-lapse is running. This allows the user to start/stop the time-lapse, with another button for settings. Everything else on the screen is just information on the current status of the time-lapse.



    The final screen is where the use can change the settings. For this initial version of the GUI, there’s only four settings that can be changed:


    1. The length of the pulse we send to the motor
    2. The delay before the next shot
    3. The number of shots
    4. The direction of the motor





    For each numeric setting, there’s a touchable button which brings the user to the numeric keypad entry, where they can change the value passed in.

    There’s also two buttons for motor control, one for motor direction, and one to drive the motor. This is used to get the camera dolly into the correct position at the start of the time-lapse.
    Once you start a time-lapse running, it runs in a background thread, so you can continue to move about the screens and change settings. If you change any of the settings, they will immediately be reflected in the running time-lapse. I’m not so sure this is a good idea, so I might change that. Also, the motor buttons can also affect the movement of the dolly, so I think I’ll disable those buttons while the time-lapse is running.
    The code is based on the Adafruit PiTFT Camera tutorial by Phil Burgess, and I’ve taken the user interface portions of his cam.py application and used them for my time-lapse controller GUI, which I call lapse.py. Fits nicely with the name of the project, don’t you think?

    The Code

    The code is available here on GitHub, with installation instructions and prerequisites. It also includes all the icons needed for the touch screen interface.
    Documentation is generated from the docs directory on Github, but can be read here on ReadTheDocs.org. This includes a User Guide.

    Source
    Have you joined the DF discord server. https://discord.com/invite/YajVGQxDaw

    4 Thanks given to Teajunkie

    Ashley (3rd August 2015),  Lou_smorals (3rd August 2015),  reverend (6th April 2015),  WRATH OF BOD (4th April 2015)  


  2. #2
    DF VIP Member WRATH OF BOD's Avatar
    Join Date
    Jul 2004
    Location
    Monkey Hangers
    Posts
    6,611
    Thanks
    2,585
    Thanked:        1,229
    Karma Level
    790

    Default Re: Lapse-Pi Touch – A Touchscreen Timelapse Controller

    that looks cool bit of kit to use with Pi and time laps..

  3. #3
    DF Rookie dimitri's Avatar
    Join Date
    Aug 2015
    Location
    Kent
    Posts
    2
    Thanks
    0
    Thanked:        0
    Karma Level
    0

    Default Re: Lapse-Pi Touch – A Touchscreen Timelapse Controller

    really impressive

  4. #4
    DF VIP Member
    Mystical_2K's Avatar
    Join Date
    Jun 2002
    Location
    Sunnyvale
    Posts
    4,660
    Thanks
    1,192
    Thanked:        978
    Karma Level
    671

    Default Re: Lapse-Pi Touch – A Touchscreen Timelapse Controller

    very cool going to see if our boss is interested in making one of these for our next project
    You know he grew up as a little shitspark from the old shitflint and then he turned into a shitbonfire and driven by the winds of his monumental ignorance he turned into a raging shitfirestorm. If I get to be married to Barb I'll have total control of Sunnyvale and then I can unleash the shitnami tidal wave that will engulf Ricky and extinguish his shitflames forever. And with any luck he'll drown in the undershit of that wave. Shitwaves.

  5. #5
    DF VIP Member
    Lou_smorals's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    2,320
    Thanks
    743
    Thanked:        599
    Karma Level
    446

    Default Re: Lapse-Pi Touch – A Touchscreen Timelapse Controller

    Wow, great, would love to do this if I had the time!
    Dear Lord, please grant me the ability to punch people in the face over Standard TCP/IP

Similar Threads

  1. Controller S
    By ZX7R in forum Microsoft Consoles
    Replies: 7
    Last Post: 31st October 2002, 12:02 AM
  2. Speed Touch USB Install Disc
    By nutty in forum Internet Connections & VPNs
    Replies: 1
    Last Post: 14th October 2002, 10:08 PM
  3. Nintendo WaveBird Controller Pre-Order
    By ultra238a in forum Cheapskates Corner
    Replies: 1
    Last Post: 8th October 2002, 04:06 PM
  4. F/S Time lapse VCR's
    By Zydig0 in forum Buy, Sell and Trade
    Replies: 3
    Last Post: 9th September 2002, 11:59 PM
  5. Replies: 4
    Last Post: 4th September 2002, 05:41 PM

Social Networking Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •