Implementing The Exponential Function

Ask ordinary software developers how to code an exponential function (that is, ex) and most will tell you to simply write an expression in their favorite high level language. But a significant slice of Hackaday readers will program tiny machines down to the bare metal or need more speed or precision than available with a customary implementation. [Pseduorandom] knows quite a few ways to do the calculation, and while it isn’t light reading for the math-phobic, it is an interesting tour.

The paper covers a variety of ways to calculate the function ranging from various Taylor series approximations, Lagrange interpolation, and Chebyshev interpolation. The paper is somewhat abstract, but there are Python and C++ examples to help make it concrete.

Continue reading “Implementing The Exponential Function”

Make Your Own Pet Fire Breathing Dragon

[Jorvon Moss] a.k.a. [Odd_Jayy] is known as a maker of “companion robots” which he carriers perched on top of his shoulders. (I don’t know about you, but we’re getting some pretty strong Ash and Pikachu vibes.)

In one of his recent builds, he decided to give his companion bot a bit of sizzle. His Widget Dragon Companion Bot is an impressive 3D printed build, divided into a surprisingly few parts. The robot is controlled using an Adafruit Crickit, marketed specifically for robotics projects, and is easily programmed using the increasingly popular Microsoft MakeCode.

With a few servos, [Odd Jay] was able to animate his bot giving it more of an “alive” feel. Finally, he added a vape pen to give the dragon some pyrotechnic effects.

This is just the kind of energy we love to see here at Hackaday. While you’re around, take a look at some of [Odd_Jayy’s] other robot projects and head over to his Instagram page to see more real-time project updates.

Build A Lathe Like It’s 1777

We’ve seen quite a few scratch built lathes here at Hackaday, but none quite like the handcrafted pole lathe put together by [Jon Townsend] and his band of Merry Men as part of their effort to build a period-accurate 18th century log cabin homestead. With the exception of a few metal spikes here and there, everything is made out of lumber harvested from the forest around them.

The lathe is designed to be a permanent structure on the homestead, with two poles driven into the ground to serve as legs. Two rails, made of a split log, are then mounted between them. The movable components of the lathe, known as “puppets” in the parlance of the day, are cut so they fit tightly between the rails but can still be moved back and forth depending on the size of the work piece. With two metal spikes serving as a spindle, the log to be turned down is inserted between the puppets, and wedges are used to lock everything in place.

So that’s the easy part. But how do you spin it? The operator uses a foot pedal attached to a piece of rope that’s been wound around the log and attached to a slender pole cantilevered out over the lathe. By adjusting the length and angle of this pole, the user can set the amount of force it takes to depress the pedal. When the pedal is pushed down the log will spin one way, and when the pole pulls the pedal back up, it will spin the other.

Since the tools only cut in one direction, the user has to keep letting the pressure off when the log spins back around. The fact that the work piece isn’t continuously rotating in the same direction makes this very slow going, but of course, everything was just a bit slower back in the 18th century.

So now that we’ve seen lathes made from wood, intricately cut slabs of stone, and a grab bag of junkyard parts, there’s only one question left. Why do you still not have one?

Continue reading “Build A Lathe Like It’s 1777”

LED Art Hack Chat

Join us on Wednesday, July 1 at noon Pacific for the LED Art Hack Chat with Aaron Oppenheimer!

From the first time humans crawled into a cave with a bit of charcoal to sketch scenes from the world around them, artists have been searching for new media and new ways to express themselves. Natural products ruled for thousands of years, with pigments stolen or crafted from nature as well as wood, ivory, bone, and stone for carving. Time and experience guided our ancestors to new and better formulations and different materials, to the point that what qualifies as art and what we’d normally think of as technology have, in many cases, blended into one, with the artist often engineering projects of mammoth proportions and breathtaking beauty.

