<commit_before>spark-dht11
===========

Spark app to read a [DHT11
sensor](http://www.adafruit.com/products/386) and publish humidity and
temperature as Spark variables.

I got the [Spark Core device](https://www.spark.io/) from the
[Kickstarter project](https://www.kickstarter.com/projects/sparkdevices/spark-core-wi-fi-for-everything-arduino-compatible)
and this is my first project.

[The circuit is a DHT11 connected to 3v3, GND and a data
pin](https://raw.github.com/rigtorp/spark-dht11/master/hardware.jpg). I
use the internal pullup on the data pin.

I noticed a lot of people had issues with the DHT sensors and I could
not get the Adafruit library working myself. The [Adafruit
code](https://github.com/adafruit/DHT-sensor-library) is pretty iffy,
requires higher timing resolution than necessary and doesn't support
the internal pullup resistor. So I wrote my own simple version that
uses the internal pullup resistor. It reads the relative humidity and
temperature from a DHT11 sensor every 10 seconds and stores them in<commit_msg>Inline the hardware image in README.md<commit_after>spark-dht11
===========

Spark app to read a [DHT11
sensor](http://www.adafruit.com/products/386) and publish humidity and
temperature as Spark variables.

I got the [Spark Core device](https://www.spark.io/) from the
[Kickstarter project](https://www.kickstarter.com/projects/sparkdevices/spark-core-wi-fi-for-everything-arduino-compatible)
and this is my first project.

[The circuit is a DHT11 connected to 3v3, GND and a data
pin](https://raw.github.com/rigtorp/spark-dht11/master/hardware.jpg). I
use the internal pullup on the data pin:

![Photo of Spark Core with DHT11](https://github.com/rigtorp/spark-dht11/blob/master/hardware.jpg)

I noticed a lot of people had issues with the DHT sensors and I could
not get the Adafruit library working myself. The [Adafruit
code](https://github.com/adafruit/DHT-sensor-library) is pretty iffy,
requires higher timing resolution than necessary and doesn't support
the internal pullup resistor. So I wrote my own simple version that
uses the internal pullup resistor. It reads the relative humidity and
temperature from a DHT11 sensor every 10 seconds and stores them in
{'fraction_non_alphanumeric': 0.09082693176683236, 'fraction_numerical': 0.01717126073203796, 'mean_word_length': 4.780678851174935, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 9, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2511744', 'n_tokens_mistral': 706, 'n_tokens_neox': 636, 'n_words': 262}