psoc 5lp interface with LDR and Bluetooth HC-05

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

cross mob
Anonymous
Not applicable

Hi!

   

I tried to read the value from LDR and transmit that value to Bluetooth. but i cant able to read that value by using LDR_Read(); 

   

Please give the solution

   

Thanks in advance

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Reading an analog pin will not deliver an analog value, you will need to setup an Analog to Digital Converter (ADC) and connect the pin to it. Then you read the conversion result from the ADC. Look at the ADC datasheet for the required APIs

   

 

   

Bob

View solution in original post

0 Likes
8 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the forum.

   

Sorry, but I am not able to deduct what you are talking about.

   

Which development kit are you using?

   

What error do you get???

   

Can you please post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Bob

   

Which project??

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

Thanks for your reply,

   

I am using PSOC 5LP, CY8C5888LTI-LP097. I connected LDR in P0(0). I want to read that LDR value and Send that value through Bluetooth. but i am not able to read. Please verify my code and give some ideas.

   

please find the attachment.

   

Thanks.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Could not open the project, please use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Bob

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

PFA.

   

Thanks.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Reading an analog pin will not deliver an analog value, you will need to setup an Analog to Digital Converter (ADC) and connect the pin to it. Then you read the conversion result from the ADC. Look at the ADC datasheet for the required APIs

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thanks for your reply.

   

Let me check that.

   

Thanks

0 Likes
Anonymous
Not applicable

Thanks for your help..

   

Its working 🙂

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Great!

   

 

   

Thank you for the feedback!

   

Bob

0 Likes