Friday, November 30

US tariffs helping, then hurting domestic rare-earth mineral production

Air Bubble Characters Float Along This Unique Scrolling Display

We’ve seen a lot of unique large-format scrolling message boards on these pages, but most of them use some sort of established technology – LEDs, electromechanical flip-dots, and the like – in new and unusual ways. We’re pretty sure this air-bubble dot matrix display is a first, though.

While it may not be destined for the front of a bus or a train station arrivals and departures board, [jellmeister]’s bubble display shows some pretty creative thinking. It started with a scrap of multiwall polycarbonate roofing – Corotherm is the brand name – of the type to glaze greenhouses and other structures. The parallel tubes are perfect for the display, although individual tubes could certainly be substituted. A plastic end cap was fabricated; air nozzles in each channel were plumbed to an air supply through solenoid valves. An Arduino with a couple of motor driver hats allows pulses of air into each channel to create reasonably legible characters that float up the tube. The video below shows it in use at a Maker Faire, where visitors could bubble up their own messages.

It took some tweaking to get it looking as good as it does, but there’s plenty of room for improvement. We wonder whether colored liquid might help, or perhaps adding a Neopixel or even a laser to each channel to add some contrast. Maybe something to cloud the water slightly would help; increasing the surface tension with a salt solution might make the bubbles more distinct. We doubt it’ll ever have the contrast ratio of a flip-dot display, but it certainly has a charm all its own.

New software will let artists control how light interacts with objects

Tips of the Week: Binder Clip Hacks, Saw Tips, Engineering Basics, and Using a Laptop as a Light Box

Another week, another spankin-good round up of indispensable shop tips, tricks, and hacks.

Read more on MAKE

The post Tips of the Week: Binder Clip Hacks, Saw Tips, Engineering Basics, and Using a Laptop as a Light Box appeared first on Make: DIY Projects and Ideas for Makers.

Retrotechtacular: Some Of The Last CRTs From The Factory Floor

It seems crazy having to explain what a piece of technology was like to someone who is barely fifteen years your junior, but yet we have reached that point when it comes to CRTs. There may still be remnants of CRT televisions and monitors left out in the wild, however, the chances that a kid preparing to enter high school has encountered one is slim. While there may be no substitute for the real thing, there is this raw video from [Glenn] who shared his tour of the Sony Trinitron assembly line in the early 2000s. Sony Trinitron Television

Sony Electronics’ cathode ray tube manufacturing facility was located alongside headquarters in Rancho Bernado, CA. The facility was shuttered in 2006 when Sony transitioned wholly onto digital displays like the flat-panel LCD line of Bravia televisions. [Glenn]’s video shows that the manufacturing process was almost entirely automated from end to end. A point that was made even more clear with the distinct lack of human beings in the video.

The Trinitron line of televisions first appeared in 1968. At a time where most manufacturer’s were offering black and white picture tubes, Sony’s Trinitron line was in color. That name carried through until the end when it was retired alongside tube televisions themselves. Sony’s focus on technological innovation (and proprietary media formats) made them a giant in the world of consumer electronics for over forty years in the United States, but in the transition to a digital world saw them seeding market share to their competitors.

A quick word of warning as the video below was shot directly on Sony’s factory floor so the machinery is quite loud. Viewers may want to reduce the volume prior to pressing play.

Because they don’t build them like they used to, there’s also this Retrotechtacular feature on the manufacturing of CRT televisions in the 1950s.

Marriott breach leaves 500 million exposed with passport, card numbers stolen

Tesla has a problem with racism in its factory—so do many of its rivals

Building Portable Linux Devices: Never Been Easier, But Still Hard

Al Lowe reveals his Sierra source code collection—then puts all of it on eBay

Metal Jesus Rocks

Al Lowe, one of Sierra On-Line's seminal game creators and programmers, has been sitting on a pile of his original games' source code files for over 30 years, fully convinced that they are worthless.

"I’m 72 years old, and none of my kids want this junk!" Lowe said in an interview with YouTube personality MetalJesusRocks (aka Jason Lindsey, himself an ex-Sierra developer and a friend of Ars). "Does anybody?"

Read 8 remaining paragraphs | Comments

The fight against measles has taken a turn for the worse

Microsoft Office has pretty new icons but they have a fatal flaw

Microsoft has even made a video to introduce the new icons

Microsoft has unveiled a new set of icons that the Office apps will start using. Office 365 customers will see their apps switch to the new icons over the next couple of months, as Microsoft continues to refresh the look and feel of its core productivity suite.

The last time the Microsoft Office apps got new icons was 2013, with the same set of icons also used by Office 2016 and the perpetually licensed Office 2019. Since then, Office has got a great deal more mobile with apps for iOS and Android, it gained a bigger Web presence, it added a bunch of collaboration features, and it has seen many of its users switch from the perpetual licenses to the continuously updated Office 365.

The new icons are meant to somehow reflect these changes. The letters adorning each icon have been reduced in size, with the remainder of the space used to show a highly stylized representation of the application. The colors are a bit brighter, too. Oddly, there are already some inconsistencies in the designs; OneDrive doesn't have a letter at all (it's just a cloud), and Skype uses the old proportions, with a letter that's much bigger than any of the others.

Read 1 remaining paragraphs | Comments

Extreme Pi Overclocking With Mineral Oil

Liquid cooling is a popular way to get a bit of extra performance out of your computer. Usually this is done in desktops, where a special heat sink with copper tubing is glued to the CPU, and the copper tubes are plumbed to a radiator. If you want dive deeper into the world of liquid cooling, you can alternatively submerge your entire computer in a bath of mineral oil like [Timm] has done.

The computer in question here is a Raspberry Pi, and it’s being housed in a purpose-built laser cut acrylic case full of mineral oil. As a SoC, it’s easier to submerge the entire computer than it is to get a tiny liquid-cooled heat sink for the processor. While we’ve seen other builds like this before, [Timm] has taken a different approach to accessing the GPIO, USB, and other connectors through the oil bath. The ports are desoldered from the board and a purpose-built header is soldered on. From there, the wires can be routed out of the liquid and sealed off.

One other detail used here that  we haven’t seen in builds like this before was the practice of “rounding” the flat ribbon cable typically used for GPIO. Back in the days of IDE cables, it was common to cut the individual wires apart and re-bundle them into a cylindrical shape. Now that SATA is more popular this practice has been largely forgotten, but in this build [Timm] uses it to improve the mineral oil circulation and make the build easier to manage.

