A bit ago I wrote an article called, “Death To The 3.5mm Audio Jack, Long Live Wireless.” A few readers were with me, a few were indifferent, many were vehemently against me, and there was a, not insubstantial, subset in a pure panic about the potential retirement of a beloved connector. Now I used a lot of opinionated language dispersed with subjectively evaluated facts to make a case that the connector is out. Not today maybe, but there is certainly a tomorrow not so far off where there are more wireless headsets at the electronics store than wired ones.
We don’t think of the human body as a piece of electronics, but a surprising amount of our bodies work on electricity. The heart is certainly one of these. When you think about it, it is pretty amazing. A pump the size of your fist that has an expected service life of nearly 100 years.
All that electrical activity is something you can monitor and–if you know what to look for–irregular patterns can tell you if everything is OK in there. [Ohoilett] is a graduate student in the biomedical field and he shares some simple circuits for reading electrocardiogram (ECG) data. You can see a video fo the results, below.
[Pawel] has a weather station, and its nerve-center is a Raspberry Pi. He wanted to include a light sensor but the problem is, the Pi doesn’t have a built-in ADC to read the voltage off the light-dependent resistor that he (presumably) had in his junk box. You can, of course, buy I2C ADC chips and modules, but when you’ve already got a microcontroller that has ADC peripherals on board, why bother?
[Pawel] wired up a tremendously simple circuit, downloaded some I2C slave-mode code, and added an LED for good measure. It’s all up on GitHub if you’re interested.
We’re covering this because we rarely see people coding for I2C slave devices. Everyone and their mom uses I2C to connect to sensors, for which the Arduino “Wire” library or “i2c-tools” on the Pi do just fine. But what do you do when you want to make the I2C device? [Pawel]’s project makes use of TinyWireS, a slave-mode SPI and I2C library for AVR ATtiny Arduino projects.
Here, [Pawel] just wanted a light sensor. But if you’re building your own devices, the sky is the limit. What’s the most esoteric I2C sensor that you can imagine? (And is it really the case that we haven’t seen an I2C slave device hack since 2010?)