Aaron Oppenheimer co-founded color+light, a company that specializes in large-scale custom art installations for companies like Google, Nike, and Nissan. One of their projects, the “Oddwood Tree”, is displayed alongside other gigantic art pieces at Area15 on the Las Vegas strip. His most recent project, fluora, is a digital houseplant, with addressable LEDs in the leaves that can be controlled by a smartphone app or respond to stimuli in the environment.

Aaron will join us on the Hack Chat to discuss the LED as artistic medium. Join us as we learn what it takes to make enormous art that’s strong enough to interact with yet responsive enough to be engaging.

join-hack-chatOur Hack Chats are live community events in the Hackaday.io Hack Chat group messaging. This week we’ll be sitting down on Wednesday, July 1 at 12:00 PM Pacific time. If time zones have you down, we have a handy time zone converter.

Click that speech bubble to the right, and you’ll be taken directly to the Hack Chat group on Hackaday.io. You don’t have to wait until Wednesday; join whenever you want and you can see what the community is talking about.

Continue reading “LED Art Hack Chat”

Linux-Fu: Parallel Universe

At some point, you simply run out of processing power. Admittedly, that point keeps getting further and further away, but you can still get there. If you run out of CPU time, the answer might be to add more CPUs. However, sometimes there are other bottlenecks like memory or disk space. However, it is also likely that you have access to multiple computers. Who doesn’t have a few Raspberry Pis sitting around their network? Or maybe a server in the basement? Or even some remote servers “in the cloud.” GNU Parallel is a tool that lets you spread work across multiple tasks either locally to remote machines. In some ways, it is simple, since it looks sort of like xargs but with parallel execution. On the other hand, it has myriad options and configurations that can make it a little daunting to use. Continue reading “Linux-Fu: Parallel Universe”

Updating The Language Of SPI Pin Labels To Remove Casual References To Slavery

This morning the Open Source Hardware Association (OSHWA) announced a resolution for changing the way SPI (Serial Peripheral Interface) pins are labelled on hardware and in datasheets. The protocol originally included MOSI/MISO references that stand for “Master Out, Slave In” and “Master In, Slave Out”. Some companies and individuals have stopped using these terms over the years, but an effort is being taken up to affect widespread change, lead by Nathan Seidle of Sparkfun.

The new language for SPI pin labeling recommends the use of SDO/SDI (Serial Data Out/In) for single-role hardware, and COPI/CIPO for “Controller Out, Peripheral In” and “Controller In, Peripheral Out” for devices that can be either the controller or the peripheral. The change also updates the “SS” (Slave Select) pin to use “CS” (Chip Select).

SPI is widely used in embedded system design and appears in a huge range of devices, with the pin labels published numerous times in everything from datasheets and application notes to written and video tutorials posted online. Changing the labels removes unnecessary references to slavery without affecting the technology itself. This move makes embedded engineering more inclusive, an ideal that’s easy to get behind.

[2022 Editor’s Note: The OSHWA changed its recommended naming to PICO/POCI for “Peripheral In, Controller Out” and “Peripheral Out, Controller In”. Fine by us! I’ve updated this throughout the rest of the article because it doesn’t change Mike’s original argument at all.]

Continue reading “Updating The Language Of SPI Pin Labels To Remove Casual References To Slavery”

Does PHP Have A Future, Or Are Twenty Five Years Enough?

In June, 1995, Rasmus Lerdorf made an announcement on a Usenet group. You can still read it.

Today, twenty five years on, PHP is about as ubiquitous as it could possibly have become. I’d be willing to bet that for the majority of readers of this article, their first forays into web programming involved PHP.

Announcing the Personal Home Page Tools (PHP Tools) version 1.0.

These tools are a set of small tight cgi binaries written in C.

But no matter what rich history and wide userbase PHP holds, that’s no justification for its use in a landscape that is rapidly evolving. Whilst PHP will inevitably be around for years to come in existing applications, does it have a future in new sites?

Continue reading “Does PHP Have A Future, Or Are Twenty Five Years Enough?”