Wio Terminal Makes Passable Oscilloscope

There was a time when getting a good oscilloscope not only involved a large outlay of capital, but also required substantial real estate on a workbench. The situation has improved considerably for the hobbyist, but a “real” scope can still cost more than what a beginner is looking to spend. Luckily, plenty of modern microcontrollers are capable of acting as a basic oscilloscope in a pinch, provided there’s a display available to interface with it. Combined with the right software, the Wio Terminal looks like a promising option.

The Wio Terminal is a platform gaining some popularity due to its fairly capable SAMD51 microcontroller and also its integration with a display and a number of input buttons. On the hardware side, [mircemk] mounted the Terminal in a convenient vertical orientation and broke out a pair of connectors for the inputs.

But it’s the software that really makes this project work. [Play With Microcontroller] originally developed the firmware for the PIC24 back in 2017, but ported the code over to the Wio Terminal a couple years back. Noting that the microcontroller is not particularly fast, the project doesn’t exactly match the specifications or capabilities of a commercial unit. But still, it does an impressive job of recreating the experience of using a modern digital scope

The Wio Terminal is a device we’ve seen around here for a few unique projects, among them a device for preventing repetitive strain injuries while using a computer mouse and another that is a guide for game development in MicroPython. And if you’re just itching to port oscilloscope software to accessible but under-powered microcontrollers, be sure to check out [mircemk]’s other oscilloscope projects like this one built around the STM32 microcontroller.

Continue reading “Wio Terminal Makes Passable Oscilloscope”

A purple 3D-printed case with an LCD screen on the front and Pikachu on top

Avoid Repetitive Strain Injury With Machine Learning – And Pikachu

The humble mouse has been an essential part of the desktop computing experience ever since the original Apple Macintosh popularized it in 1984. While mice enabled user-friendly GUIs, thus making computers accessible to more people than ever, they also caused a significant increase in repetitive strain injuries (RSI). Mainly caused by poor posture and stress, RSI can lead to pain, numbness and tingling sensations in the hand and arm, which the user might only notice when it’s too late.

Hoping to catch signs of RSI before it manifests itself, [kutluhan_aktar] built a device that allows him to track mouse fatigue. It does so through two sensors: one that measures galvanic skin response (GSR) and another that performs electromyography (EMG). Together, these two measurements should give an indication of the amount of muscle soreness. The sensor readout circuits are connected to a Wio Terminal, a small ARM Cortex-M4 development board with a 2.4″ LCD.

However, calculating muscle soreness is not as simple as just adding a few numbers together; in fact the link between the sensor data and the muscles’ state of health is complicated enough that [kutluhan] decided to train a TensorFlow artificial neural network (ANN), taking into account observed stress levels collected in real life. The network ran on the Wio while he used the mouse, pressing buttons to indicate the amount of stress he experienced. After a few rounds of training he ended up with a network that reached an accuracy of more than 80%.

[kutluhan] also designed a rather neat 3D printed enclosure to house the sensor readout boards as well as a battery to power the Wio Terminal. Naturally, the case was graced by a 3D rendition of Pikachu on top (get it? a mouse Pokémon that can paralyze its opponents!). We’ve seen [kutluhan]’s fondness for Pokémon-themed projects in his earlier Jigglypuff CO2 sensor.

Although the setup with multiple sensors doesn’t seem too practical for everyday use, the Mouse Fatigue Estimator might be a useful tool to train yourself to keep good posture and avoid stress while using a mouse. If you also use a keyboard (and who doesn’t?), make sure you’re using that correctly as well.

Continue reading “Avoid Repetitive Strain Injury With Machine Learning – And Pikachu”

Simple MicroPython Game Is A 30 Minute Game Dev Course

Sometimes, it’s really useful to watch a project’s parts come together one piece at a time in order to get a complete understanding and mental picture of the whole, and we found that to be the case with this simple, retro-inspired sample game from [ezContents]. (Video, embedded below.) The code is on GitHub but if you’re at all interested in what goes on behind the scenes in a game like that, don’t miss the video.

In the video, each game element and function is illustrated, showing exactly what gets done and why. This part is collision detection (click to enlarge.)

These sprite-based games are mostly about moving a small graphical object (a sprite) around a screen in response to user input, and managing what happens when collisions are detected between the player’s sprite and other sprites like enemies, projectiles, and so forth. The development process is wonderfully documented and demonstrated in a video, as each separate part of functionality gets built and explained one piece at a time.

The simple game is made using ArduPy (which is MicroPython combined with Arduino APIs) using Seeed Studios’ Wio Terminal, a small microcontroller development board with integrated screen, sensors, and button inputs including a little directional clicker that [ezContents] uses as a joystick.

The video of the whole process is embedded below; give it a watch and you’ll maybe come away with inspiration, but you’ll definitely have a much better understanding of how these types of games are developed, even if you’re not using the same hardware or development environment.

Continue reading “Simple MicroPython Game Is A 30 Minute Game Dev Course”