Parsing Math In Python

Programming computers used to be harder. Don’t get us wrong — today, people tend to solve harder problems with computers, but the fundamental act of programming is easier. We have high-level languages, toolkits, and even help from our operating systems. Most people never have to figure out how to directly read from a disk drive, deblock the data into records, and perform multiplication using nothing but shifts and adds. While that’s a good thing, sometimes it is good to study the basics. That was [gnebehay’s] thought when his university studies were too high level, so he decided to write an arithmetic expression parser in Python. It came out in about 100 lines of code.

Interpreting math expressions is one of those things that seems simple until you get into it. The first problem is correctly lexing the input — a term that means splitting into tokens. For a human, it seems simple that 5-3 is three tokens, {5, -, and 3} and that’s easy to figure out. But what about 5+-3? That’s also three tokens: {5,+,-3}. Tricky.

Continue reading “Parsing Math In Python” →

Figuro Draws 3D In Browser

We would have never guessed there would be so many browser-based CAD packages. While TinkerCAD is great for simple things, there are also packages such as OnShape that rival commercial CAD programs. A site calle Figuro claims to occupy the space between TinkerCAD and Blender. We aren’t so sure, but it is an interesting entry into the field. Apparently, Figuro has been around for some time, but has recently had a major face lift. The new interface looks good, but it has invalidated a number of video tutorials on their YouTube channel.

One of the things we like about TinkerCAD is it is highly discoverable. That is, you can fire it up, play with it a bit, and probably do quite a few things. Maybe it is just us, but Figuro didn’t give us the same experience. It is easy enough to draw simple shapes. But trying to multiselect was unreliable. Panning and rotating the view was very sensitive too, so we found we were occasionally lost in the work view with no easy way to reset the view. Even something as simple as subtracting one shape from another was painful.

Continue reading “Figuro Draws 3D In Browser” →

TOBOT Is Your Tic Tac Toe Opponent With A Bad Attitude

[3dprintedlife] is apparently a little bored. Instead of whiling away the time playing tic tac toe, he built an impressive tic tac toe robot named TOBOT. The robot uses a Rasberry Pi Zero and a Feather to control a two-axis robot arm that can draw the board and make moves using a pen. It also uses a simple computer vision system to look at the board to understand your move, and it has a voice too.

The other thing TOBOT has is a bad attitude. The robot wants to win. Badly. Check out the video below and you’ll see what we mean.

Continue reading “TOBOT Is Your Tic Tac Toe Opponent With A Bad Attitude” →

USB Bell Rings In Custom Terminal

Old TeleTypes and even typewriters had bells. Real bells. So that ASCII BEL character is supposed to make an honest to goodness ringing sound. While some modern terminals make a beep from the computer speakers, it isn’t the same. [Tenderlove] must agree, because the turned a Microchip USB to I2C bridge chip into a HID-controlled bell.

The only problem we see is that you have to have a patch to your terminal to ring the bell. We’d love to see some filter for TCP or serial that would catch BEL characters, but on the plus side, it is easy to ring the bell from any sort of application since it responds to normal HID commands.

Continue reading “USB Bell Rings In Custom Terminal” →

Open Source VR Headset For $200

We’ve seen homemade VR headsets before, but, often they are dependent on special software or are not really up to par with commercial products. Not so with Relativity, an open source project from [Max Coutte] and [Gabriel Combe]. [Max] says it best:

Relativty is not a consumer product. We made Relativty in my bedroom with a soldering iron and a 3D printer and we expect you to do the same: build it yourself.

Unlike some homebrew gear, Relativity has full Steam VR support. It also has experimental support for positional scaling that tracks your body based on video input.

Continue reading “Open Source VR Headset For $200” →

PLA-F Blends PLA And ABS

In the early days of 3D printing, most people used ABS plastic. It is durable and sticks well to simple surfaces. However, it smells and emits fumes that may be dangerous. It also tends to warp as it cools which causes problems when printing. PLA smells nicer and since it is made from corn is supposed to be less noxious. However, PLA isn’t as temperature resistant and while it will stick better to beds without heat, it also requires more airflow to set the plastic as it prints. [Kerry Stevenson] recently reviewed PLA-F which is a blend of the two plastics. Is it the best of both worlds? Or the worst?

[Kerry]  did several tests with interesting results. He did a temperature test tower and found the material printed well between 190 and 240 °C. He did note some stringing problems, though.

Continue reading “PLA-F Blends PLA And ABS” →

TV Output From Arduino — 1980s Style!

We’ll admit it, we’re all spoiled. A few bucks can now buy a computer that would have been the envy of everyone back in the late 1970s or early 1980s. So it’s no surprise that [krallja] was able to use an old-style video output chip to drive a TV with an Arduino. The TMS9918A is a venerable output device, and if the old computers could drive it then it makes sense that a modern computer could too. You can see a video of the whole experiment, below.

The Internet has also spoiled us, in that it’s dead simple to find datasheets for nearly anything, even these old chips. The only real problem with such aged silicon is that they typically expect a processor with a data and address bus, but most microcontrollers now keep all of that internal. But with enough fast I/O you can simulate a bus just fine. For now, the experiment just cycles through the color output.

Continue reading “TV Output From Arduino — 1980s Style!” →