Build A Sprint Race Timer To Help Your Training

Any exercise is a positive thing, but if you’re looking to improve over time, you’ve got to measure your performance. [Nikodem Bartnik] is a runner and is looking to improve his sprinting abilities. Naturally, an Arduino is the perfect companion to help in this quest (YouTube link, embedded below).

The Arduino is built into a 3D printed enclosure, with several buttons for input. Rather unconventionally, a small e-paper display was chosen for the interface. This has the benefits of being easily readable outdoors during the day, as well as using very little power.

The device is simple to use, and makes training alone a breeze. The distance to be run can be selected, and the unit emits a series of beeps to indicate to the runner when to begin. The timer is placed at the finish line, and detects the runner passing by with an ultrasonic sensor.

It’s a useful build for sprint timing, and could be made even more versatile with a remote start function. If you need to time Hot Wheels instead of sprinters, don’t worry – there’s a build for you too. Video after the break.

Continue reading “Build A Sprint Race Timer To Help Your Training”

Stator Library Makes Your Arduino Code Easier To Read

The readability of your code can make the difference between your project being a joy to work on, or an absolute headache. This goes double when collaborating with others. Having easily parsed code reduces your cognitive load and makes solving problems easier. To try and help with this, [PTS93] developed the Stator library to make certain common tasks simpler to read.

The aim of the library is to get rid of piles of state tracking variables and endless if/else statements – hence the name. It’s designed primarily for the Arduino IDE but doesn’t have any dependencies on the API, so can be used in other C++ environments. It comes with a variety of neat tools for common jobs, such as reading an analog sensor with hysteresis around a trigger point, as well as easy ways to track state changes across multiple variables. By using basic English terms instead of condition checks and mathematical operators, it can make things more readable and easier to follow.

The power of the Arduino platform has always been in its easy to use libraries that make everything easier, from interfacing LCDs to working with Amazon Dash buttons.

Sniffing CAN To Add New Features To A Modern Car

It used to be that there wasn’t a problem on the average car that couldn’t be solved with a nice set of wrenches, a case of beer, and a long weekend. But the modern automobile has more in common with a spaceship than those vintage rides of yesteryear. Bristling with sensors and electronics, we’re at the point that some high-end cars need to go back to the dealer for even minor repairs. It’s a dark time for the neighborhood grease monkey.

But for those of us who are more likely to spend their free time working with a compiler than a carburetor, a modern car can be an absolute wonderland. That’s what [TJ Bruno] found when he recently started experimenting with the CAN bus on his 2017 Chevy Cruze. Not only was he able to decode how the different switches and buttons on the dashboard communicated with the vehicle’s onboard systems, he was able to hack in a forward-looking camera that’s so well integrated you’d swear it was a factory option.

The idea started simple enough: using some relays, [TJ] planned on physically switching the video feed going to the Chevy’s dashboard between the stock rear camera and his aftermarket front camera. That’s all well and good, but the car would still only bring up the video feed when the gear selector was put in reverse; not exactly helpful when he’s trying to inch his way into a tight spot. He needed to find a way to bring up the video display when the car was moving forward.

With a PCAN-USB adapter connected to the car’s OBD-II port, he shifted into and out of reverse a few times and noted which messages got transmitted on the network. It wasn’t long before he isolated the proper message, and when he injected it with his laptop, the dashboard display switched over to the backup camera regardless of what gear the car was in. Building on this success, he eventually figured out how to read the status of all the buttons on the car’s dashboard, and programmed an Arduino to listen for the appropriate signals.

The final piece of the puzzle was combing bringing both of these capabilities, so that went the appropriate button was pressed on the dashboard the Arduino would not only send the signal to turn on the video display, but kick the relays over to switch the camera source. Now [TJ] has a front-facing camera that can be called up without having to kludge together some button or switch that would never match the modern styling of the vehicle’s interior.

A couple years back we saw a similar project to add a backup camera to a Peugeot 207 that was too old to have one from the factory, and more recently we saw how CAN hacking can allow you to fight back when your car’s touch screen interface robs you of simple pleasures like pushing buttons and turning knobs.

Continue reading “Sniffing CAN To Add New Features To A Modern Car”

Arduino’s Pluggable Discovery Programs With Any Protocol

The first Arduino was serial, and over the decade and a half, this has been the default way to upload code to an Arduino board. In 2008, support for in-circuit programmers was added, and later port detection was added. The latest version of the Arduino IDE adds something new: pluggable discovery. Now any protocol is supported by the Arduino IDE.

