ESP8266 Lullaby

The ESP8266 is certainly a versatile device. It does, however, draw a bit of power. That isn’t really surprising, though, since you would expect beaming out WiFi signals to take a little juice. The trick is to not keep the device on all the time and spend the rest of the time in deep sleep mode. [Marco Schwartz] has a good tutorial about how to use this mode to run for “years” on a battery.

[Marco] notes that even using a 2500 mAh LiPo battery, he only gets about 30 hours of operation without sleep. By putting the chip in sleep mode, the current consumption drops from about 88 mA to just over 8 mA. That’s still high, though, because the board has a power LED! By removing a jumper or cutting a trace (depending on the board), you can drop the current draw to about 0.08 mA (80 uA) when it’s not doing anything.

Continue reading “ESP8266 Lullaby”

MicroLisp With Matching Parens

Lisp is a supremely elegant programming language, but you won’t find it around much today. That’s a shame; in the 80s and 90s, all the cool kids were using Lisp machines, computers dedicated to the creation and interpretation of Lisp. While the AI renaissance of the 80s is dead, replaced with the machine learning fad of today, Lisp machines have gotten much smaller. Now, they’ll fit in your pocket, and they have parenthesis matching, to boot.

If this build looks familiar, you’re not wrong. A while back, we saw a similar pocket Lisp computer based around the ATMega328 microcontroller with 32k of Flash and 2k of RAM. That’s not a lot by any measure, and a much more suitable processor for an AVR-based pocket Lisp machine would be the big boys of the ATMega family.

The new and improved version of the Tiny Lisp Computer is built around the ATMega1284. If it’s capable enough to run a 3D printer, it should run Lisp very well. With more program space and more RAM come more features including matching parens when entering code, a serial monitor interface, and a program editor – basically a text editor on the chip.

Apart from the larger chip, the circuit remains relatively unchanged. The display is still an OLED that can be had for a few dollars from the usual online retailers, and the other bits of circuitry are still just a handful of resistors, caps, and wire. An off-the-shelf FTDI module (or whatever serial chip you desire) can be added to connect to a serial terminal, and support for a PS/2 keyboard rounds out the board.

A Trove Of Arcade Projects

[Ryan Bates] loves arcade games, any arcade games. Which is why you can find claw machines, coin pushers, video games, and more on his website.

We’ve covered his work before with his Venduino project. We also really enjoyed his 3D printed arcade joystick based off the design of a commercial variant. His coin pushing machine could help some us finally live our dream of getting a big win out of the most insidious gambling machine at arcades meant for children.

Speaking of frustrating gambling machines for children, he also built his own claw machine. Nothing like enabling test mode and winning a fluffy teddy bear or an Arduino!

It’s quite a large site and there’s good content hidden in nooks and crannys, so explore. He also sells kits, but it’s well balanced against a lot of open source files if you’d like to do it yourself. If you’re wondering how he gets it all done, his energy drink review might provide a clue.

Think You Know C? Find Out

I’ve had the fortune or misfortune of interviewing a lot of job candidates over the years. It amazes me how often someone will claim to know something, sound reasonable, but then if you quiz them on it, it becomes really obvious that they don’t know much. To flush this out, we had a three-question test that would tell you a lot. People who got the right answer were ahead of the game, of course, but even looking at how people approached the answer (right or wrong) would tell you a lot, too.

I remember one case where the answer involved casting a value. A candidate had impressed me until faced with the question to which he said (more or less): “Well, there’s this function. I think it is called ‘cast’…” I think the look on my face told him that I actually knew the answer (not surprising, since I was giving the test) and that wasn’t it.

[Oleksandr Kaleniuk] has a C quiz of only five simple questions. They reminded me of at least one of my old company’s three-question quiz. I don’t want to say too much about the character of the test because I don’t want to give away the answers, but if you think you are a C wizard, go check it out. Then come back in the comments and tell us how you did. Just try to avoid posting spoilers (although you should probably avoid the comment section until you come back).

