One of the core lessons any physics student will come to realize is that the more you know about physics, the less intuitive it seems. Take the nature of light, for example. Is it a wave? A particle? Both? Neither? Whatever the answer to the question, scientists are at least able to exploit some of its characteristics, like its ability to bend and bounce off of obstacles. This camera, for example, is able to image a room without a direct light-of-sight as a result.
The process works by pointing a camera through an opening in the room and then strobing a laser at the exposed wall. The laser light bounces off of the wall, into the room, off of the objects on the hidden side of the room, and then back to the camera. This concept isn’t new, but the interesting thing that this group has done is lift the curtain on the image processing underpinnings. Before, the process required a research team and often the backing of the university, but this project shows off the technique using just a few lines of code.
This project’s page documents everything extensively, including all of the algorithms used for reconstructing an image of the room. And by the way, it’s not a simple 2D image, but a 3D model that the camera can capture. So there should be some good information for anyone working in the 3D modeling world as well.
There was a time when microprocessors were slow and expensive devices that needed piles of support chips to run, so engineers came up with ingenious tricks using extra hardware preprocessing inputs to avoid having to create more code. It would be common to find a few logic gates, a comparator, or even the ubiquitous 555 timer doing a little bit of work to take some load away from the computer, and engineers learned to use these components as a matter of course.
The nice thing is that many of these great hardware hacks have been built into modern microcontrollers through the years. The problem is you know to know about them. Brett Smith’s newly published Hackaday Superconference talk, “Why Do It The Hard Way?”, aims to demystify the helpful hardware lurking in microcontrollers.
Join us below for a deeper dive and the embedded video of this talk. Supercon is the Ultimate Hardware con — don’t miss your chance to attend this year, November 15-17 in Pasadena, CA.
The aim of the library is to get rid of piles of state tracking variables and endless if/else statements – hence the name. It’s designed primarily for the Arduino IDE but doesn’t have any dependencies on the API, so can be used in other C++ environments. It comes with a variety of neat tools for common jobs, such as reading an analog sensor with hysteresis around a trigger point, as well as easy ways to track state changes across multiple variables. By using basic English terms instead of condition checks and mathematical operators, it can make things more readable and easier to follow.
It’s entirely possible to do your coding in vim or emacs, hammering out hotkeys to drive the interface and bring your code to life. While working in such a way has its charms, it can be confronting to new coders, and that’s before even considering trying to understand command line compiler settings. The greenhorn coder may find themselves more at home in the warm embrace of an IDE, and [morrows_end] has now built one for those working with AVR assembly code.
The IDE goes by the name of Simple AVR IDE, or savr_ide for short. Programmed in C++ with the FLTK widget library, [morrows_end] has tested it on Windows XP, but notes that it should successfully compile for Linux, Unix, and even MacOS too.
All the basic features are there – there’s syntax highlighting, as well as integration with the AVRA assembler and AVRDUDE for programming chips. It’s a tool that could make taking the leap into assembly code just that little bit easier. For another taste of bare metal coding, check out [Ben Jojo]’s discussion of x86 bootloaders.
We’ve all been there. When debugging a microcontroller project, we just want to put in a print statement to figure out what’s going on with the microcontroller in real time. However, advanced embedded programmers know that printf statements are verboten: they’re just too SLOW. While not fixing this plight entirely, [Atakan Sarioglu] has come up with a clever way to create readable debug messages with minimal runtime overhead.
[Atakan Sarioglu]’s innovation, called BigBug (Github), is a dynamically-generated codebook. The codebook translates abbreviated messages sent over serial (UART here) to longer-form human-readable messages. To generate the codebook, BigBug automatically parses your comments to create a lookup between an abbreviation and the long-form message. When you are running your program on the microcontroller, BigBug will translate the short codes to long messages in real-time as you send log/debug data over serial. Continue reading ““DB” = Abbreviated Microcontroller Debugging”→
FTDI’s chips have varying capabilities, but most can do more than just acting as a USB-connected COM port. It’s possible to use the chips for SPI, I2C, or even bitbanging operation. [jayben] has done the hard work of identifying the best drivers to use depending on your operating system, and then gone a step further to demonstrate example code for sending data over these various interfaces. The article not only covers code, but also shows oscilloscope traces of output, giving readers a strong understanding of what should be happening if everything’s operating as it should. The series rounds out with a primer on how to use FTDI hardware to speak the SWD protocol to ARM devices for advanced debugging use.
It’s a great primer on how to work effectively with these useful chips, and we imagine there will be plenty of hackers out there that will find great use to this information. Of course, it’s important to always be careful when sourcing your hardware as FTDI drivers don’t take kindly to fake chips.
Building your own weather station is a fun project in itself, but building it to be self-sufficient and off-grid adds another set of challenges to the mix. You’ll need a battery and a solar panel to power the station, which means adding at least a regulator and charge controller to your build. If the panel and battery are small, you’ll also need to make some power-saving tweaks to the code as well. (Google Translate from Italian) The tricks that [Danilo Larizza] uses in his build are useful for more than just weather stations though, they’ll be perfect for anyone trying to optimize their off-grid projects for battery and solar panel size.
When it comes to power conservation, the low-hanging fruit is plucked first. [Danilo] set the measurement intervals to as long as possible and put the microcontroller (a NodeMCU) to sleep in between. Removing the power from the sensors when the microcontroller was asleep was another easy step, but the device was still crashing overnight. Then he turned to a hardware solution and added a more efficient battery charger to the setup, which saved even more power. This is all the more impressive because the station communicates via WiFi which is notoriously difficult to run in low-power applications.
Besides the low power optimizations, the weather station itself is interesting for its relative simplicity. It could be built with things most of us have knocking around. Best of all, [Danilo] published the source code on his site, so most of the hard work has been done already. If you’re thinking he seems a little familiar, it’s because we’ve featured some of his projects before, like his cheap WiFi extender antenna and his homemade hybrid tube amplifier.