PaulS:
Or, some of it, horribly indented and posted incorrectly.
You start with some requirements. What is the program to do?
read data from multi sensors and send it to lcd 16X2, and smart phone via bt, and control via relay. and (i hope) addto this - fan speed control via bt (slider)
all this work fine - but because the both are a char - i dno't know how to combine it in 1 code.
if i need to change all this part of the code - go for it
if i need to change all this part of the code - go for it
You have program one. You posted some snippet, incorrectly, that may, or may not, have been part of program one.
You have program two. You posted some snippet, incorrectly, that may, or may not, have been part of program two.
You want to know how to combine them into one program. So, I suggest that you take the odd numbered lines from program one, and paste them in program three. Then, take the even number lines from program two, and add them to the end of program three, in reverse order. Throw away the rest of program one, and paste the rest of program two onto the end of program three.
If that doesn't result in a program that does what you want, you might try posting ALL of program one and ALL of program two, after using Tools + Auto Format on both of them, AND reading the stickies at the top of the forum that describe how to post code PROPERLY.
PaulS:
You have program one. You posted some snippet, incorrectly, that may, or may not, have been part of program one.
You have program two. You posted some snippet, incorrectly, that may, or may not, have been part of program two.
You want to know how to combine them into one program. So, I suggest that you take the odd numbered lines from program one, and paste them in program three. Then, take the even number lines from program two, and add them to the end of program three, in reverse order. Throw away the rest of program one, and paste the rest of program two onto the end of program three.
If that doesn't result in a program that does what you want, you might try posting ALL of program one and ALL of program two, after using Tools + Auto Format on both of them, AND reading the stickies at the top of the forum that describe how to post code PROPERLY.
Thank you again - for your comment
the project work fine - until i add the "fan speed lines into my full code.
because are both char (char = c), also if i change one to byte.
the data that sending from dht11 to my app (via bt) - working fine .
but if i trying to control the fan speed from my app (via bt) - nonworking - only if i delete the dht11 data sending lines.
you now what - if you have (or you know how) a simple code to let me control the speed of the fan via (button in my app. - you help my a lot
the project work fine - until i add the "fan speed lines into my full code.
If you share the code, explain what it actually does (if it even compiles) and what you expect it to do, maybe we could offer more than insincere sympathy.
PaulS:
If you share the code, explain what it actually does (if it even compiles) and what you expect it to do, maybe we could offer more than insincere sympathy.
The code work fine (i uplouded it to my nano) is sent a data to my app via bt - i got the data by pressed on a button into my app.
the lines of the data and the fan are both char = c (as a separate code).
if i add the "fan speed lines" into the code with the data store - is upload the code but dont let my control the speed. if i delete the data "char = c" lines, the code worked with "fan speed ".
I need to know how continue the char = c code, that combine or included the data from dht11 and let my control the fan speed, or if you can save your time and help my - i need small code that let my to control fan speed by "pressed a button" into my app (via bt).
p.s if i use not char = c , to control the fan speed, is worked - but no so well (i dont know how to add a button to my code).
for now is a slider but a button is better option.
PaulS:
The code you did not share works. Well, then, there is no reason to share it, and we can consider the problem solved. Glad to be able to help.
[/quote