3D Printed Robot Wants To Be Your Pet

Robots are cool. Robots you build yourself are cooler, especially ones that use stuff you have lying around already. Snoopy is a new open-source robot that uses an Arduino as a brain but with a 3D printed body and a short list of parts that can probably be sourced from the junk drawer. It’s still being developed, but it looks like a cool project heading in the right direction to produce an interesting robot.

It’s based on a new robot software platform called Kaia.ai that is built on top of the Robot Operating System 2 (ROS2), but with a more friendly and beginner-focused interface. Currently, the Snoopy project includes enough to get up and running with a printed frame and the electronics to install an Arduino running ROS2 that controls it. That’s an excellent place to start if you want to get into robotics, but without diving straight into the technical challenges of working with real-time operating systems.

It is also interesting that the previous project from the creator (called Kiddo) fell into the complexity trap, where you keep adding features and create an overly complex design that is a pain to build. Hopefully the designers have learned from Kiddo and will keep Snoopy simple.

We’ve covered plenty of other robot projects here at Hackaday, from ones that venture into nuclear reactors to ones that write your thank-you notes for you or give you hugs. We’ve even looked at how to give your robots a personality. Combine all those together with Snoopy and you could build a hugging, compassionate robot that has nice handwriting and can repair a nuclear reactor. And if you do, write it up and send it to our tips line!

Normal Users Don’t Code On Their Mac, But Apple Keeps Trying

Most people use their computer to run pre-packaged programs: usually a web browser, games, or office applications. Whether the machine is a PC or a Mac, they don’t generally write their own software. For them, the computer is an appliance, and they do what their computer allows them to do.

It shouldn’t have to be that way, if only programming were easier. The Eclectic Light Company has a fascinating article looking at the various attempts that Apple has made to lure their users into creative programming.

Probably the most familiar of them all is AppleScript, with its origins in late 1993. Or maybe you’re thinking of Hypertalk, the scripting component of 1987’s Hypercard. That would go on to be a mainstay of mid-1990s multimedia software, but while it’s fallen by the wayside it’s AppleScript which still has support in the latest MacOS.

The biggest surprise for us lies in the forgotten products. 1989’s Prograph graphical language looks amazing. Was it simply before its time? In the modern era, Apple describes the reach of Shortcuts diplomatically: “its impact has so far been limited”.

Maybe the most forward-thinking line on programming from Apple came in 2007, even if it wasn’t recognized as such. The original iPhone didn’t have any third-party apps, and instead developers were supposed to write web apps to take advantage of the always-connected device. Would that be such a bad piece of advice to give a non-developer writing software for their Mac today?

The End Of Basic?

Many people, one way or another, got started programming computers using some kind of Basic. The language was developed at Dartmouth specifically so people could write simple programs without much training. However, Basic found roots in small computers and grew to where it is today, virtually unrecognizable. Writing things in something like Visual Basic may be easier than some programming tasks, but it requires a lot of tools and some reading or training. We aren’t sure where the name EndBasic came from, but this program — written in Rust — aims to bring Basic back to a simpler time. Sort of.

You can run the program in a browser, locally, or connected to a cloud service. It looks like old-fashioned Basic at first. But the more you dig in, the odder it gets. The command line is more akin to a Python REPL. You type things, and they happen. It took a while to figure out that you need to enter EDIT to write a program. Then, what you type gets saved until you press escape. The syntax is Basic-like but has oddities. There are no line numbers, but you can use labels that start with an at sign.

Continue reading “The End Of Basic?”

On Vim, Modal Interfaces And The Way We Interact With Computers

The ways in which we interact with computers has changed dramatically over the decades. From flipping switches on the control panels of room-sized computers, to punching holes into cards, to ultimately the most common ways that we interact with computers today, in the form of keyboards, mice and touch screens. The latter two especially were developed as a way to interact with graphical user interfaces (GUI) in an intuitive way, but keyboards remain the only reasonable way to quickly enter large amounts of text, which raises many ergonomic questions about how to interact with the rest of the user interface, whether this is a command line or a GUI.

For text editors, perhaps the most divisive feature is that of modal versus non-modal interaction. This one point alone underlies most of the Great Editor War that has raged since time immemorial. Practically, this is mostly about highly opiniated people arguing about whether they like Emacs or vi (or Vim) better. Since in August of 2023 we said our final farewell to the creator of Vim – Bram Moolenaar – this might be a good point to put down the torches and pitchforks and take a sober look at why Vim really is the logical choice for fast, ergonomic coding and editing.

Continue reading “On Vim, Modal Interfaces And The Way We Interact With Computers”

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!

Accurate Cycle Counting On RP2040 MicroPython

The RP2040 is a gorgeous little chip with a well-defined datasheet and a fantastic price tag. Two SDKs are even offered: one based on C and the other MicroPython. More experienced MCU wranglers will likely reach for the C variant, but Python does bring a certain speed when banging out a quick project or proof of concept. Perhaps that’s why [Jeremy Bentham] ported his RP2040-based vehicle speedometer to MicroPython.

The two things that make that difficult are that MicroPython tries to be pretty generic, which means some hackery is needed to talk to the low-level hardware, and that MicroPython doesn’t have a reputation for accurate cycle counting. In this case, the low-level hardware is the PWM peripheral. He details the underlying mechanism in more detail in the C version. On the RP2040, the PWM module can count pulse edges on an input. However, you must start and stop it accurately to calculate the amount of time captured. From there, it’s just edges divided by time. For this, the DMA system is pulled in. A DMA request can be triggered once the PWM counter rolls over. The other PWM channel acts as a timer, and when the timer expires, the DMA request turns off the counter. This works great for fast signals but is inaccurate for slow signals (below 1kHz). So, a reciprocal or time-interval system is included, where the time between edges is captured instead of counting the number of edges in a period,

What’s interesting here is how the hardware details are wrapped neatly into pico_devices.py. The uctypes module from MicroPython allows access to MMIO devices such as DMA and PWM. The code is available on GitHub. Of course, [Jeremy] is no stranger to hacking around on the RP2040, as he has previously rolled his own WiFi driver for the Pico W.

Transforming A Keyboard To A Mouse In Software

You’ve probably heard the old saying that if it looks like a duck, and it quacks like a duck… So when is a keyboard a mouse? When software makes it quack like a mouse — that is, if mice quacked. [Blackle Mori] took a cheap USB keypad and, using the libevdev Linux system, made it impersonate a mouse.

The code on GitHub isn’t complex, but the details can take some time to get right. The code takes over all input events from the device. [Blackle] dumped out events sent from the keypad, but the stock evtest program would probably have done just as well.

Continue reading “Transforming A Keyboard To A Mouse In Software”