I ordered some scuba gear during the sales last weekend. One of the items I purchased came with a free 1W LED flashlight (the yellow one on this pageYesterday at work-just for fun-I hooked the two lines going to the LED to my oscilloscope. Below are a couple of the screenshots I took of the signal
( Read more... )
There are things we are supposed to do that we don't. Exercise. Avoiding fast foods. Use the assert() macro. Exercise is a real pain that requires time and effort. Fast food can save time, and is carefully designed to seduce us. But asserts take little time or effort, and yet are as rare as the spotted owl. The Linux kernel sports just one thousand
( Read more... )
I think this is a neat C-preprocessor trick for implementing binary literals. Unlike 0b0101 which some compilers support and others support via a patch (gcc), this method is portable: