A Hacker-Friendly Software Package For Your Next AI Project

If you’re interested in using Large Language Models (LLM) in a project, but aren’t plugged directly into the fast-developing world of artificial intelligence (AI), knowing what tool or software to use can be daunting. Luckily, [Max Woolf] created simpleaichat, which is complete with examples and documentation and minimal code complexity.

As [Max] puts it, the main motivations behind the project are to provide useful tools while making it easier for non-engineers to peer through the breathless hyperbole and see just how AI-based apps actually work. This project was directly inspired by [Max]’s own real-world software experiences in this area, particularly his frustrations with popular and much-hyped frameworks in which “Hello World” feels a lot more like Hell World.

simpleaichat is a Python package that provides easy and powerful ways to interface with the OpenAI API, makers of ChatGPT. Now, it is true that OpenAI’s models are not open source and access is not free, but they are easily one of the most capable and cost-effective services of their kind.

Prefer something a little more open, and a lot more private? There’s always the option to run an LLM locally on your own machine, possibly with the help of a tool like text-generation-webui or gpt4all. Running an LLM locally will not have the quality of OpenAI’s offerings, but it can still do the job. It’s also possible to give these local LLMs an interface that mimics OpenAI’s API, so there are loads of possibilities.

Are you getting ideas yet? Share them in the comments, or keep them to yourselves and submit a tip once your project is off the ground!

Hackaday Prize 2023: Jumperless, The Jumperless Jumperboard

Jumperless is a jumperless breadboard with multicolored LED visualization of signals in real-time. Sounds like magic? This beautifully executed entry to the 2023 Hackaday Prize by [Kevin Santo Cappuccio] uses a boatload of CH446Q analog switch ICs to perform the interconnect between the Raspberry Pi Pico header and the jumper board (or breadboard if you prefer.)

This will add some significant resistance, but for low currents and digital logic levels, this should not be a major concern. Additionally, there are two DAC channels and four ADC channels to help break out of the digital world, which could make for some very interesting non-trivial applications.

The visualization of the Pico header signals is solved neatly with a tiny wishbone-shaped PCB that is reverse-mounted to the back of the main board to illuminate upwards. The masking of the labels is done by using copper to mask off the individual signals and solder mask to draw in the legends. This PCB-level hacking is simply wonderful to see. The PCBs are designed with KiCAD, the design files for which you can find here. It appears however that [Kevin] needed to have the spring clips for the jumper board custom-made, so you’d need to contact them if you needed to get some for a build.

On the software side of things, [Kevin] currently recommends using Wokwi, to run the Arduino stack applications and to perform the signal routing to the virtual jumper board. You can follow how it works internally here. A Python-based bridge application runs on the host computer, which takes care of programming the interconnects as they are constructed, which looking at the demo in the embedded video, appears to ‘just work.’

One word of caution though — the bridge app uses Python requests and Beautiful Soup to scrape the Wowki project page, which could potentially make it vulnerable to getting out-of-sync with updates, so hopefully [Kevin] will keep track of this and keep them in sync.

Need some breadboarding tips? We got you covered. Talking of bread, here’s an 8-bit TTL breadboard-based CPU in a breadbin.

Continue reading “Hackaday Prize 2023: Jumperless, The Jumperless Jumperboard”

The Past, Present, And Future Of CircuitPython

Modern microcontrollers like the RP2040 and ESP32 are truly a marvels of engineering. For literal pocket change you can get a chip that’s got a multi-core processor running at hundreds of megahertz, plenty of RAM, and more often than not, some form of wireless connectivity. Their capabilities have been nothing short of revolutionary for the DIY crowd — on any given day, you can see projects on these pages which simply wouldn’t have been possible back when the 8-bit Arduino was all most folks had access to.

Limor Fried

Thanks to the increased performance of these MCUs, hackers and makers now even have a choice as to which programming language they want to use. While C is still the language of choice for processor-intensive tasks, for many applications, Python is now a viable option on a wide range of hardware.

This provides a far less intimidating experience for newcomers, not just because the language is more forgiving, but because it does away with the traditional compile-flash-pray workflow. Of course, that doesn’t mean the more experienced MCU wranglers aren’t invited to the party; they might just have to broaden their horizons a bit.

To learn more about this interesting paradigm shift, we invited the fine folks at Adafruit to the Hack Chat so the community could get a chance to ask questions about CircuitPython, their in-house Python variant which today runs on more than 400 devices.

Continue reading “The Past, Present, And Future Of CircuitPython”

A New Educational Robotics Platform

When looking for electronics projects to use in educational settings, there is no shortage of simple, lightweight, and easily-accessible systems to choose from. From robotic arms, drones, walking robots, and wheeled robots, there is a vast array of options. But as technology marches on, the robotics platforms need to keep up as well. This turtle-style wheeled robot called the Trundlebot uses the latest in affordable microcontrollers on a relatively simple, expandable platform for the most up-to-date educational experience.

