Coder Social home page Coder Social logo

digital1o1 / dht_22-temperature-humidty-oled-display Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 23 KB

Displaying both humidity and temperature from a DHT_22 sensor on two 1.5 OLED Displays using I2C to communicate to an Arduino/AVR board

C++ 100.00%
oled-displays uno i2c diagram hex-addresses

dht_22-temperature-humidty-oled-display's People

Contributors

digital1o1 avatar

Watchers

 avatar  avatar

dht_22-temperature-humidty-oled-display's Issues

Same setup but with Dual 0.96" 1306 Screens

Hello, first I would like to say THANK YOU! for making this code. Long story short my father has been using a smoker for various cured meats they make at home and I wanted to make a simple dual screen monitoring system for him that shows Humidity on one screen and Temp on the other screen. I am not super good with code but I found your src code. I cant seem to compile it though (Im using a Arduino Nano btw). When I first tried to upload it I have a issue with the dht.h library referenced at the top. I fixed that by making it DHT.h Next it hangs on current_humditiy = DHT.humidity; with error

Compiling sketch...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "-IC:\Users\Blue_\Documents\Arduino\libraries\U8g2\src" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src" "-IC:\Users\Blue_\Documents\Arduino\libraries\DHT_sensor_library" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "-IC:\Users\Blue_\Documents\Arduino\libraries\Adafruit_Unified_Sensor" "C:\Users\Blue_\AppData\Local\Temp\arduino_build_850923\sketch\Dual_Screen_U8g2_custom.ino.cpp" -o "C:\Users\Blue_\AppData\Local\Temp\arduino_build_850923\sketch\Dual_Screen_U8g2_custom.ino.cpp.o"
C:\Users\Blue_\Documents\Arduino\Temprature_and_Humidity_Station\Dual_Screen_U8g2_custom\Dual_Screen_U8g2_custom.ino: In function 'void get_Current_Readings()':
Dual_Screen_U8g2_custom:19:18: error: expected primary-expression before '.' token
int chk = DHT.read22(DHT22_2);
^
Dual_Screen_U8g2_custom:19:26: error: 'DHT22_2' was not declared in this scope
int chk = DHT.read22(DHT22_2);
^~~~~~~
C:\Users\Blue_\Documents\Arduino\Temprature_and_Humidity_Station\Dual_Screen_U8g2_custom\Dual_Screen_U8g2_custom.ino:19:26: note: suggested alternative: 'DHT22'
int chk = DHT.read22(DHT22_2);
^~~~~~~
DHT22
Dual_Screen_U8g2_custom:20:23: error: expected primary-expression before '.' token
current_temp = DHT.temperature;
^
Dual_Screen_U8g2_custom:21:27: error: expected primary-expression before '.' token
current_humditiy = DHT.humidity;
^
Using library U8g2 at version 2.27.6 in folder: C:\Users\Blue_\Documents\Arduino\libraries\U8g2
Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire
Using library DHT_sensor_library at version 1.4.1 in folder: C:\Users\Blue_\Documents\Arduino\libraries\DHT_sensor_library
Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI
Using library Adafruit_Unified_Sensor at version 1.1.4 in folder: C:\Users\Blue_\Documents\Arduino\libraries\Adafruit_Unified_Sensor
exit status 1
expected primary-expression before '.' token

This seems like simple code so I assumed maybe my libraries are different. I deleted the DHT library and so on then reinstalled them but same issues. Please helps as I wanted this done tonight but I assume you wont see this in time. I wanted to go by there tomorrow and have it ready for him.

If you do end up reading this please let me know what you think I should fix.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.