This feature is the brainchild of [Paul Stoffregen], creator of the Teensy. If you’ve ever used a Teensy, you’ll remember the Teensyduino application used to upload code to the board. The Teensy uses HID protocol instead of serial for uploading. After working to improve the integration between the Teensy and Arduino IDE, [Paul] stated extending the DiscoveryManager. After some discussion with the Arduino developers, this feature was then added to Arduino 1.8.9, released a month or so ago.

There are some issues with Pluggable Discovery, most importantly that it doesn’t yet exist in the Arduino Command Line Interface (yeah, that exists too). If you’re looking to contribute to Open Source, that would be a nice project to pick up.

With the right JSON, and configuration, it is now theoretically possible to extend the Arduino IDE to any sort of protocol. This means (again, theoretically), it’s possible to update the firmware in your DIY MIDI synth over SysEx message, or a parallel port, maybe. Someone is going to upload to an Arduino board over PCIe, eventually.

Arduino Leonardo Gets A Lockable Bootloader

Security is something that’s far too often overlooked in embedded devices. One of the main risks is that if the device doesn’t verify the authenticity of incoming firmware updates. [Walter Schreppers] was working on a USB password storage device, so security was paramount. Thus, it was necessary to develop a secure bootloader.

[Walter]’s device was based upon the Arduino Leonardo. Starting with the Caterina bootloader, modifications were made to enable the device to be locked and unlocked for programming. This can be done in a variety of ways, depending on how things are setup. Unlocking can be by using a secret serial string, an onboard jumper, and [Walter] even suspects a SHA1 challenge/response could be used if you were so inclined.

It’s never too soon to start thinking about security in your projects. After all, we must stave off the cyberpunk future in which leather-clad youths flick all your lights on and off before burning your house down in the night by overclocking the water heater. Naturally, we’ve got a primer to get you going in the right direction. Happy hacking!

Insert Coin (Cell) To Play LedCade

In this era of 4K UHD game console graphics and controllers packed full of buttons, triggers, and joysticks, it’s good to occasionally take a step back from the leading edge. Take a breath and remind ourselves that we don’t always need all those pixels and buttons to have some fun. The LedCade is a μ (micro) arcade game cabinet built by [bobricius] for just this kind of minimalist gaming.

Using just three buttons for input and an 8×8 LED matrix for output, the LedCade can nevertheless play ten different games representing classic genres of retro arcade gaming. And in a brilliant implementation of classic hardware hacking humor, a player starts their game by inserting not a monetary coin but a CR2032 coin cell battery.

Behind the screen is a piezo speaker for appropriately vintage game sounds, and an ATmega328 with Arduino code orchestrating the fun. [bobricius] is well practiced at integrating all of these components as a result of developing an earlier project, the single board game console. This time around, the printed circuit board goes beyond being the backbone, the PCB sheet is broken apart and reformed as the enclosure. With classic arcade cabinet proportions, at a far smaller scale.

If single player minimalist gaming isn’t your thing, check out this head-to-head gaming action on 8×8 LED arrays. Or if you prefer your minimalist gaming hardware to be paper-thin, put all the parts on a flexible circuit as the Arduflexboy does.

Talking Washer Is A Clean Solution For The Visually Impaired

Have you shopped for an appliance lately? They’re all LEDs, LEDs everywhere. You might say that manufacturers are out of touch with the utility of tactile controls. [Wingletang]’s fancy new washing machine is cut from this modern cloth. While it does have a nice big knob for selecting cycles, the only indication of your selection is an LED. This isn’t an issue for [Wingletang], but it’s a showstopper for his visually impaired wife.

They tried to make tactile signposts for her most-used cycles with those adhesive rubber feet you use to keep cabinet doors quiet. But between the machine’s 14(!) different wash cycles and the endlessly-rotating selector knob, the tactile map idea was a wash. It was time to make the machine talk.

For his very first microcontroller project, [Wingletang] designed a completely non-invasive and totally awesome solution to this problem. He’s using LDRs arranged in a ring to detect which LED is lit. Recycled mouse pad foam and black styrene keep ambient light from creating false positives, and double as enclosure for the sensor and support boards. As [Mrs. Wingletang] cycles through with the knob, an Arduino clone mounted in a nearby project box determines which program is selected, and a Velleman KA02 audio shield plays a recorded clip of [Wingletang] announcing the cycle number and description.

The system, dubbed SOAP (Speech Output Announcing Programmes), has been a great help to [Mrs. Wingletang] for about the last year. Watch her take it for a spin after the break, and stick around for SOAP’s origin story and walk-through videos.

It’s baffling that so few washers and dryers let you know when they’re finished. Don’t waste your time checking over and over again—Laundry Spy waits for the vibrations to end and sends you a text.

Continue reading “Talking Washer Is A Clean Solution For The Visually Impaired”