How to Upgrade Your 3D Printer With a Laser Engraver

Upgrading your 3D printer is a fantastic way to improve performance and print quality, as well as learn how the machine works. Often the upgrades are simple things to make it run quieter, get better cooling, control the environment through an enclosure, detect filament jams, and other things of that […]

Read more on MAKE

The post How to Upgrade Your 3D Printer With a Laser Engraver appeared first on Make: DIY Projects and Ideas for Makers.

Soy milk, almond milk, oat milk. Spider milk?

Archaeologists map centuries of history beneath world’s oldest cathedral

Gene-edited babies: Unknown risks and clear ethical failures

Packing Decimal Numbers Easily

While desktop computers have tons of computing power and storage, some small CPUs don’t have a lot of space to store things. What’s more is some CPUs don’t do multiplication and division very well. Same can be said for FPGAs. So suppose we are going to grab a bunch of three-digit decimal numbers from, say, a serial port. We want to store as many as we can, and we don’t want to do a lot of math because we can’t, it is slow, or perhaps it keeps our processor awake longer and we want to sleep to conserve power. We want a way to pack the numbers as close to the theoretical maximum as we can but with little or no math.

The simple approach is to store the numbers as ASCII. Great for processing since they are probably in ASCII already. If they aren’t, you just add 30 hex to each digit and you are done. That’s awful for storage space, though, since we can store 999 in 10 bits if it were binary and now we are using 24 bits! Storing in binary isn’t a good option, if you play by our rules, by the way. You need to multiply by 10 and 100 (or 10 twice) to get the encoding. Granted, you can change that to two shifts and an add (8x+2x=10x) but there’s no easy way to do the division you’ll have to do for the decode.

Of course, there’s no reason we can’t just store decimal digits. That’s call binary coded decimal or BCD and that has some advantages, too. It is pretty easy to do math on BCD numbers and you don’t get rounding problems. Some CPUs even have specific instructions for BCD manipulation. However, three digits will require 12 bits. That’s better than 24, we agree. But it isn’t as good as that theoretical maximum. After all, if you think about it, you could store 16 distinct codes in 4 bits, and we are storing only 10, so that 6 positions lost. Multiply that by 3 and you are wasting 18 codes.

But there is a way to hit that ten-bit target without doing any math. Its called DPD or densely packed decimal. You can convert three decimal digits into ten bits and then back again with no real math at all. You could implement it with a small lookup table or just do some very simple multiplexer-style logic which means it is cheap and easy to implement in software or onboard an FPGA.

This packing of bits was the problem that Thedore Hertz and Tien Chi Chen both noticed around 1969-1971. Hertz worked for Rockwell and Chen worked for IBM and consulted with another IBM employee, Irving Tze Ho. Hertz and Chen independently developed what would become known as Chen-Ho encoding. A bit later, Michael Cowlinshaw published a refinement of the encoding called DPD or densely packed decimal that became part of the IEEE floating point standard.

Both Hertz and Chen used slightly different encodings, but the Cowlinshaw scheme had several advantages. You can efficiently grow beyond 3 digits easily. Decimal numbers from 0 to 79 map to themselves. Bit zero of each digit is preserved so you can do things like check for even and odd numbers without unpacking.

How Does it Work?

Think of three BCD digits written in binary. Because each digit is in the range [0-9], it can be represented with four bits, so our three digits look like Xabc Ydef Zghi. For instance, if the first digit is 9 then Xabc = 1001. Since we’re only encoding numbers up to nine, if X is 1, then a and b must be 0, leaving us some space to pack other bits into. Now consider XYZ as its own three-digit binary number. This leads to eight distinct cases. The table below shows the encoding for all eight cases, with a lower case x indicates a don’t care:

Case (XYZ)  Xabc   Ydef   Zghi  Encoding
9 8 7 6 5 4 3 2 1 0 
000 0abc 0def 0ghi a b c d e f 0 g h i
001 0abc 0def 100i a b c d e f 1 0 0 i
010 0abc 100f 0ghi a b c g h f 1 0 1 i
011 0abc 100f 100i a b c 1 0 f 1 1 1 i
100 100c 0def 0ghi g h c d e f 1 1 0 i
101 100c 0def 100i d e c 0 1 f 1 1 1 i
110 100c 100f 0ghi g h c 0 0 f 1 1 1 i
111 100c 100f 100i x x c 1 1 f 1 1 1 i

Notice that c, f, and i always pass through. The other bit positions vary depending on the case, but you don’t need any math to simply rearrange the bits and add the fixed indicator bits in bits 6-5 and 3-1 of the 10-bit encoding.

In the example figure, 105 matches case 000 — all leading bits are zero — so the encoding is 0010000101 or 085 hex. If the number had been, say, 905 that would match case 100 and would encode as 1010001101 or 28D hex. Decoding is just a matter of running the table backward. If bit 3 is zero, that’s case 000. Otherwise, look at bits 2 and 1. Unless they are 11, you can directly find the corresponding row in the table. If they are 11, you’ll have to further look at bits 6 and 5 to find the right entry. Then you just unwind the bits according to the table.

Implementation

I was mostly interested in this for FPGA designs, so I wrote some simple Verilog to do the work and you can try it online. The testbench included runs through all 1,000 possible numbers and outputs the DPD code in hex, the 3 input digits, a slash, and the 3 output digits like this:

0fd = 9 7 1 / 9 7 1
1fc = 9 7 2 / 9 7 2
1fd = 9 7 3 / 9 7 3
2fc = 9 7 4 / 9 7 4
2fd = 9 7 5 / 9 7 5
3fc = 9 7 6 / 9 7 6

The encoding is very straightforward. Here’s a snippet for two rows of the table:


