Matt Jones Tech
  • Blog
  • Video Projects
  • Web Projects
  • I Created an RFID Check-In Prototype With a Raspberry Pi

    All the technical details (and more awesome pi projects!): https://pimylifeup.com/raspberry-pi-rfid-attendance-system/

    RFID Check-In on a Raspberry Pi

    Hey guys! What’s going on my name is Matt and today I’m not doing a museum update and I’m not doing a 3d house model those
    are two other projects that are crazy and I’ve been doing other stuff and so…


    This video is for one of the projects that fell through the cracks if I don’t
    make a video about it no one will ever know that I did it so let’s do it!

    So a while back somebody came to me and asked me to do a project for a small like a kids ministry thing at church and they needed a way to get kids checked in and have like an account for each kid on this app, right… And so they needed to play games on the app and they you know keep they earn points and all this kind of stuff to kind of keep track of all of everybody’s stuff. So the first phase of creating this app I thought will they have these bracelets that have RFID tags on them and so if you could use that to track the kids and keep track of how many points they have each. That might be a good starting point so I created an RFID chicken system as a prototype for the app that never happened so here you go:

    Alright guys, so the very first thing that I grabbed was a Raspberry Pi and an RFID reader writer module so I can read the the actual tags themselves. So once I got those things together, I started to work on the wiring of the RFID module to the Raspberry Pi itself. And so that was put together with a breadboard and if you guys want some more information on exactly how that’s all rigged up there’s a link and in the description. And so once I had all the wires run from the RFID module to the Raspberry Pi it was time to boot up. And so once I booted up I was able to create two Python files and save them in a special RFID directory inside of the Raspberry Pi.

    So the first one is called read and it does just what you might expect it to it will read the identification number on the RFID tag and so every single tag that is created has an ID number and so the read function inside of the script will print out that number and any other information that’s written to that particular tag if nothing else is written it will just print the ID so
    that is the script for reading the tags and then there’s a second script that is
    write PI and it does the same exact thing except for your writing additional
    information to the tag so in order for the scripts to function you need to
    execute them so first off I’ll just execute the read function so once you
    execute it it’s going to enter a like a listening mode so when it detects an
    RFID tag that has been tapped to the sensor it will say okay I see the tag
    and here’s the ID number any other additional information written to that
    tag and in order to write to the tag you just execute the right program and then it’ll ask you to enter a little bit of text or whatever information that you want to associate with that particular tag so for my example I just put a string of text that says it is written and then once I wrote that to the tag I
    was able to read that information back and output that to the terminal.

    Alright guys thanks for hanging out if you want to know more about this RFID reader writer I have some more information and technical details and wiring diagrams and all that good stuff in the link below and hope you guys enjoyed this one we’re gonna be neck we’re gonna be back next time probably on home design 3d animation need things but I’d like to
    get back on the museum train that’d be great so we’ll see how it goes
    and I’ll see you guys next week peace out!

    matt

    May 12, 2020
    General Computing, Linux, Raspberry Pi
    attendance, check-in, DIY, python, raspberry pi, rfid
  • Batch Process FFMPEG

    Batch Process FFMPEG

    An incredible use case for simple Bash scripting is the ability to batch process ffmpeg tasks. First off, I’ll assume you guys have got a basic understanding of FFMPEG, what it is, how to install and use it, that kinda thing. If not, feel free to check out the basics. FFMPEG is absolutely amazing. It can convert a chicken sandwich to ProRes. So once you’ve got the basic single-file convert down, how do you batch convert?

    Shell Scripts

    This is new for me, and I’m happy to learn new stuff. So upon a basic introduction, shell scripting looks incredibly powerful. I’m easing my way into Python because Blender is written in Python, but apparently Python is something you can integrate into shell scripts as well, so all the better!

    More good news, someone had the same issue as me, and got a pretty rad response on StackOverflow. The 2nd answer below the ‘correct’ one uses something called parameter expansion that I don’t really know a lot about. But from my limited understanding, I gather that it’s a way to take the existing filename and stick it on to the ffmpeg file export. So let’s say you have vacayFootage.avi that you want to convert to .mp4. Parameter expansion grabs the file name and sticks it onto the resulting export so you’ll get vacayFootage.mp4 without the hassle of having to name a thousand files by hand, each time you convert a file. So here’s an example of how you would batch process ffmpeg commands:

    for i in *.avi; do ffmpeg -i "$i" "${i%.*}.mp4"; done

    So like a true professional, I pasted that Stackoverflow answer into a shell script, modified the lines a bit to match my needs, and boom! It worked! I was able to convert about 500 files in just a few minutes with a single line of code… So awesome!

    So Many Possibilities…

    So with that fancy new script… and learning about how read is a cool Python command that can be used to collect user input… I’d love to write a shell script that can work for anyone. Just enter the directory where all your media is, choose your output options, select your output directory, and boom! Batch encodes for all! Gotta get on that… right after I learn Python.

    matt

    September 16, 2019
    FFMPEG, Linux, Video Editing
    bash, code, ffmpeg, file conversion, linux, python, scripting, shell

Prove all things; hold fast that which is good. 1 Thess 5:21