Schlagwort: Infrared

  • Playing Elden Ring with a TV remote

    Playing Elden Ring with a TV remote

    Reading Time: 2 minutes

    Arduino TeamApril 1st, 2022

    In case you’ve been living under a rock and haven’t heard of it, Elden Ring is currently the hottest game in the world. It’s an open world RPG made by From Software — the same company that is infamous for making the incredibly difficult Demon’s SoulsDark Souls, and Bloodborne games. Elden Ring is no less difficult, which is why it is amazing that ZiedYT was able to play using a TV remote converted into video game controller with an Arduino.

    While some modern remotes for smart TVs utilize Bluetooth or WiFi connections, traditional remotes work via infrared. These remotes contain an infrared emitter that pulses an invisible light in a specific pattern corresponding to a command, which the TV reads with a built-in infrared receiver. The “volume up” button, for example, will cause the remote to emit an infrared code distinct from the “channel down” button, and so on. While the code is modulated as a very rapid sequence of flashes, it is still a relatively slow process—something that spells death in any “Soulsborne” game.

    To use a TV remote for gaming, ZiedYT first needed a way to read the unique infrared codes corresponding to each button. For that, he used an Arduino Uno paired with an infrared receiver. Several libraries exist for this purpose and make it easy to decipher infrared codes. The Arduino then tells the connected computer via Serial which button was pressed. ZiedYT wrote a script to read that Serial data and then simulate the proper button press on an emulated gamepad. As far as Elden Ring is concerned, ZiedYT is playing with a standard controller.

    This setup lets ZiedYT move his character around, slash with his sword, drink Estus flasks (ehm, or Flasks of Crimson Tears, that is), and everything else. Of course, it also makes the game even harder to play than normal, so only the most masochistic gamers will want to perform this hack themselves.

    Website: LINK

  • Deep learning cat prey detector

    Deep learning cat prey detector

    Reading Time: 3 minutes

    We’ve all been able to check on our kitties’ outdoor activities for a while now, thanks to motion-activated cameras. And the internet’s favourite cat flap even live-tweets when it senses paws through the door.

    A nightvision image of a cat approaching a cat flap with a mouse in its mouth

    “Did you already make dinner? I stopped on the way home to pick this up for you.”

    But what’s eluded us “owners” of felines up until now is the ability to stop our furry companions from bringing home mauled presents we neither want nor asked for.

    A cat flap bouncer powered by deep learning

    Now this Raspberry Pi–powered machine learning build, shared by reddit user u/eee_bume, can help us out: at its heart, there’s a convolutional neural network cascade that detects whether a cat is trying to enter a cat flap with something in its maw. (No word from the creators on how many half-consumed rodents the makers had to dispose of while training the machine learning model.)

    The neural network first detects the whole cat in an image; then it hones in on the cat’s maw. Image classification is performed to detect whether there is anything in or around the maw. If the network thinks the cat is trying to smuggle caught contraband into the house, it’s a “no” from this virtual door bouncer.

    The system runs on Raspberry Pi 4 with an infrared camera at an average detection rate of  around 1 FPS. The PC-Val value, representing the certainty of the prey classification => prey/no_prey certainty threshold, is 0.5.

    The home made set up including small camera lights and sensors

    The infrared camera setup, powered by Raspberry Pi

    How to get enough training data

    This project formed Nicolas Baumann’s and Michael Ganz’s spring semester thesis at the Swiss Federal Institute of Technology. One of the problems they ran into while trying to train their device is that cats are only expected to enter the cat flap carrying prey 3% of the time, which leads to a largely imbalanced classification problem. It would have taken a loooong time if they had just waited for Nicolas and Michael’s pets to bring home enough decomposing gifts.

    Lots of different cats faces close up, some with prey in their mouths, some without

    The cutest mugshots you ever did see

    To get around this, they custom-built a scalable image data gathering network to simplify and maximise the collection of training data. It features multiple distributed Camera Nodes (CN), a centralised main archive, and a custom labeling tool. As a result of the data gathering network, 40GB of training data have been amassed.

    What is my cat eating?!

    The makers also took the time to train their neural network to classify different types of prey. So far, it recognises mice, lizards, slow-worms, and birds.

    Infrared shots of one cat while the camera decides if it has prey in its mouth or not

    “Come ooooon, it’s not even a *whole* mouse, let me in!”

    It’s still being tweaked, but at the moment the machine learning model correctly detects when a cat has prey in its mouth 93% of the time. But it still falsely accuses kitties 28% of the time. We’ll leave it to you to decide whether your feline companion will stand for that kind of false positive rate, or whether it’s more than your job’s worth.

    Website: LINK

  • Take the Wizarding World of Harry Potter home with you

    Take the Wizarding World of Harry Potter home with you

    Reading Time: 3 minutes

    If you’ve visited the Wizarding World of Harry Potter and found yourself in possession of an interactive magic wand as a souvenir, then you’ll no doubt be wondering by now, “What do I do with it at home though?”

    While the wand was great for setting off window displays at the park itself, it now sits dusty and forgotten upon a shelf. But it still has life left in it — let Jasmeet Singh show you how.

    Real Working Harry Potter Wand With Computer Vision and ML

    A few months back my brother visited Japan and had real wizarding experience in the Wizarding World of Harry Potter at the Universal Studios made possible through the technology of Computer Vision. At the Wizarding World of Harry Potter in Universal Studios the tourists can perform “real magic” at certain locations(where the motion capture system is installed) using specially made wands with retro-reflective beads at the tip.

    How do Harry Potter interactive wands work?

    The interactive displays at Universal Studios’ Wizarding World of Harry Potter have infrared cameras in place, which are ready to read the correct movements of retroflector-tipped wands. Move your wand in the right way, and the cameras will recognise your spell and set window displays in motion. Oooooo…magic!

    How do I know this? Thanks to William Osman and Allen Pan, who used this Wizarding World technology to turn cheap hot dogs into their own unique wands! Those boys…

    Hacking Wands at Harry Potter World

    How to make your very own mostly-functional interactive wand. Please don’t ban me from Universal Studios. Links on my blog: http://www.williamosman.com/2017/12/hacking-harry-potter-wands.html Allen’s Channel: https://www.youtube.com/channel/UCVS89U86PwqzNkK2qYNbk5A Support us on Patreon: https://www.patreon.com/williamosman Website: http://www.williamosman.com/ Facebook: https://www.facebook.com/williamosmanscience/ InstaHam: https://www.instagram.com/crabsandscience/ CameraManJohn: http://www.johnwillner.com/

    For his Raspberry Pi-enabled wand project, Jasmeet took that same Wizarding World concept to create a desktop storage box that opens and closes in response to the correct flicks of a wand.

    A simple night vision camera can be used as our camera for motion capture as they also blast out infrared light which is not visible to humans but can be clearly seen with a camera that has no infrared filter.

    So, the video stream from the camera is fed into a Raspberry Pi which has a Python program running OpenCV which is used for detecting, isolating and tracking the wand tip. Then we use SVM (Simple Vector Machine) algorithm of machine learning to recognize the pattern drawn and accordingly control the GPIOs of the raspberry pi to perform some activities.

    For more information on the project, including all the code needed to get started, head over to hackster.io to find Jasmeet’s full tutorial.

    Website: LINK

  • Arduino Nano turned into universal IR translator

    Arduino Nano turned into universal IR translator

    Reading Time: < 1 minute

    Arduino Nano turned into universal IR translator

    Arduino TeamFebruary 7th, 2019

    After purchasing a new television, maker Andreas Spiess’ remote no longer worked seamlessly with the controller his family had been using. While a universal remote could have solved the problem, in order to keep things simple to use, he instead came up with an infrared “babel fish” signal translator—named after the language translation animal Hitchhiker’s Guide to the Galaxy’s.

    The device receives infrared signals from the original remote, then uses an Arduino Nano to pass the properly translated pulses on to his TV and receiver. A 3W IR diode transmits these new signals with the help of an N-channel MOSFET, giving it enough power to control each component, even without the proper line-of-sight orientation. 

    It’s a hack that could be useful in many situations, and Speiss goes over how it was made, along with design requirements in the video below.

    [youtube https://www.youtube.com/watch?v=5yyy7h7qh80?feature=oembed&w=500&h=281]

    Website: LINK