AI Code Review The Right Way

Do you use a spell checker? We’ll guess you do. Would you use a button that just said “correct all spelling errors in document?” Hopefully not. Your word processor probably doesn’t even offer that as an option. Why? Because a spellchecker will reject things not in its dictionary (like Hackaday, maybe). It may guess the wrong word as the correct word. Of course, it also may miss things like “too” vs. “two.” So why would you just blindly accept AI code review? You wouldn’t, and that’s [Bill Mill’s] point with his recent tool made to help him do better code reviews.

He points out that he ignores most of the suggestions the tool outputs, but that it has saved him from some errors. Like a spellcheck, sometimes you just hit ignore. But at least you don’t have to check every single word.

Continue reading “AI Code Review The Right Way”

Robots Are Coming For Your Berry Good Job

We don’t know if picking blackberries at scale is something people enjoy doing. But if you do, we have bad news. The University of Arkansas wants to put you out of a job in favor of your new robot overlord. It turns out that blackberries in Arkansas alone are a $24 million business. The delicate berries are typically hand-picked.

The robot hand that can do the same job has three soft fingers and tendons made from guitar strings. Each finger has a force sensor at the tip so it can squeeze the berries just right. How much force does it take to grab a blackberry? To find out, researchers placed sensors on the fingers of experienced pickers and used the data to guide their design. Researchers claim they were inspired by the motion of a tulip opening and closing each day.

Your berry picking job is safe for now, though. They don’t have the vision system to actually find the berries. Not yet, anyway. Of course in the meantime, the gripper could be used for anything that needs a delicate touch.

Oddly, everyone seems to want to develop robots to pick agricultural items. We are usually more interested in a different kind of picking.

One Man’s Trash… Bicycle Edition

[Remy van Elst] found an obsolete bike navigation system, the Navman Bike 1000, in a thrift store for €10. The device was a rebadged Mio Cyclo 200 from 2015. Can a decade-old GPS be useful? Well, the answer depends on a little reverse engineering.

There were some newer maps available, but they wouldn’t download using the official software. Out comes WireShark and mitmproxy. That allowed [Remy] to eavesdrop on what was going on between the box and its home server. From there he could intercept the downloaded software image, which in turn yielded to scrutiny. There was one executable, but since the device mounted as a drive, he was able to rename that executable and put his own in using the same name.

The device turns out to run Windows CE. It could even run DOOM! Once he was into the box with a file manager, it was fairly straightforward to add newer software and even update the maps using OpenStreetMaps.

This is a great example of how a little ingenuity and open source tools can extend the life of consumer electronics. It isn’t always as easy to find an entry point into some device like this. Then again, sometimes it’s a little easier than maybe it should be.

We’d all but forgotten Windows CE. We see many people using WireShark, but fewer running mitmproxy. It sure is useful.

Linux Fu: The Cheap Macropad Conundrum

You can get cheap no-brand macropads for almost nothing now. Some of them have just a couple of keys. Others have lots of keys, knobs, and LEDs. You can spring for a name brand, and it’ll be a good bet that it runs QMK. But the cheap ones? Get ready to download Windows-only software from suspicious Google Drive accounts. Will they work with Linux? Maybe.

Of course, if you don’t mind the keypad doing whatever it normally does, that’s fine. These are little more than HID devices with USB or Bluetooth. But what do those keys send by default? You will really want a way to remap them, especially since they may just send normal characters. So now you want to reverse engineer it. That’s a lot of work. Luckily, someone already has, at least for many of the common pads based around the CH57x chips.

Continue reading “Linux Fu: The Cheap Macropad Conundrum”

Solar Light? Mains Light? Yes!

So you want a light that runs off solar power. But you don’t want it to go dark if your batteries discharge. The answer? A solar-mains hybrid lamp. You could use solar-charged batteries until they fall below a certain point and then switch to mains, but that’s not nearly cool enough. [Vijay Deshpande] shows how to make a lamp that draws only the power it needs from the mains.

The circuit uses DC operation and does not feed power back into the electric grid. It still works if the mains is down, assuming the solar power supply is still able to power the lamp. In addition, according to [Vijay], it will last up to 15 years with little maintenance.

The circuit was developed in response to an earlier project that utilized solar power to directly drive the light, when possible. If the light was off, the solar power went to waste. Also, if the mains power failed at night, no light.

The answer, of course, is to add a battery to the system and appropriate switching to drive the lights or charge the battery and only draw power from the mains when needed. Since the battery can take up the slack, it becomes easier to load balance. In periods of low sunlight, the battery provides the missing power until it can’t and then the mains supply takes over.

Comparators determine whether there is an under-voltage or over-voltage and use this information to decide whether the battery charges or if the main supply takes over. Some beefy MOSFETs take care of the switching duties. Overall, a good way to save and reuse solar cell output while still drawing from the grid when necessary.

Small solar lights don’t take much, but won’t draw from commercial power. Solar “generators” are all the rage right now, and you could probably adapt this idea for that use, too.

Models Of Wave Propagation

[Stoppi] always has interesting blog posts and videos, even when we don’t understand all the German in them. The latest? Computer simulation of wave propagation (Google Translate link), which, if nothing else, makes pretty pictures that work in any language. Check out the video below.

Luckily, most browsers will translate for you these days, or you can use a website. We’ve seen waves modeled with springs before, but between the explanations and the accompanying Turbo Pascal source code, this is worth checking out.

Continue reading “Models Of Wave Propagation”

Learn Computing? Head For MonTana!

We’ve often thought that it must be harder than ever to learn about computers. Every year, there’s more to learn, so instead of making the gentle slope from college mainframe, to Commodore 64, to IBM PC, to NVidia supercomputer, you have to start at the end. But, really, you don’t. You can always emulate computers from simpler times, and even if you don’t need to, it can be a lot of fun.

That’s the idea behind the MonTana mini-computer. It combines “…ideas from the PDP-11, MIPS, Scott CPU, Game Boy, and JVM to make a relatively simple 16-bit computer…”

The computer runs on Java, so you can try it nearly anywhere. The console is accessed through a web browser and displays views of memory, registers, and even something that resembles a Game Boy screen. You’ll need to use assembly language until you write your own high-level language (we’d suggest Forth). There is, however, a simple operating system, MTOS.

This is clearly made for use in a classroom, and we’d love to teach a class around a computer like this. The whole thing reminds us of a 16-bit computer like the PDP-11 where everything is a two-byte word. There are only 4K bytes of memory (so 2K words). However, you can accomplish a great deal in that limited space. Thanks to the MTOS API, you don’t have to worry about writing text to the screen and other trivia.

It looks like fun. Let us know what you’ll use it for. If you want to go down a level, try CARDIAC. Or skip ahead a little, and teach kids QBasic.