I need help for a pH and Humidity project.

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Ficher
Posts: 5
Joined: Fri Mar 16, 2018 10:16 am
Contact:

I need help for a pH and Humidity project.

Postby Ficher » Fri Mar 16, 2018 10:23 am

Hello everyone, I have a project to do in class, i need to use flowcode and PIC16F877A, and I chose pH sensor (SEN0161) and Humidity sensor (YL-69), I created the program for both and it works in simulation but he doesn't work with the sensors. I searched how i can use the sensors but everything is on Arduino. If anyone can help me, thank you very much.

kersing
Valued Contributor
Valued Contributor
Posts: 1873
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 530 times
Been thanked: 1040 times
Contact:

Re: I need help for a pH and Humidity project.

Postby kersing » Fri Mar 16, 2018 10:46 am

Perhaps you could post your code so we can give you pointers to what might be wrong? Given the amount of information you have given us at the moment we need a crystal ball...
These users thanked the author kersing for the post:
medelec35 (Fri Mar 16, 2018 12:48 pm)
Rating: 5.26%
 
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

Ficher
Posts: 5
Joined: Fri Mar 16, 2018 10:16 am
Contact:

Re: I need help for a pH and Humidity project.

Postby Ficher » Fri Mar 16, 2018 11:20 am

No problem here's the code for the pH :
Capture 1
Capture 2

And the Humidity :
Capture 3
Capture 4

I just need help for the use of the sensors normaly the program works.
Attachments
Capture3.PNG
Capture3.PNG (207.15 KiB) Viewed 1935 times
Capture2.PNG
Capture2.PNG (196.42 KiB) Viewed 1935 times
Capture1.PNG
Capture1.PNG (183.47 KiB) Viewed 1935 times

Ficher
Posts: 5
Joined: Fri Mar 16, 2018 10:16 am
Contact:

Re: I need help for a pH and Humidity project.

Postby Ficher » Fri Mar 16, 2018 11:22 am

Capture 4
Attachments
Capture4.PNG
Capture4.PNG (195.63 KiB) Viewed 1934 times

kersing
Valued Contributor
Valued Contributor
Posts: 1873
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 530 times
Been thanked: 1040 times
Contact:

Re: I need help for a pH and Humidity project.

Postby kersing » Fri Mar 16, 2018 12:10 pm

Please attach a flowcode file, screendumps only show us only part of what we normally check. (For instance clock settings, component connections etc)
These users thanked the author kersing for the post:
medelec35 (Fri Mar 16, 2018 12:48 pm)
Rating: 5.26%
 
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

Ficher
Posts: 5
Joined: Fri Mar 16, 2018 10:16 am
Contact:

Re: I need help for a pH and Humidity project.

Postby Ficher » Mon Mar 19, 2018 1:13 pm

The two flowcodes codes 1 is for pH and 3 for Humidity.
Attachments
Flowcode3.fcf
(15 KiB) Downloaded 48 times
Flowcode1.fcf
(11.5 KiB) Downloaded 39 times

johnsondav
Posts: 186
Joined: Thu Jun 28, 2012 7:29 pm
Location: Durham
Has thanked: 92 times
Been thanked: 181 times
Contact:

Re: I need help for a pH and Humidity project.

Postby johnsondav » Mon Mar 19, 2018 6:33 pm

Hi Ficher

I would suggest you change the 'Clear' LCD with the following to get a smother display:

FC5_SCR1.jpg
FC5_SCR1.jpg (168 KiB) Viewed 1893 times


Not sure if the flikering display is your problem but this would help. Also, your math is a constant ( *100 / 5) = 20

just multuply your voltage by 20 and it should give your the same result - faster, if the 20 is stored as a variable. Microchip compiler always converts any number system to a hex value before it is compiled, this is how they acheive the 20% speed increase.

Hope this helps.

Regards
Dave
These users thanked the author johnsondav for the post:
medelec35 (Mon Mar 19, 2018 7:13 pm)
Rating: 5.26%
 

Ficher
Posts: 5
Joined: Fri Mar 16, 2018 10:16 am
Contact:

Re: I need help for a pH and Humidity project.

Postby Ficher » Tue Mar 20, 2018 4:13 pm

Thanks for your help I go change the program to make it better.