3'b000:
dpd={digit2[2:0],digit1[2:0],1'b0,digit0[2:0]};
3'b001:
dpd={digit2[2:0],digit1[2:0],3'b100,digit0[0]};

You’ll notice the code used no clocks — it is pure logic and makes extensive use of the case and casez statements. These are like switch statements in C although the casez statement can use ? as a don’t care when matching.

I left both Verilog and C implementations on GitHub for you. Both are pretty naive. For example, the Verilog code doesn’t take advantage of the fact that some of the bits “pass through.” However, a good compiler or synthesizer may turn out some pretty good code anyway. But if you were really worried about minimizing floorplan or code space or minimizing power consumption, you’ll need to tune these to fit your architecture and your needs.

Algorithms

It used to be when you learned about computers one of the first things you were taught was algorithms and data structures. I’m not sure that’s the case anymore. But the world is full of obscure algorithms we might use if we only knew them. I’m surprised there aren’t more catalogs of algorithms like [Sean Anderson’s] famous bit twiddling hacks page. Probably the best one for everything — which means it is overwhelming — is the NIST DADS dictionary. Be warned! You can spend a lot of your day browsing that site. Even as big as that site is, they specifically exclude business, communications, operating system, AI, and many other types of algorithms.

I mean, sure, most of us know a bubble sort and a shell sort, but do you know a cocktail sort or how to do a Richardson-Lucy deconvolution? The DADS doesn’t either, although Wikipedia is helpful. We couldn’t find consistent overhead byte stuffing or Chen-Ho in either place. Seems like this would be a great AI project to catalog and help locate algorithms and data structures for particular uses. But for now, you can at least add dense packed decimal to your bag of known tricks.

Apple Music arrives on Amazon’s Echo speakers starting December 17

Rocket Report: Lots of new engines, SpaceX review explained, BFR changes

New Part Day: The Twenty Five Cent USB Microcontroller (With A Toolchain!)

Last year, Jiangsu Yuheng Co., Ltd introduced a new microcontroller. The CH554 is a microcontroller with an E8051 core with a 24 MHz clock, a little more than 1 kB of RAM, and a bit more than 14 kB split between the code and data Flash. In short, it’s nothing too spectacular, but it makes up for that with peripherals. It’s got SPI and ADCs and PWM, UARTs, and even a few capacitive touch channels. It’s also a USB device, with some chips in the series able to function as a USB host. You can buy this chip for a quarter through the usual retailers.

Normally, this isn’t huge news. The 8051 is the most copied microcontroller on the planet, and there are probably billions produced each year. Cheap parts are only cheap if your time is free; you’ll usually spend ages trying to digest the datasheet and get a toolchain up and running. That’s where this chip is a little different. There are multiple efforts to bring an Open Source toolchain to this chip. And they’re doing it in Windows and Linux. Someone really cares about this chip.

The current best option for an SDK for this chip comes from Blinkenlabs, with a port of the CH554 SDK from Keil to SDCC. There are real, working code examples for this chip using an Open Source toolchain. Sure, it might just blink a LED, but it’s there. If you can blink a LED, you can do just about anything from there. Programming the chip happens over USB with the ‘official’ WCHISPTool (Windows) or LibreCH551 (command line). The end result is a completely Open Source toolchain to program and upload a hex file to a cheap chip.

There are a few more chips in the CH554 series, ranging from the CH551 in an SOP-16 package to the CH559 in an LQFP48 package, with more features available as the chips get bigger. It’s an interesting chip, with some somehow implementing a USB hub, and could be a very cool chip for some low-level USB hacking.

Buy Or Build An Autonomous Race Car To Take The Checkered Flag

Putting autonomous vehicles on public roads takes major resources beyond most of our means. But we can explore all the same general concepts at a smaller scale by modifying remote-control toy cars, limited only by our individual budgets and skill levels. For those of us whose interest and expertise lie in software, Amazon Web Services just launched AWS DeepRacer: a complete package for exploring machine learning on autonomous vehicles.

At a hardware level, the spec sheet makes it sound like they’ve bolted their AWS DeepLens machine vision computer on an 1/18th scale monster truck chassis. But the hardware is only the tip of the iceberg. The software behind DeepRacer is AWS RoboMaker, a set of tools for applying AWS to robot development. Everything from running digital simulations on AWS to training neural networks on AWS. Don’t know enough about machine learning? No problem! Amazon has also just opened up their internal training curriculum to the world. And to encourage participation, Amazon is running a DeepRacer League with races taking place both digitally online and physically at AWS Summit events around the world. They’ve certainly offered us a full plate at their re:Invent conference this week.

But maybe someone prefers not to use Amazon, or prefer to build their own hardware, or run their own competitions. Fortunately, Amazon is not the only game in town, merely the latest entry in an existing field. The DeepRacer’s League’s predecessor was the Robocar Rally, and the DeepRacer itself follows the Donkey Car. A do-it-yourself autonomous racing platform we first saw at Bay Area Maker Faire 2017, Donkey Car has since built up its documentation and software tools including a simulator. The default Donkey Car code is fairly specific to the car, but builders are certainly free to use something more general like the open source Robot Operating System and Gazebo robot simulator. (Which is what AWS RoboMaker builds on.)

So if the goal is to start racing little autonomous cars, we have options to buy pre-built hardware or enjoy the flexibility of building our own. Either way, it’s just another example of why this is a great time to get into neural networks, with or without companies like Amazon devising ways to earn our money. Of course, this isn’t the only Amazon project trying to build a business around an idea explored by an existing open source project. We had just talked about their AWS Ground Station offering which covers similar ground (sky?) as our 2014 Hackaday Prize winner SatNOGS.

An Englishman And 48 Gameboys Walk Into A Bar…

The original Nintendo Gameboy is perhaps one of the most revered platforms for the music known as chiptune. Primarily, artists will use the console with software like LSDJ or Nanoloop to produce their compositions. Some artists will even use two consoles when performing live. However, that’s all fairly quaint as far as [LOOK MUM NO COMPUTER] is concerned.

Back in 2016, a rig was constructed with three Gameboys. With each console having 3 oscillators and a noise channel, this gave plenty of scope. There was even a facility to detune the oscillators for a fatter sound.

Yet there remains a universal human philosophy – more is always better. In this vein, the plan is to create a monster machine consisting of 48 Gameboy consoles. This offers a somewhat maddening 144 oscillators and 48 noise channels to play with. The plan is to produce a massive synthesizer capable of producing incredibly thick, dense tones with up to six note polyphony.

The hardware side of things is at once simple and ingenious. Buttons on the consoles are connected together for remote control using ribbon cables and transistors. System clocks for the consoles are provided by a LTC1799 oscillator chip, which allows the clock to be modulated for audio effects. Initial tests with up to six Gameboys running from a single clock source have been remarkably successful.

Any mad scientist could see the genius involved in this project, and we can’t wait to see the full rig in operation. If you’re just getting started with Gameboy music, check out this primer on modding your Gameboy for hi-fi sound. Video after the break.

 

MIPI CSI-2 Implementation In FPGAs

[Adam Taylor] always has interesting FPGA posts and his latest is no exception. He wanted to use a Zynq for image processing. Makes sense. You can do the high-speed parallel parts in the FPGA fabric and do higher-level processing on the built-in CPU. The problem is, of course, you need to get the video data into the system. [Adam] elected to use the Mobile Industry Processor Interface (MIPI) Camera Serial Interface Issue 2 (CSI-2).

This high-speed serial interface is optimized for data flowing in one direction. The camera, or the master, sends a number of bits (at least one) serially with one clock. To increase speed, data transfers on both rising and falling clock edges. The slave also has a pretty standard I2C master to send commands to the camera which, for the purposes of I2C, is the slave.

In theory, with one lane of data on the D-PHY, you can you can get up to 4.5 Gbps on four wires, although you might get less with an FPGA. [Adam’s] post quotes different numbers, but also mentions the FPGA won’t get there anyway. One of the chips used supports the D-PHY directly on the chip, but the standard Zynq does not. Even when using IP, you have to understand this and make the appropriate choices and that’s the main point of the post.

It does illustrate how even using IP isn’t as plug-and-play as, say, hooking up home stereo equipment. You still have to understand what’s going on and how to best work with the IP — in this case both on the outside interface and the inside one.

If you want to look at a simpler serial interface on an FPGA, try our POV project. We also used a similar serial port to fake an internal logic analyzer.

The bloodbath continues: Netflix cancels Daredevil after three seasons

Adopting An Orphaned Ultralight

Owning and flying your own small airplane offers a nearly unmatched level of freedom and autonomy. Traveling “as the crow flies” without having to deal with traffic on the ground immediately shrinks your world, and makes possible all sorts of trips and adventures. Unfortunately the crippling downsides of plane ownership (storage and maintenance costs, knowledge that you might die in a fiery crash, etc), keeps most of us planted squarely on terra firma.

But not [ITman496]. His dream of owning an ultralight has recently come true, and he’s decided to share his experience with the world. He’s got a long way to go before he slips the surly bonds of Earth, but there’s no better place to start than the beginning. In a recent blog post he documents the process of getting his new toy home, and details some of the work he plans on doing to get it airworthy.

The plane in question is a Mini-MAX that [ITman496] has determined is not only older than he is, but has never flown. It was built by a retired aircraft mechanic who unfortunately had problems with his heart towards the end of assembly. He wisely decided that he should find a safer way to spend his free time than performing solo flights in an experimental aircraft, so he put the plane up for sale.

After a considerable adventure transporting the plane back home, [ITman496] found it was stored in such good condition that the engine started right up. But that doesn’t mean it’s ready for takeoff by any stretch of the imagination. For his own safety, he’s planning on tearing down the entire plane to make sure everything is in good shape and assembled correctly; so at least he’ll only have himself to blame if anything happens when he’s in the air.

One the plane’s structure is sound, he’ll move on to some much needed engine modifications including a way to adjust the air-fuel mixture from inside the cockpit, improvements to the cooling system, and installation of a exhaust system that’s actually intended for the two-stroke engine he has. When that’s done, [ITman496] is going to move onto the real fun stuff: creating his own “glass cockpit”.

For Hackaday readers who don’t spend their time playing make believe in flight simulators, a “glass cockpit” is a general term for using digital displays rather than analog gauges in a vehicle. [ITman496] has already bought two daylight-readable 10.1″ IPS displays which he plans on driving over HDMI with the Raspberry Pi. No word on what his software setup and sensor array will look like, but we’re eager to hear more as the project progresses.

If you’re not lucky enough to find a mostly-complete kit plane nearby on Craigslist, you could always just make your own airplane out of sheets of foam.

Thursday, November 29

France to retire 14 nuclear reactors while Japan restarts 5 of its reactors

SEC fines two celebrities for undisclosed cryptocurrency shilling

NASA takes a tangible step back toward the Moon with commercial program

Nailing down the nature of ‘Oumuamua—it’s probably a comet, but…

5 Cool DIY Projects to Make for Holiday Presents

Here are some suggestions for high-impact homemade gifts that won't cost you too dearly in time or money.

Read more on MAKE

The post 5 Cool DIY Projects to Make for Holiday Presents appeared first on Make: DIY Projects and Ideas for Makers.

Congress: Amazon didn’t give “sufficient answers” about facial recognition

Build A Plate Reverb From Ikea

Back before we all pirated FruityLoops, before ProTools, and before VSTs and DAWs, audio recording was much, much cooler. Reverbs were entire rooms. Sometimes they were springs. Sometimes, in the high-end music studios, reverbs were plates. These plate reverbs were simply a gigantic sheet of metal mounted in a box about ten feet long, four feet high, and a foot thick. Inside, you had some transducers, some pickups, and not much else. Send a signal into the plate reverb and it will bounce around on this flexible membrane, and  emerge through the output in a suitably reverberant form.

Of course, very few places have a plate reverb anymore because they’re gigantic and expensive and software effects are small and cheap. That doesn’t mean a plate reverb is made of unobtanium. [Leo] just made his own plate reverb out of Ikea shelves and some simple electronics.

This build used an Ikea Bror shelving unit that cost about $50 sans meatballs. The electronics are a surface transducer and two piezo pickups. Total cost was about $100. That’s all that’s needed to put this plate reverb together, but the real trick is making it work as a reverb.

The plate is driven by the audio output of [Leo]’s computer, through a battery-powered amp, and into a transducer. The transducer is then simply placed on the metal shelf. The two piezo pickups are placed on either end of the shelf, with one going to the right channel of one input, the other going to the left channel of the same input. From there, it’s a simple matter of using this Ikea shelf in an effects loop.

From the video below, the setup absolutely works. [Leo] is playing a few drum loops through the reverb, and the results sound like they should. There’s also a neat trick in using a shelf as a reverb; by placing a rag or a cardboard box on the shelf, the reverb is dampened allowing you to ‘mix’ this reverb in real time.

Did Sprint throttle Skype? Researcher explains evidence behind allegation

Luther is back and as broody as ever in new trailer for fifth season

SDR Is At the Heart of This Soup-Can Doppler Radar Set

Want to explore the world of radar by feel daunted by the mysteries of radio frequency electronics? Be daunted no more and abstract the RF complexities away with this tutorial on software-defined radar.

Taking inspiration from our own [Gregory L. Charvat], whose many radar projects have graced our pages before, [Luigi Freitas]’ plunge into radar is spare on the budgetary side but rich in learning opportunities. The front end of the radar set is almost entirely contained in a LimeSDR Mini, a software-defined radio that can both transmit and receive. The only additional components are a pair of soup can antennas and a cheap LNA for the receive side. The rest of the system runs on GNU Radio Companion running on a Raspberry Pi; the whole thing is powered by a USB battery pack and lives in a plastic tote. [Luigi] has the radar set up for the 2.4-GHz ISM band, and the video below shows it being calibrated with vehicles passing by at known speeds.

True, the LimeSDR isn’t exactly cheap, but it does a lot for the price and lowers a major barrier to getting into the radar field. And [Luigi] did a great job of documenting his work and making his code available, which will help too.

The Audi A4 versus the Audi S5 reviewed—sometimes less is more

Coal plant closures double in 2018, coal production flat or down

Microsoft wins $480 million military contract to bring HoloLens to the battlefield

Adult Swim, Crunchyroll announce first-ever co-production: A Blade Runner anime

Another year, another decrease in life expectancy in the US

Feds: AriseBank duped investors out of over $4M in cryptocurrency scam

Katrina Nguyen Automates Her Mice

When embarking on a career in the life sciences, it seems like the choice of which model organism to study has more than a little to do with how it fits into the researcher’s life. I once had a professor who studied lobsters, ostensibly because they are a great model for many questions in cell biology; in actuality, he just really liked to eat lobster. Another colleague I worked with studied salt transport in shark rectal glands, not because he particularly liked harvesting said glands — makes the sharks a tad grumpy — but because he really liked spending each summer on the beach.

Not everyone gets to pick a fun or delicious model organism, though, and most biologists have had to deal with the rats and mice at some point. It’s hard to believe how needy these creatures can be in terms of care and feeding, and doubly so when feeding is part of the data you’re trying to collect from them. Graduate student Katrina Nguyen learned this the hard way, but rather than let her life be controlled by a bunch of rodents, she hacked a solution that not only improved her life, but also improved her science. She kindly dropped by the Hackaday Superconference to tell us all about how she automated her research.

Your Brain Just Wants You to Eat

It should come as little surprise that people tend to make poor choices about what to stuff in their mouths and when to stop, but the neurological mechanisms that control these behaviors are only poorly understood. Katrina did a stint at the National Institutes of Health to probe this question, using mice as a proxy for humans.

Collecting data for this would seem easy: weigh out food, give it to the mouse, and weigh what’s left later. But as Katrina relates, it’s far more burdensome than that. First of all, one mouse doesn’t make for great statistics, and scaling the feeding process across dozens or hundreds of mice is non-trivial. So is dealing with mundane issues, like commuting into the lab to feed the animals on schedule. It was all taking too much time, and what’s worse, it only offered a broad view of how much food was eaten.

Automating a Critical Mass of Rodent Feeders

Determined to get her life back and get more granular data, Katrina designed an automated feeder for her mice. Such devices are commercially available, of course, but at a cost too high for her lab to bear. Her 3D-printed feeding system, which is entirely open source, can dispense a single food pellet from a hopper into a tray using a small stepper motor. When the mouse picks up the pellet, an Arduino detects it with a phototransistor, records the event on a data logging shield, and dispenses a fresh nugget.

It sounds simple enough, but it took many iterations to get to a final design, and even then it’s not perfect — pellets sometimes misbehave on the way down the chute. It also has no connectivity, so the next version will add WiFi for easier integration and data capture. That said, the design is good enough to have attracted the attention of labs all over the world, who have downloaded Katrina’s design and built their own version of the device. That’s the power of open source, and hats off to Katrina for sharing her hard-won experience for the benefit of all.

Speaking from personal experience, I have a word of warning for Katrina: Be careful, because you might just find that building devices like this ends up being more interesting than the science it supports. That’s how it turned out for me, anyway.

Nightflyers has the blood, body count we expect from George R.R. Martin

Mass router hack exposes millions of devices to potent NSA exploit

Wonderful Sculptural Circuits hide Interactive Synthesizers

When it rains, it pours (wonderful electronic sculpture!). The last time we posted about freeform circuit sculptures there were a few eye-catching comments mentioning other fine examples of the craft. One such artist is [Eirik Brandal], who has a large selection of electronic sculptures. Frankly, we’re in love.

A common theme of [Eirik]’s work is that each piece is a functional synthesizer or a component piece of a larger one. For instance, when installed the ihscale series uses PIR sensors to react together to motion in different quadrants of a room. And the es #17 – #19 pieces use ESP8266’s to feed the output of their individual signal generators into each other to generate one connected sound.

Even when a single sculpture is part of a series there is still striking variety in [Eirik]’s work. Some pieces are neat and rectilinear and obviously functional, while others almost looks like a jumble of components. Whatever the style we’ve really enjoyed pouring through the pages of [Eirik]’s portfolio. Most pieces have demo videos, so give them a listen!

Thanks [james] for the tip!

Nintendo loosens content restrictions, ends revenue splitting for video makers

High-density lithium in graphene: An intriguing battery possibility

Starbucks will begin filtering pornography from its Wi-Fi networks

Interstellar 8-Track: The Not-So-Low-Tech Data Recorders of Voyager

Pixel Slate review: Paying the “Google” premium for Chrome OS

From Raspberry Pi to Home Brewing, Here Are 19 Projects To Make From Our Gift Guide

Raspberry Pi Model A+Gift guides are great, nearly everybody loves them. They may be one of the few advertisements that people are happy to see, since they can genuinely help you decide on a fun gift for a loved one. I know I use them pretty extensively for my shopping. We came up […]

Read more on MAKE

The post From Raspberry Pi to Home Brewing, Here Are 19 Projects To Make From Our Gift Guide appeared first on Make: DIY Projects and Ideas for Makers.

Reverse Engineering With Sandpaper

Every once in a while, and more so now than before, you’ll find a really neat chip with zero documentation. In [David]’s case, it’s a really cool USB 3.0 eMMC/ SD MMC controller. Use this chip, attach a USB port on one end, and some memory on the other, and you have a complete bridge. There are drivers, too. There are products shipping with this chip. The problem is, there is no data sheet. Wanting to use this chip, [David] turned to sandpaper to figure out the pinout of this chip.

The best example of a product that came with this chip is a simple board from the hardkernel store that happily came with fairly high resolution product photos. While waiting for these boards to be delivered, [David] traced the top layer of copper. This was enough to get an idea of what was going on, but the real work started when the boards arrived. These were placed in a flatbed scanner and carefully photographed.

The next step was to desolder all the parts, taking care to measure and catalog each component. Then, it’s off to sanding with 200 and 600 grit wet sandpaper. Slowly, the soldermask is removed and the top copper layer appears. After that, it’s just a matter of sanding and scanning, stacking all the layers together with your image processing software of choice.

There are a few caveats to hand-sanding a PCB to reverse-engineer the copper layers. First, it makes a mess. This is wet/dry sandpaper, though, and you can and should sand with water. Secondly, even pressure should be applied. We’re not sure if [David] was holding the sandpaper or not, but the best technique is to actually hold the board itself.

Despite a few problems, [David] did get the pictures of each copper layer. After assembling these images, he could make an Eagle part for an eMMC reader for his Nintendo Switch.

Good drive, good value: The Jeep Compass Latitude reviewed

SauceBot Uses G-Code to Apply Condiments with Precision

You just can’t please some people. Take a 3D-printer disguised as a condiment dispenser to a public event and next thing you know people actually expect you to build a 3D-condiment dispenser for the next time. How can you help but oblige?

We have to admit to more than a little alarm when [ShaneR] sent us this tip, as on first reading it seemed to endorse the culinary sin of putting ketchup on barbecue. But then we watched the video below and realized this dispenser is only applying ketchup and mustard to hot dogs, and while some purists would quibble with the ketchup, we’ll let that slide. The applicator, dubbed SauceBot by the crew at Connected Community HackerSpace in Melbourne, appears to be purpose-built entirely from laser-cut acrylic, including the twin peristaltic pumps for extruding the ketchup and mustard. We’re not sure the Z-axis is entirely necessary for dispensing onto hot dogs, but since this was a community outreach event, it makes sense to go all in. The video below shows it in use at a fundraiser, and while the novelty of it probably sold quite a few dogs, it’s safe to say the food service industry won’t be alarmed that this particular robot will be stealing jobs anytime soon.

Seriously, if your hackerspace is going to have public events with food, something like this could really get the conversation started. Then again, so might a CD execution chamber.

Mini Vectrex Prototype Restored By National Videogame Museum

The crash of the videogame market in 1983 struck down a slew of victims, and unique products such as the Vectrex were not immune to its destructive ways. The all-in-one console featured a monochromatic vector display and offered an arcade-like experience at home complete with an analog joystick controller. It sadly never made it to its second birthday before being axed in early 1984, however, thanks to the [National Videogame Museum] we now how a glimpse of an alternate history for the Vectrex. They posted some photos of an unreleased Vectrex prototype that was restored to working order.

Little was known about this “Mini version” of the Vectrex as its very existence was called into question. The console came into and left the videogame market in such short order that its distributor, Milton Bradley, would have killed any additional model posthaste. Little thought was given to the idea, though a rumor appeared in Edge magazine issue 122. The article detailed a fan’s memory of seeing a Vectrex shaped “like a shoebox” on the president’s desk.

Seven years after the publication of that story, photos of the Vectrex design revision were posted by one of the Vectrex designer’s sons on Flickr. These photos served as the only concrete evidence as to the existence of the machine that were widely available for some time. That was until the [National Videogame Museum] managed to acquire the actual prototype as part of the museum’s collection in Frisco, TX. So for those without plans to swing through the DFW area in the near future, there is the video of the mini Vectrex in action below.

Also don’t miss this digital picture frame that was re-purposed into a color changing Vectrex overlay.

Mini Vectrex Prototype (@NVMUSA)

9 Planes Combine To Make One Giant Flexible Flier

[Ran D. St. Clair] has created a unique flying machine in the Flex 9. It’s not every day that you see a completely new and unusual aircraft, but the Flex 9 definitely fits the bill. [Ran] took 9 radio controlled planes, connected them together, and made one giant plane — and with an 18-foot wingspan, giant isn’t a misnomer.

The planes that make up the Flex 9 are simple aircraft – foamboard wings, a boom, and a basic tail. The individual planes only have elevator control – no rudder, no ailerons. Power comes from a standard LiPo battery, ESC and brushless outrunner motor. The control system is interesting – every plane has a KK board flight controller running OpenAeroVTOL firmware. The center plane has a radio receiver and communicates to the other KK boards over standard servo wires. Rudder (yaw) and aileron (bank) control are achieved through mixing handled by flight controllers.

Even the couplings between the planes were carefully designed. [Ran] used an EPP foam core as a rubbery dampener, with plywood to strengthen the joint. Each joint is mounted at a 20-degree angle. As the planes bank relative to each other, the angle forces the airframe to twist, which should help the whole system stay level.

Check out the videos below for an explanation and a flight test. The Flex 9 launch isn’t exactly stable – there’s some crazy sinusoidal wobbling going on. But the mechanical and electronic dampeners quickly spring into action smoothing the flight out.

If you’d like to know more about the KK board, you can read about right here.

Facebook pondered, for a time, selling access to user data

Pedal Far With A Solar Powered Tricycle

More and more electric bikes have been rolling out into the streets lately as people realize how inexpensive and easy they are to ride and use when compared to cars. They can also be pedaled like a normal bike, so it’s still possible to get some exercise with them too. Most have a range somewhere around 10-30 miles depending on battery size, weight, and aerodynamics, but with a few upgrades such as solar panels it’s possible to go much, much further on a charge.

[The Rambling Shepherd] had a tricycle (in the US, generally still considered a bicycle from a legal standpoint) that he had already converted to electric with a hub motor and battery, and was getting incredible range when using it to supplement his manual pedaling. He wanted to do better, though, and decided to add a few solar panels to his build. His first attempt didn’t fare so well as the 3D-printed mounts for the panel failed, but with a quick revision his second attempt survived a 50-mile trip. Even more impressive, he only had his battery half charged at the beginning of the journey but was still able to make it thanks to the added energy from the panels.

If you’re thinking that this looks familiar, we recently featured a tandem tricycle that was making a solar-powered trip from Europe to China with a similar design. It has the advantage of allowing the rider to pedal in the shade, and in a relatively comfortable riding position compared to a normal bike. Future planned upgrades include an MPPT charge controller to improve the efficiency of the panels.

Wednesday, November 28

Putting Nintendo Switch’s 8.2 million US Switch sales in context

Apple fixes iCloud client, no longer blocks Windows 10 October 2018 Update

Black box data shows pilots fought control system in Indonesia crash

Net neutrality advocates pressure Congress with “Day of Action” Thursday

Sniffing RFID Readers With A Piece of Paper

We feature plenty of printed projects here on Hackaday, though they tend to be of the three dimensional type thanks to the proliferation of affordable 3D printers. But in this case, [Milosch Meriac] has managed to put together a printable design that’s not only a very cool hack, but is made up of a scant two dimensions. His creation, which could perhaps be considered something of an interactive circuit diagram, allows anyone with a paper printer and a few passive components make a functional low-frequency RFID sniffer.

[Milosch] tells us the goal of the project is to lower the barrier for experimenting with the RFID technology that’s increasingly part of our everyday lives. Rather than having to use something expensive and complicated such as an oscilloscope, experimenters can simply plug their DIY RFID sniffer into their computer’s line-in jack and explore the produced waveform with open source tools.

To create a paper RFID sniffer, you start by printing the image out on a thick piece of paper, like card stock. You then apply foil tape where indicated to serve as traces in this makeshift PCB, and start soldering on the components as described in the text. [Milosch] says the assembly procedure is so simple even a kid can do it, and the total cost of each assembled sniffer is literally pennies; making this an excellent project for schools or really any large group.

If you want to play it safe the sniffer can be connected to a USB sound card rather than your machine’s primary sound hardware, and still come in dirt cheap. [Milosch] stops short of explaining the software side of things in this particular project, but any tool which can use input from the sound card as a makeshift oscilloscope should be a good start.

In the past we’ve seen [Milosch] perform low frequency RFID sniffing through the sound card with the powerful baudline tool, but if you want a little more capable hardware, we can point you in the right direction.

DJI’s Tiny New Osmo Pocket Steadicam Looks Good For Project Documenting

A few years ago, the only options for camera stabilizers were awkward rigs that required carefully balanced passive gimbals, or clunky, large weights strapped to the bottom of a camera to add shake-reducing mass. As the drone industry has pushed micro-gimbal technology forward, it’s fascinating to see it become implemented […]

Read more on MAKE

The post DJI’s Tiny New Osmo Pocket Steadicam Looks Good For Project Documenting appeared first on Make: DIY Projects and Ideas for Makers.

Dealmaster: Get a $100 Apple App Store and iTunes gift card for $85

ACLU fights government secrecy over thwarted wiretap of Facebook Messenger

The Boring Company won’t pursue LA tunnel under 405 freeway anymore

Plot twist: Mitochondrial DNA can come from both parents

Homebrew Battery Discharger

Rechargable batteries are great – they save money and hassle when using portable devices. It’s pretty common to want to recharge a battery, but less common to intentionally discharge one. Regardless, [Pawel Spychalski] is working on a device to do just that – in a controlled fashion, of course.

[Pawel] himself notes that the device isn’t something the average person would necessarily need, but it does have its applications. There are times when working with various battery chemistries that it is desired to have them held at a certain state of charge. Also, such devices can be used to measure the capacity of batteries by timing how long they take to discharge when placed under a given load.

The build is one that takes advantage of the available parts of the modern hacker’s junkbox. An Arduino is used with an N-channel MOSFET to switch a resistive load. That load consists of load resistors designed for automotive use, to allow cars originally designed for filament bulbs to use LED indicator lights without the flash frequency speeding up. The resistors are 10 ohms and rated at 50 W, so they’re just about right for ganging up to discharge small LiPo batteries in a short period of time.

[Pawel] has tested the basic concept, and has things working. Next on the agenda is to find a way to get rid of the excess heat, as the current design has the resistors reaching temperatures of 158 °F (70 °C) in just a few minutes. Use some of that power to drive a fan?

Perhaps you’re working with lead acid batteries, though – in which chase, you might want to consider blasting away the sulphates?

Sennheiser discloses monumental blunder that cripples HTTPs on PCs and Macs

Bose Einstein Condensate may reveal supersolid’s secrets

Bose Einstein Condensates (BECs) have been around for more than 20 years now. One of the best applications of the BEC, it turns out, is as a tool to explore other quantum things, like solids—yes, the properties of solids are determined by quantum mechanics.

Among those solids is a controversial and possibly nonexistent theoretical one: the supersolid. Now, a pair of theoretical physicists have shown that a recently observed BEC “droplet” state may be a way to create a supersolid-like material. That may lead to a way to explore the properties of a supersolid without the difficulties associated with conventional materials.

Bose Einstein condensates

A BEC is a state of matter that requires a specific type of particle. Essentially, the particle world is divided in two: you are either a fermion or a boson. Fermions don’t like each other, so they stack themselves in order of energy, from low to high. Any two fermions that are within touching distance of each other must be different. That might mean different energies, or different spins, or some other property, but they must be different. Pretty much everything is made of fermions, and this stacking is what makes the Universe the way it is.

Read 10 remaining paragraphs | Comments

Sign Up for Our Free Wearables Livestream Workshop

Now is as good a time as ever to jump into the world of waerables, and we can help you do that with our upcoming free Live Workshop, hosted by expert tech maker and fashion designer Kitty Yeung.

Read more on MAKE

The post Sign Up for Our Free Wearables Livestream Workshop appeared first on Make: DIY Projects and Ideas for Makers.

Netflix’s anime announcement frenzy, capped off by live-action Cowboy Bebop

Linux Fu: Controlling the Terminal

A Linux terminal has a lot more features than the TeleType of yore. On a TeleType, text spews out and scrolls up and is gone forever. A real terminal can use escape characters to do navigate around and emulate most of what you like about GUIs. However, doing this at the lowest level is a chore and limits portability. Luckily, all the hard work has already been done.

First, there’s a large database of terminal capabilities available for you to use: terminfo.  And in addition, there’s a high-level library called curses or ncurses that simplifies writing programs to control the terminal display. Digging deep into every nook and cranny of ncurses could take years. Instead, I’m going to talk about using a program that comes with ncurses to control the terminal, called tput. Using these two commands, you can figure out what kind of terminal you’re dealing with, and then manipulate it nearly to your heart’s content. Let’s get started!

About terminfo

The most fundamental question you have to ask is what kind of terminal are you talking to. The answer is in the $TERM environment variable and if you ask your shell to print that variable, you’ll see what it thinks you are using: echo $TERM.
For example, a common type is vt100 or linux console. This is usually set by the system and you shouldn’t change it unless you have a good reason. In theory, of course, you could manually process this information but it would be daunting to have to figure out all the way to do something like clear the screen on the many terminals Linux understands.

That’s why there’s a terminfo database. On my system, there are 43 files in /lib/terminfo (not counting the directories) for terminals with names like dumb, cygwin, ansi, sun, and xterm. Looking at the files isn’t very useful since they are in a binary format, but the infocmp program can reverse the compilation process. Here’s part of the result of running infocmp and asking for the definition of a vt100:


vt100|vt100-am|dec vt100 (w/advanced video),

       am, mc5i, msgr, xenl, xon,

        cols#80, it#8, lines#24, vt#3,

        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz~~,

        bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>,

        clear=\E[H\E[J$<50>, cr=\r, csr=\E[%i%p1%d;%p2%dr,
 

This might not look much better than the binary version. But you can probably guess that it is telling you, in part, that the bell character (bel) is Control-G (^G). You can also probably guess that \E is an escape character and puzzle out how to make characters bold or clear the screen. Some of the data is structural such as 24 lines and 80 columns of output. The capabilities (like xon for using XON/XOFF protocol) are a bit harder to puzzle out without looking it up.

The exact meanings, though, aren’t important. Because we are going to use higher-level constructs to tell tput what we want and it — or at least the ncurses library — will look up the data in terminfo and then do the right thing.

Using tput for Information

I’m not sure where the name tput came from — you have to assume it is “terminal put.” But you can use tput to get information, too. For example, instead of looking at $TERM, you can say tput longname. You can learn other things, too. For example, how wide is the terminal (in characters)? tput cols.

This is especially handy for terminals under X Windows that might change size. In a script you can trap the WINCH event to run some code when the terminal resizes, which can be very handy. Other things you can read is the number of lines and the number of colors.

For example, assuming you have fortune installed, you might want a little fortune window that updates every 30 seconds. It would be nice, though to have the fortune center even if the screen changes size.

#!/bin/bash
# Simple centered fortune
TIMEOUT=30


do_print() {
  w=$(tput cols)
  h=$(tput lines)
  n=${#text}
  spaces=$(( ($w-$n)/2 ))
  lines=$(( $h/2 ))
  clear
  for I in `seq 1 $lines`
  do
   echo 
  done
  for I in `seq 1 $spaces`
  do
    echo -n ' '
  done
  echo $text
}

while true
do
  text=$(fortune -n $(tput cols) -s )
  do_print
  sleep ${TIMEOUT:-30}
done

This works pretty well. When a fortune appears it will be in the center of the window. I do all the drawing in do_print because I have future plans for that function.

The fortune command tells it to only give us short fortunes and the definition of short is the width of the screen according to tput. I use a few bash-specific techniques here including expression evaluation, string length(${#text}), and default parameters

You’ll notice, though, if you resize the window, the fortune won’t be in the right place until a new one appears. How can we fix that?

Use a WINCH

Turns out, the program should get a SIGWINCH signal when the terminal resizes. I say “should” because there are cases where this doesn’t occur, for example in some emacs shells. (In fact, a lot of this breaks in emacs.) There are probably other setups that could have problems, too. However, assuming the code gets SIGWINCH, it is easy to handle it. This line of code should take care of it: trap do_print WINCH

The only problem is, it doesn’t work right for this script. The script spends most of its time sleeping and it will only get the signal when it wakes up. But by that time, you’ll also get a new fortune, so while it does the right thing, it either does it with the new fortune or it does it with the old fortune and is immediately overwritten.

The answer is to sleep less. However, it is rude to the rest of the system to simply sit and spin, so I change the sleep to this:

# Can't just sleep for timeout
# because we won't get SIGWINCH when sleeping
# If you want faster response, sleep less
TO=${TIMEOUT:-30}
TO=$(( $TO * 2 ))
for I in `seq 1 ${TIMEOUT:-30}`
do
   sleep 0.5
done

This is a little over complex because I wanted to sleep for 500 milliseconds instead of a full second. The less you sleep the more responsive the script is to changes. However, the more system resources you waste, so it is a tradeoff.

Formatting

Learning the size of the screen is pretty useful. But you can also use tput to format text:

  • blink – Blinking text
  • bold – Bold text
  • invis – Invisible text
  • rev – Reverse video
  • rms0 – End standout mode
  • rmul – End underlined text
  • setab – Background color
  • setaf -Foreground color
  • sgr0 – Turn off all attributes
  • smso – Start standout mode
  • smul – Start underlined mode

The colors take a number ranging from 0 black to 7 white. A value of 9 resets the default color. Try changing the echo $text line to look like this:

tput setab 7   # white background
tput setaf 4   # blue text
tput bold
echo $text
tput sgr0

Unfortunately, you can’t use color names unless you define them yourself. If you don’t like using separate tput calls for each item, you can use the -S option and a here document:

tput -S >> tputEOF
  setab  7  # white
  setaf  3  # blue
  bold
tputEOF

You still have to put one item per line, though. I can’t say why standout and underline mode have a specific end code and the rest you just have to use sgr0 to turn everything off.

Erasing and Saving

I used clear to clear the screen but I could have used tput clear. In fact, on some systems clear is an alias to tput and the program is smart enough to know if you call it as clear it should clear the screen and exit.

There are a few commands that let you either clear parts of the screen or save and recall the screen:

  • clear – Clear the whole screen
  • ed – Clear to end of screen
  • el – Clear to end of line
  • el1 – Clear to start of the line
  • rmcup – Restore saved screen
  • smcup – Save screen and clear

You can try tput smcup from the command line if you want to see it work. Just issue the command, do some things, and then issue tput rmcup. If you want to color the whole screen, try this in the fortune script, replacing the clear command:

tput setab 2
tput clear

Then take out the setab command further down.

Cursor Control

The last item is to be able to move the cursor under program control:

  • civis – Set cursor invisible
  • cnorm – Set normal cursor
  • cud1 – Move down one line
  • cup – Set row and column
  • cuu1 – Move cursor up one line
  • home – Move cursor to top left
  • rc – Restore saved cursor position
  • sc – Save cursor position

You could do a better job on the script now, to position the print location to the right place by replacing both for loops in do_print with: tput cup $lines $spaces.

Other Ideas

Using tput you can easily create things like progress bars or display data by pages without relying on external pager programs. Of course, if you need something too fancy, you probably ought to go with a GUI program or a dialog-box library. Of course, there are many of these for Linux: dialog, cdialog, zenity, kdialog, and easybashgui come to mind.

But sometimes you can’t, don’t want to, or just don’t need to get involved with more complex libraries. For simply putting text somewhere up on the screen, it’s hard to beat tput.