The program that reads DHT11 is outside the system program.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Communication
Level 5
Level 5
100 replies posted First solution authored 250 sign-ins

I have a program that reads ADC and DHT11 sensors like the file below. I have problem sending data I can't read DHT11 sensor, after being directed I got an answer my problem is because my DHT11 reader program is written specifically not in system program. However, I don't understand what it's like to be outside the system program. Can someone tell me how to include the DHT11 reader in the system program.
Thank you!

0 Likes
1 Solution

Thank you!
I managed to handle it, but it doesn't seem to be optimal but no matter it met my requirements!

View solution in original post

0 Likes
18 Replies
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

hello:

   Are you using CY8CPROTO-063-BLE to test the function that is reading humidity and temperature value from the sensor DHT11, and send out the data by BLE connection? 

Actually, I can't sync the same code with the provided in this thread, so what is the problem now?

 the reading process has problem?  or ble connection has problems?

Thank you for your reply!
I am using CY8CPROTO-063-BLE to test the function of reading humidity and temperature values from DHT11 sensor and sending data using BLE connection. When reading the DHT11 sensor individually, the sensor works normally. But when I send sensor data DHT11 is not working. I was told it was because my DHT11 reader program works separately from BLE's program when doing data sending.

Thanks!

0 Likes

Why can't you sync with the code I give you? I use Modus Toolbox

0 Likes
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

Hello:

     sorry I do not have the same EVB with you, for the question "But when I send sensor data DHT11 is not working",  do you mean:

    when BLE worked with Reading DHT11 together,   ble worked well, but reading DHT11 failed.

if so , would you please share the logs when doing the test?

0 Likes

Communication_0-1680074209704.png

Thank you here is my result screen

0 Likes
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

I can't understand the error from the pic,  do you mean some value read out is not in the range.

0 Likes

Yes, it's not in my scope

0 Likes

I have a problem that when sending data values it can't send data it can only read

0 Likes
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

Would you please input the normal status of the sensor value also?  and it is better to add print log in the code of the sensor reading function.   

0 Likes

I do not understand what you mean. I can tell you that the initial declared values of humidity and temperature are floats and here is the program that sends the data as well as the output to my terminal screen.

Communication_0-1680093469897.pngCommunication_2-1680093583197.png

0 Likes
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

Do you mean when the BLE start to work, you can't read data from the sensor?

0 Likes

No, when I request to read data from mobile app, on mobile app only send value as 00, but terminal screen still reads temperature value as shown above.

0 Likes
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

Here is what I get from you:

You are getting the right data from the sensor on the psoc6 side. Then send these data to a phone through BLE. But you only get 00 on the phone app side?

Is it right?

0 Likes

That's right, that's exactly my problem

0 Likes
lock attach
Attachments are accessible only for community members.

This is my program, I have processed and sent the data of ADC but I still can't do it with DHT11

0 Likes

I really don't understand what the problem is because I'm new to this type of microprocessor and programming software. So I don't know a lot of things.

0 Likes
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

Did you try to check the data before you send it?

Could you get a right return value when you send the data through bluetooth?

0 Likes

Thank you!
I managed to handle it, but it doesn't seem to be optimal but no matter it met my requirements!

0 Likes