Continue reading “Think You Know C? Find Out”

Better Tornado Warnings With Polygons And Pi

Everyone pays close attention to the weather, but for those who live where tornadoes are prevalent, watching the sky can be a matter of life and death. When the difference between making it to a shelter or getting caught in the open can be a matter of seconds, it might make sense to build an internet enabled Raspberry Pi weather alert system.

We know what you’re thinking – why not just buy an off-the-shelf weather alert radio with Specific Area Message Encoding (SAME) reporting, or just rely on a smartphone app? As [Jim Scarborough] explains, living in the heart of Tornado Alley and having had a brush with tragedy as a kid teaches you not to be complacent with severe weather. He found a problem with the SAME system: lack of locational granularity below the county level, leading to a tendency to over-warn during tornado season. [Jim]’s build seeks to improve SAME by integrating National Weather Service polygon warnings, which define an area likely to see a severe weather event as a collection of geographic vertices rather than a political unit. He’s using a Raspberry Pi NOAA weather radio receiver with SAME decoding, and while details are sparse and the project is ongoing, the idea seems to be to use the Pi to scrape the NWS site for polygon data once a county-level warning is issued.

It’s an interesting idea, and one we’ll be keeping an eye on as [Jim] continues his build. In the meantime, you can brush up on weather radio and SAME encoding with this Arduino SAME decoder.

[via r/weather]

Retrotechtacular: The Golden Book Of Chemistry Experiments

Back in “the old days” (that is, when I was a kid), kids led lives of danger and excitement. We rode bikes with no protective gear. We stayed out roaming the streets after dark without adult supervision. We had toy guns that looked like real ones. Dentists gave us mercury to play with. We also blew things up and did other dangerous science experiments.

If you want a taste of what that was like, you might enjoy The Golden Book of Chemistry Experiments. The book, first published in 1960, offers to show you how to set up a home laboratory and provides 200 experiments. The colorfully illustrated book shows you how to do some basic lab work as well as offering some science history and terminology.

Want to make oxygen? There’s several methods on page 27. Page 28 covers making hydrogen. To test the hydrogen for purity, the suggest you collect a test tube full, invert it, and stick a match up to the tube. If the hydrogen is pure it will burn with a pop noise. If air is mixed it, it will explode. Yeah, that sound safe to us.

Continue reading “Retrotechtacular: The Golden Book Of Chemistry Experiments”

ArduWorm: A Malware For Your Arduino Yun

We’ve been waiting for this one. A worm was written for the Internet-connected Arduino Yun that gets in through a memory corruption exploit in the ATmega32u4 that’s used as the serial bridge. The paper (as PDF) is a bit technical, but if you’re interested, it’s a great read. (Edit: The link went dead. Here is our local copy.)

The crux of the hack is getting the AVR to run out of RAM, which more than a few of us have done accidentally from time to time. Here, the hackers write more and more data into memory until they end up writing into the heap, where data that’s used to control the program lives. Writing a worm for the AVR isn’t as easy as it was in the 1990’s on PCs, because a lot of the code that you’d like to run is in flash, and thus immutable. However, if you know where enough functions are located in flash, you can just use what’s there. These kind of return-oriented programming (ROP) tricks were enough for the researchers to write a worm.

In the end, the worm is persistent, can spread from Yun to Yun, and can do most everything that you’d love/hate a worm to do. In security, we all know that a chain is only as strong as its weakest link, and here the attack isn’t against the OpenWRT Linux system running on the big chip, but rather against the small AVR chip playing a support role. Because the AVR is completely trusted by the Linux system, once you’ve got that, you’ve won.

Will this amount to anything in practice? Probably not. There are tons of systems out there with much more easily accessed vulnerabilities: hard-coded passwords and poor encryption protocols. Attacking all the Yuns in the world wouldn’t be worth one’s time. It’s a very cool proof of concept, and in our opinion, that’s even better.

Thanks [Dave] for the great tip!