The robot is built around a Raspberry Pi Pico, with two low-cost stepper motors to drive the wheeled platform. The chassis can be built out of any material that can be cut in a laser cutter, but for anyone without this sort of tool it is also fairly easy to cut the shapes out by hand. The robot’s functionality can be controlled through Python code, and it is compatible with the WizFi360-EVB-Pico which allows it to be remote controlled through a web application. The web interface allows easy programming of commands for the Trundlebot, including a drag-and-drop feature for controlling the robot.

With all of these features, wireless connectivity, and a modern microcontroller at the core, it is an excellent platform for educational robotics. From here it wouldn’t be too hard to develop line-follower robots, obstacle-avoiding robots, or maze-solving robots. Other components can easily be installed to facilitate these designs as well. If you’re looking for a different style robot, although not expressly for educational purposes this robotic arm can be produced for under $60.

Robodog Goes Free Thanks To Unofficial SDK

What’s better than a pretty nice legged robot? One with an alternate SDK version that opens up expensive features, of course. The author didn’t like that the original SDK only came as pre-compiled binaries restricted to the most expensive models, so rolled up their sleeves and started writing a new one.

The manufacturer’s SDK limits access to programmatic functions, but that needn’t stop you.

There are a number of commercially-available robotic quadrupeds that can trace their heritage back to the MIT Mini Cheetah design, and one of them is the Unitree Go1 series which sports a distinctive X-shaped sensor cluster on its “face”. The basic models are affordable (as far as robots go, anyway) but Unitree claims only the high-priced EDU model can be controlled via the SDK. Happily, the Free Dog SDK provides a way to do exactly that.

The SDK is a work in progress, but fully usable and allows the user to send various high level and low level commands to the Go1 robots. High level examples include things like telling the robot to perform pushups, turn 90 degrees, or walk. Low level commands are things like specifying exact positions or torque levels for individual limbs. With the new SDK, doing those things programmatically is only a Python script away.

Know any other robots that might be based on the same system? This SDK might work on them, too.

In Praise Of RPN (with Python Or C)

HP calculators, slide rules, and Forth all have something in common: reverse polish notation or RPN. Admittedly, slide rules don’t really have RPN, but you work problems on them the same way you do with an RPN calculator. For whatever reason, RPN didn’t really succeed in the general marketplace, and you might wonder why it was ever a thing. The biggest reason is that RPN is very easy to implement compared to working through proper algebraic, or infix, notation. In addition, in the early years of computers and calculators, you didn’t have much to work with, and people were used to using slide rules, so having something that didn’t take a lot of code that matched how users worked anyway was a win-win.

What is RPN?

If you haven’t encountered RPN before, it is an easy way to express math without ambiguity. For example, what’s 5 + 3 * 6?  It’s 23 and not 48. By order of operations you know that you have to multiply before you add, even if you wrote down the multiplication second. You have to read through the whole equation before you can get started with math, and if you want to force the other result, you’ll need parentheses.

With RPN, there is no ambiguity depending on secret rules or parentheses, nor is there any reason to remember things unnecessarily. For instance, to calculate our example you have to read all the way through once to figure out that you have to multiply first, then you need to remember that is pending and add the 5. With RPN, you go left to right, and every time you see an operator, you act on it and move on. With RPN, you would write 3 6 * 5 +.

While HP calculators were the most common place to encounter RPN, it wasn’t the only place. Friden calculators had it, too. Some early computers and calculators supported it but didn’t name it. Some Soviet-era calculators used it, too, including the famous Elektronika B3-34, which was featured in a science fiction story in a Soviet magazine aimed at young people in 1985. The story set problems that had to be worked on the calculator.

Continue reading “In Praise Of RPN (with Python Or C)”

Closeup of an Apple ][ terminal program. The background is blue and the text white. The prompt says, "how are you today?" and the ChatGPT response says, "As an AI language model, I don't have feelings, but I am functioning optimally. Thank you for asking. How may I assist you?"

Apple II – Now With ChatGPT

Hackers are finding no shortage of new things to teach old retrocomputers, and [Evan Michael] has taught his Apple II how to communicate with ChatGPT.

Written in Python, iiAI lets an Apple II access everyone’s favorite large language model (LLM) through the terminal. The program lives on a more modern computer and is accessed over a serial connection. OpenAI API credentials are stored in a file invoked by iiAI when you launch it by typing python3 openai_apple.py. The program should work on any device that supports TTY serial, but so far testing has only happened on [Michael]’s Apple IIGS.

For a really clean setup, you might try running iiAI internally on an Apple II Pi. ChatGPT has also found its way onto Commodore 64 and MS-DOS, and look here if you’d like some more info on how these AI chat bots work anyway.

Continue reading “Apple II – Now With ChatGPT”