Jump to content
43oh

Recommended Posts

15 hours ago, Dipendra said:

I want to interface DHT22 with TIVAC (tm4c123). Can anyone help me with the code.My code is not working.

DHT22_energia.ino

You haven't provided enough information to get help....  Most importantly you have not stated what about the code is not working.  Is it failing to compile?  Is it giving bad results?  Is it failing to print?  You haven't stated which library you are using, etc...  So, anyone attempting to answer your problem would just be guessing.

Try using the Adafruit library without changing anything and have it print directly to the serial monitor: https://github.com/adafruit/DHT-sensor-library  Use pin 2 (PB5) on the LaunchPad.  I just tried it on my TM4C123 and it worked.  Once that is working, try adding in the code for the LCD.

Link to post
Share on other sites
8 hours ago, Dipendra said:

Yes, it is failing to compile. It is showing DHT  doesn't name a type and I am facing issues with library also.I am not able to find a correct library for liquid crystal for lcd for energia.

Have you interfaced DHT22 with TM4C123?

You should post your error.

Link to post
Share on other sites
On 3/17/2017 at 5:03 AM, Fmilburn said:

You haven't provided enough information to get help....  Most importantly you have not stated what about the code is not working.  Is it failing to compile?  Is it giving bad results?  Is it failing to print?  You haven't stated which library you are using, etc...  So, anyone attempting to answer your problem would just be guessing.

Try using the Adafruit library without changing anything and have it print directly to the serial monitor: https://github.com/adafruit/DHT-sensor-library  Use pin 2 (PB5) on the LaunchPad.  I just tried it on my TM4C123 and it worked.  Once that is working, try adding in the code for the LCD.

 

It is not compiling. It is giving an error that DHT does not name a type. I have tried library which you suggested but this library also not working for me. I want to use DHT library for TM4C123 in Energia. Did u interface DHT22 with TM4C123? Can You share your code?

Link to post
Share on other sites

As stated above, I tried the library that I linked above with a TM4C123 / DHT22 the same day I made the post and it worked.  Use the example code that comes with the library.  I was probably using Energia V17.  Do a search with google with the error message text if you want to understand what it means. 

Link to post
Share on other sites
On 3/17/2017 at 5:03 AM, Fmilburn said:

You haven't provided enough information to get help....  Most importantly you have not stated what about the code is not working.  Is it failing to compile?  Is it giving bad results?  Is it failing to print?  You haven't stated which library you are using, etc...  So, anyone attempting to answer your problem would just be guessing.

Try using the Adafruit library without changing anything and have it print directly to the serial monitor: https://github.com/adafruit/DHT-sensor-library  Use pin 2 (PB5) on the LaunchPad.  I just tried it on my TM4C123 and it worked.  Once that is working, try adding in the code for the LCD.

 
 

It is not compiling. It is giving an error that DHT does not name a type and it is giving me an error that PUSH is not in the scope so where should i define push?

Link to post
Share on other sites

PUSH is not a variable in the example / library that I suggested above so you must  not be following the suggestion.  In your first post it is not defined.  It needs something like #define PUSH xxx where xxx is a pin number / designation.

Doing a search for "DHT does not name a type" on the internet will give multiple hits and solutions to the problem so you apparently did not do the search as suggested.  The library is probably installed incorrectly.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...