Warnings Are Your Friend – A Code Quality Primer

If there’s one thing C is known and (in)famous for, it’s the ease of shooting yourself in the foot with it. And there’s indeed no denying that the freedom C offers comes with the price of making it our own responsibility to tame and keep the language under control. On the bright side, since the language’s flaws are so well known, we have a wide selection of tools available that help us to eliminate the most common problems and blunders that could come back to bite us further down the road. The catch is, we have to really want it ourselves, and actively listen to what the tools have to say.

We often look at this from a security point of view and focus on exploitable vulnerabilities, which you may not see as valid threat or something you need to worry about in your project. And you are probably right with that, not every flaw in your code will lead to attackers taking over your network or burning down your house, the far more likely consequences are a lot more mundane and boring. But that doesn’t mean you shouldn’t care about them.

Buggy, unreliable software is the number one cause for violence against computers, and whether you like it or not, people will judge you by your code quality. Just because Linus Torvalds wants to get off Santa’s naughty list, doesn’t mean the technical field will suddenly become less critical or loses its hostility, and in a time where it’s never been easier to share your work with the world, reliable, high quality code will prevail and make you stand out from the masses.

Continue reading “Warnings Are Your Friend – A Code Quality Primer”

Tilt-Rotor Plane Needs Flight Controller Hack To Get Airborne

Part of the charm of quadcopters is the challenge that building and flying them presents. In need of complex sensors and computational power to just get off the ground and under tremendous stresses thanks to their massively powerful motors, they often seem only barely controlled in flight. Despite these challenges, quadcopter flight has been reduced to practice in many ways, leaving hobbyists in search of another challenge.

[Tom Stanton] is scratching his creative itch with this radio-controlled tilt-rotor airplane that presents some unique problems and opportunities. Tilt-rotor planes are, as the name implies, able to swivel their propellors and transition them from providing forward thrust to providing verticle lift. With the rotors providing lift, the aircraft is able to hover and perform vertical take-off and landing (VTOL); switched to thrust mode, wings provide the lift for horizontal flight.

[Tom]’s realization of this design seems simple – a spar running through the wing holding BLDC motors and props is swiveled through 90° by a servo to transition the aircraft. Standard control surfaces on the wings and tail take care of horizontal flight. Actually getting an off-the-shelf flight controller to deal with the transitions was tricky. [Tom] ended up adding an Arduino to intercept the PWM signals the flight controller normally sends directly to the servos and speed controls to provide the coordination needed for a smooth transition. Full details in the video below, and some test flights which show that an RC VTOL is anything but a beginner’s plane.

[Tom] is proving himself to be quite the Renaissance man these days. Between air-powered piston engines, over-balance trebuchets, and popping the perfect wheelie, he seems to have covered all the bases and done his best to keep our tip line stocked.

Continue reading “Tilt-Rotor Plane Needs Flight Controller Hack To Get Airborne”

Welding Robot Takes On A Hot, Dirty, Dangerous Job

They used to say that robots would take over the jobs too dirty or dangerous for humans. That is exactly what [Joel Sullivan] had in mind when he created this welding robot. [Joel] designed the robot for the OSB industry. No, that’s not a new operating system, it’s short for Oriented Strand Board. An engineered lumber, OSB is made of strands (or chips) of wood. It’s similar to plywood but doesn’t require large thin sheets of lumber. To make a panel of OSB, a 5-inch thick matt of wood chips is mixed with glue and compressed down to 5/16″ at 7500 PSI and 400° F.

The presses used to make OSB are a massively parallel operation. 20 or more boards can be pressed at once. Thy press is also a prime area for damage. A nut or bolt hidden in the wood will dig into the press, causing a dent which will show up on every sheet which passes through that section. The only way to fix the press is to shut it down, partially dismantle it, and fill the void in with a welder. [Joel’s] robot eliminates most of the downtime by performing the welding on a still hot, still assembled press.

The robot looks like it was inspired by BattleBots, which is fitting as the environment it works in is more like a battleground. It’s a low, wide machine. In the front are two articulated arms, one with a welder, and one with a die grinder. The welder fills any voids in the press platen, and the die grinder grinds the fresh welds flat.  An intel NUC controls things, with plenty of motor drives, power supplies, and relays on board.

[Joel’s] bot is tethered, with umbilicals for argon, electricity and compressed air. Air travels through channels throughout the chassis and keeps the robot cool on the hot press. Everything is designed for high temperatures, even the wheels. [Joel] tried several types of rubber, but eventually settled on solid aluminum wheels. The ‘bot doesn’t move very fast, so there is plenty of traction. Some tiny stepper motors drive the wheels. When it’s time to weld, pneumatic outriggers lock the robot in place inside the narrow press.

Cameras with digital crosshairs allow the operator to control everything through a web interface. Once all the parameters are set up, the operator clicks go and sparks fly as the robot begins welding.

If you’re into seriously strong robots, check out trackbot, or this remote-controlled snow blower!

Continue reading “Welding Robot Takes On A Hot, Dirty, Dangerous Job”