I am only including it outside of the switch at this point. I am not sure i am handling the "selection" correctly for my switch.
again, Thank you
MBlinds_Project.ino (14.2 KB)
I am only including it outside of the switch at this point. I am not sure i am handling the "selection" correctly for my switch.
again, Thank you
MBlinds_Project.ino (14.2 KB)
It seems to me you are not thinking logically about the problem.
For example you still have lines 171 to 175 (and other similar ones for all I know).
And you have lines 210 to 212 commented out.
...R
When lines 210 to 212 are not commented out i get this in the serial monitor. I have been unsure what part of that helps me other than showing that the Arduino sees the different buttons being pressed.
Note: "D" in the second line is the only character that changes depending on the associated button pressed.
new client
User Input Detected!ET /D HTTP/1.1
User Input Detected!ost: 192.168.1.110
User Input Detected!ccept-Encoding: gzip, deflate
User Input Detected!onnection: keep-alive
User Input Detected!pgrade-Insecure-Requests: 1
User Input Detected!ccept: text/html,application/xh
User Input Detected!ser-Agent: Mozilla/5.0 (Macinto
User Input Detected!eferer: http://192.168.1.110/Y
User Input Detected!NT: 1
User Input Detected!ccept-Language: en-us
User Input Detected!
Thank you again
AROTTER2:
When lines 210 to 212 are not commented out i get this in the serial monitor.
Don't you realize that it is line 212 that causes the stuff to be sent to the Serial Monitor? You can comment that line out if you don't want to see the data. HOWEVER ... you will need to put the line newclientData = false; somewhere else (after you have done whatever you need to do with the received data) so that your program will receive the next message. For the moment it may be simpler to leave line 212 working and focus of getting the other stuff to work with recvclientWithEndMarker().
...R
I am unsure what the "stuff" technically is that is put to the serial monitor by "showNewclientData();" so I have been experimenting with its use, but like you suggested i will leave it and ignore until later.
I appreciate all the help.
AROTTER2:
I am unsure what the "stuff" technically is that is put to the serial monitor by "showNewclientData();"
In simple terms, it is the data that is being read by client.read()
...R
ok, i will keep it that simple for now. ![]()
i wil sit back down with this after dinner.
Thank you again!!!
Line 203 //---- Web Mode Selection Loop
recvclientWithEndMarker();
parseclientData();
showNewclientData();
if (newclientData == true) {
Serial.print("Just received:");
Serial.println(receivedclientChars);
int selection;
switch (selection)
{
//=== MANUAL MODE ==================
case 'Y':
Serial.println("Manual Mode");
if (receivedclientChars == 'A')
{
Serial.println("test A");
}
else if (receivedclientChars == 'B')
{
Serial.println("test B");
}
break;
I have tried several things here and none worked so i am back at this point trying to get a response from if (newclientData == true)
Thank you again and again.
Blinds_Project.ino (13.9 KB)
You are still not looking at your whole program logically.
Why have you got lines 205 and 206 and the exact same thing on lines 257 and 259.
Nothing is going to work until you get that sort of thing tidied up.
And I think you really need to delete 205 and 206 (rather then the other ones) and put the code recvclientWithEndMarker(); immediately after line 257. That function needs to be called in every iteration of loop()
...R
Thank you for clarifying that those two lines only need to be written once and that recvclientWithEndMarker(); needs to be called with each loop iteration.
With that said, there is currently still a client.read(); in the "Web Page Loop". Would it be appropriate to treat it just as i did in the "Web Mode Selection Loop" and add a recvclientWithEndMarker(); as well as replacing the
char c = client.read(); with char c = receivedclientChars; ?
Thank you again for all the help and patients.
AROTTER2:
With that said, there is currently still a client.read(); in the "Web Page Loop".
I think I said more than once that the only place where there should be a client.read() is in recvclientWithEndMarker().
And you only need to call recvclientWithEndMarker() once from loop() - not from inside any IF or WHILE statement. In fact you should not have any WHILE loop that takes more than a number fo microseconds to complete.
...R
PS. "patients" go to hospital. "patience" is what you expect me to have. ![]()
Dang.. I noticed that after i sent it... :-\ I cant find an emoji that would represent the frustration with myself.. lol.
Thanks again.