Jump to content

KittyHawk

Members
  • Content Count

    4
  • Joined

  • Last visited


Reputation Activity

  1. Like
    KittyHawk got a reaction from Elitemem in [Energia Library] DHT11 / DHT22 Temperature and Humidity Sensors   
    Hello.
     
    I made repository on github:
    https://github.com/JFF-Bohdan/dht22
     
    Here you can download modified version of DHT22/DHT11 library. This version based on topic starter code:
    https://github.com/MORA99/Stokerbot/tree/master/Libraries/dht
     
    Changes:
    stable work - bug fix for timeouts in DHT22 support; buffered support of data readings (ints and floats supported) - allows you read data faster, using internal buffer which holds saved data for tuned timeout; wiring and tech documentation (included into repository). dht22.ino based on DhtBuffered class which implements buffered support of int data. It reads data as integers and prints results with decimal part (using printDec()) call.
     
    Also, you can found these examples:
    /examples/buffered_floats.ino - buffered reading of float results [8 443 bytes (of a 16 384 byte maximum) on MSP430G2553]; /examples/buffered_ints.ino - buffered reading of integer results [4 221 bytes (of a 16 384 byte maximum) on MSP430G2553]; /examples/unbuffered_floats.ino - unbuffered reading using original classes by MORA99 (using float results) [8 055 bytes (of a 16 384 byte maximum) on MSP430G2553]. Hope you like it. Enjoy!
  2. Like
    KittyHawk got a reaction from nrdmtt in [Energia Library] DHT11 / DHT22 Temperature and Humidity Sensors   
    Hello.
     
    I made repository on github:
    https://github.com/JFF-Bohdan/dht22
     
    Here you can download modified version of DHT22/DHT11 library. This version based on topic starter code:
    https://github.com/MORA99/Stokerbot/tree/master/Libraries/dht
     
    Changes:
    stable work - bug fix for timeouts in DHT22 support; buffered support of data readings (ints and floats supported) - allows you read data faster, using internal buffer which holds saved data for tuned timeout; wiring and tech documentation (included into repository). dht22.ino based on DhtBuffered class which implements buffered support of int data. It reads data as integers and prints results with decimal part (using printDec()) call.
     
    Also, you can found these examples:
    /examples/buffered_floats.ino - buffered reading of float results [8 443 bytes (of a 16 384 byte maximum) on MSP430G2553]; /examples/buffered_ints.ino - buffered reading of integer results [4 221 bytes (of a 16 384 byte maximum) on MSP430G2553]; /examples/unbuffered_floats.ino - unbuffered reading using original classes by MORA99 (using float results) [8 055 bytes (of a 16 384 byte maximum) on MSP430G2553]. Hope you like it. Enjoy!
  3. Like
    KittyHawk got a reaction from OzGrant in [ Energia library ] MSP430 internal temp sensor   
    Library for MSP430 internal temperature sensor usage. This sensor is not very precise but can be used if necessary.

    You can access source code and see example file here:
    https://github.com/JFF-Bohdan/msp430intertempsensor

    Notice, that you can use float values for temperature or int16 (also with decimal part of temperature value). When using int16 temperature will be returned in this way:
    23.5 C will be returned as 235 (0xEB) integer value; 54.3 C will be returned as 543 (0x21F) integer value When using float values (on my MSP430G2553) memory usage will be like this:
    binary sketch size: 7 625 bytes (of a 16 384 byte maximum)

    When using int16 memory usage will be:
    binary sketch size: 3 359 bytes (of a 16 384 byte maximum)
  4. Like
    KittyHawk got a reaction from bluehash in [ Energia library ] MSP430 internal temp sensor   
    Library for MSP430 internal temperature sensor usage. This sensor is not very precise but can be used if necessary.

    You can access source code and see example file here:
    https://github.com/JFF-Bohdan/msp430intertempsensor

    Notice, that you can use float values for temperature or int16 (also with decimal part of temperature value). When using int16 temperature will be returned in this way:
    23.5 C will be returned as 235 (0xEB) integer value; 54.3 C will be returned as 543 (0x21F) integer value When using float values (on my MSP430G2553) memory usage will be like this:
    binary sketch size: 7 625 bytes (of a 16 384 byte maximum)

    When using int16 memory usage will be:
    binary sketch size: 3 359 bytes (of a 16 384 byte maximum)
  5. Like
    KittyHawk reacted to MORA99 in [Energia Library] DHT11 / DHT22 Temperature and Humidity Sensors   
    A library for reading dht sensors (temperature and humidity). Since dht sensors are pretty slow, I have used highlevel functions in the lib, there should be plenty of cycles even at 1MHz, but I have only tested it on the CC3200 sofar. Easy example, other functions are available for getting the raw values instead of float.
    if (dht::readFloatData(2, &temperature, &humidity, true) == 0) { Serial.print("T: "); Serial.print(temperature); Serial.print(" H: "); Serial.println(humidity); } Zip file included, source code lives at https://github.com/MORA99/Stokerbot/tree/master/Libraries/dht
     
    Note: This lib requires working micros, delayMicroseconds and pulseIn functions, if you are using it on CC3200 you may need to patch your Energia installation.
    dht.zip
×
×
  • Create New...