Companies like Google and Microsoft have been investing heavily in the concept of cloud gaming, where a player uses their computer or a mobile device to stream the video feed of a game that’s running on powerful machine tucked away in a data center somewhere. With this technology you can play the latest and greatest titles, even if the device you’re using doesn’t have the processing power to run it locally.
Considering the Switch is already a portable system, it’s not too surprising Nintendo doesn’t seem interested in the technology. But that didn’t stop [Stan Dmitriev] from doing a bit of experimentation on his own. With little more than a Raspberry Pi 4 and Trinket M0, he’s demonstrated that users can remotely interact with the Switch well enough to play games in real time.
The setup is fairly straightforward. A cheap HDMI capture device is used to grab the video from the Nintendo Switch dock, which is then streamed out to web with the help of the Pi’s hardware video encoder. Input from the user is sent over the Pi’s UART to the Trinket, which itself is running a firmware specifically developed for mimicking Nintendo Switch controllers. With so many elements involved, naturally some latency comes into play. The roughly 100 millisecond delay [Stan] is reporting isn’t exactly ideal for fast-paced gaming, but is certainly adequate for more relaxed titles.
On the software side of things, the project is using a SDK developed by [Stan]’s employer SurrogateTV. Right now you need to apply if you want to get your game or other interactive gadget up on the service, though he says it will be opened up to the public next year. But even without all the details, we’ve got a clear idea of how both the video capture and user input sides of the equation are being handled. For personal use, all you’d really need to do is put together a simple web interface to tie it all together.
This isn’t the first time we’ve seen a microcontroller used to interface with the Switch. Other consoles are a bit more selective about what kind of hardware they will talk to, but the Microsoft Adaptive Controller could potentially allow you to do something similar on the Xbox.
Storing data “in the cloud” — even if it is your own server — is all the rage. But many cloud solutions require you to access your files in a clumsy way using a web browser. One day, operating systems will incorporate generic cloud storage just like any other file system. But by using two tools, rclone and
sshfs, you can nearly accomplish this today with a little one-time setup. There are a few limitations, but, generally, it works quite well.
It is a story as old as computing. There’s something new. Using it is exotic and requires special techniques. Then it becomes just another part of the operating system. If you go back far enough, programmers had to pull specific records from mass storage like tapes, drums, or disks and deblock data. Now you just open a file or a database. Cameras, printers, audio, and even networking once were special devices that are now commonplace. If you use Windows, for example, OneDrive is well-supported. But if you use another service, you may or may not have an easy option to just access your files as a first-class file system.
rclone program is the Swiss Army knife of cloud storage services. Despite its name, it doesn’t have to synchronize a local file store to a remote service, although it can do that. The program works with a dizzying array of cloud storage providers and it can do simple operations like listing and copying files. It can also synchronize, as you’d expect. However, it also has an experimental FUSE filesystem that lets you mount a remote service — with varying degrees of success.
If you don’t like using someone like Google or Amazon, you can host your own cloud. In that case, you can probably use
sshfs to mount a file using
rclone can also do that. There are also cloud services you can self-host like OwnCloud and NextCloud. A Raspberry Pi running Docker can easily stand up one of these in a few minutes and rclone can handle these, too.
Continue reading “Linux Fu: Send In The (Cloud) Clones”
GitHub has enabled free code analysis on public repositories. This is the fruit of the purchase of Semmle, almost exactly one year ago. Anyone with write permissions to a repository can go into the settings, and enable scanning. Beyond the obvious use case of finding vulnerabilities, an exciting option is to automatically analyse pull requests and flag potential security problems automatically. I definitely look forward to seeing this tool in action.
The Code Scanning option is under the Security tab, and the process to enable it only takes a few seconds. I flipped the switch on one of my repos, and it found a handful of issues that are worth looking in to. An important note, anyone can run the tool on a forked repo and see the results. If CodeQL finds an issue, it’s essentially publicly available for anyone who cares to look for it.
Simpler Code Scanning
On the extreme other hand, [Will Butler] wrote a guide to searching for exploits using grep. A simple example, if
raw shows up in code, it often signals an unsafe operation. The terms
todo, often in comments, can signal a known security problem that has yet to be fixed. Another example is
unsafe, which is an actual keyword in some languages, like Rust. If a Rust project is going to have vulnerabilities, they will likely be in an
unsafe block. There are some other language-dependent pointers, and other good tips, so check it out.
Continue reading “This Week In Security: Code Scanning, Information Gathering, And Seams In The Cloud”
When we see RGB LEDs used in a project, they’re often used more for aesthetic purposes than as a practical source of light. It’s an easy way to throw some color around, but certainly not the sort of thing you’d try to light up anything larger than a desk with. Apparently nobody explained the rules to [Brian Harms] before he built Light[s]well.
Believe it or not, this supersized light installation doesn’t use any exotic hardware you aren’t already familiar with. Fundamentally, what we’re looking at is a WiFi enabled Arduino MKR1000 driving strips of NeoPixel LEDs. It’s just on a far larger scale than we’re used to, with a massive 4 x 8 aluminum extrusion frame suspended over the living room.
Onto that frame, [Brian] has mounted an undulating diffuser made of 74 pieces of laser-cut cardstock. Invoking ideas of waves or clouds, the light looks like its of natural or even biological origin while at the same time having a distinctively otherworldly quality to it.
The effect is even more pronounced when the RGB LEDs kick in, thanks to the smooth transitions between colors. In the video after the break, you can see Light[s]well work its way from bright white to an animated rainbow. As an added touch, he added Alexa voice control through Arduino’s IoT Cloud service.
While LED home lighting is increasingly becoming the norm, projects like Light[s]well remind us that we aren’t really embracing the possibilities offered by the technology. The industry has tried so hard to make LEDs fit into the traditional role of incandescent bulbs, but perhaps its time to rethink things.
Continue reading “Voice Controlled RGB LEDs Go Big”
We can sympathize with [Benjamin Cabé]. He has a lot of development boards and it has become painful to maintain the many toolchains for each board. We’ve also suffered from upgrading one tool breaks another tool in some obscure way. His solution? Use Github Codespaces which you can get early access for beta testers.
The idea is that you can spin off a container-specific to a GitHub repository that has all the proper versions and dependencies required to work with a project.
If you sign up for the beta, you’ll be on a waitlist, but it is interesting to see [Benjamin] go through the steps. The service is free during the beta and you get two codespaces. Presumably, you’ll eventually be able to pay for more capability.
The idea is good, but we’ll have to see about the implementation. A preconfigured container might move from machine to machine or even to deep storage for later reconstitution. Flashing the binary image to the device looked painful from the browser. We’ve seen it done nicely with, for example, the online Arduino IDE but it did take some installable software helpers to do that.
We’ll be curious about how many different platforms this will support. However, you can roll your own version of this and avoid the cloud using Docker or even a full-blown VM like VirtualBox. Sure, it is more work, but you control your destiny. Add something like Platform.IO and your choice of development tools and you can avoid having so many competing development tools all in your main computer.
Continue reading “Codespaces For Embedded Development”
Flying a quadcopter or other drone can be pretty exciting, especially when using the video signal to do the flying. It’s almost like a real-life video game or flight simulator in a way, except the aircraft is physically real. To bring this experience even closer to the reality of flying, [Kevin] implemented stereo vision on his quadcopter which also adds an impressive amount of functionality to his drone.
While he doesn’t use this particular setup for drone racing or virtual reality, there are some other interesting things that [Kevin] is able to do with it. The cameras, both ESP32 camera modules, can make use of their combined stereo vision capability to determine distances to objects. By leveraging cloud computing services from Amazon to offload some of the processing demands, the quadcopter is able to recognize faces and keep the drone flying at a fixed distance from that face without needing power-hungry computing onboard.
There are a lot of other abilities that this drone unlocks by offloading its resource-hungry tasks to the cloud. It can be flown by using a smartphone or tablet, and has its own web client where its user can observe the facial recognition being performed. Presumably it wouldn’t be too difficult to use this drone for other tasks where having stereoscopic vision is a requirement.
Thanks to [Ilya Mikhelson], a professor at Northwestern University, for this tip about a student’s project.
Pushing all of your data into “The Cloud” sounds great, until you remember that what you’re really talking about is somebody else’s computer. That means all your hard-crunched data could potentially become inaccessible should the company running the service go under or change the rules on you; a situation we’ve unfortunately already seen play out.
Which makes this project from [Zoltan Doczi] and [Róbert Szalóki] so appealing. Not only does it show how easy it can be to shuffle your data through the tubes and off to that big data center in the sky, but they send it to one of the few companies that seem incapable of losing market share: Google. But fear not, this isn’t some experimental sensor API that the Big G will decide it’s shutting down next Tuesday in favor of a nearly identical service with a different name. All your precious bits and bytes will be stored in one of Google’s flagship products: Sheets.
It turns out that Sheets has a “Deploy as Web App” function that will spit out a custom URL that clients can use to access the spreadsheet data. This project shows how that feature can be exploited with the help of a little Python code to push data directly into Google’s servers from the Raspberry Pi or other suitably diminutive computer.
Here they’re using a temperature and humidity sensor, but the only limitation is your imagination. As an added bonus, the chart and graph functions in Sheets can be used to make high-quality visualizations of your recorded data at no extra charge.
You might be wondering what would happen if a bunch of hackers all over the world started pushing data into Sheets every few seconds. Honestly, we don’t know. The last time we showed how you could interact with one of their services in unexpected ways, Google announced they were retiring it on the very same day. It was probably just a coincidence, but to be on the safe side, we’d recommend keeping the update frequency fairly low.
Back in 2012, before the service was even known as Google Sheets, we covered how you could do something very similar by manually assembling HTTP packets containing your data. We’d say this validates the concept for long-term data storage, but clearly the methodology has changed considerably in the intervening years. Somebody else’s computer, indeed.