[GH-ISSUE #315] Weird problem I'm having with parameter change #263

Closed
opened 2026-02-28 01:24:24 +03:00 by kerem · 2 comments
Owner

Originally created by @frozenguyRS on GitHub (Feb 12, 2017).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/315

tzapu-
Let me say this code is amazing and has inspired me to do so much. My mom has early onset Alzheimers and I'm trying to use technology to maintain a balance of supervision and her own autonomy.
I am running the FSparameters example, and added an example for HDC1080 called closedcube here on github.

Everything works fine and will trigger an LED at a certain temp or humidity. So instead of this:

if (hdc1080.readHumidity() >= 50 || hdc1080.readTemperature() >= 30){ digitalWrite(LED, HIGH); }

I wrote this:
if (hdc1080.readHumidity() >= mqtt_port[3] || hdc1080.readTemperature() >= 30){ digitalWrite(LED, HIGH); }

And it worked well! I could change the Humidity setting to 65 or 70 or 35 and it worked flawlessly.

But after a bit of fiddling, now no matter it just triggers 48 regardless of what I input for mqtt_port.

I even have a Serial.println(mqtt_port); to see what the parameter is saved as, and it is saved correctly.

Thank you for looking

Originally created by @frozenguyRS on GitHub (Feb 12, 2017). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/315 tzapu- Let me say this code is amazing and has inspired me to do so much. My mom has early onset Alzheimers and I'm trying to use technology to maintain a balance of supervision and her own autonomy. I am running the FSparameters example, and added an example for HDC1080 called closedcube here on github. Everything works fine and will trigger an LED at a certain temp or humidity. So instead of this: `if (hdc1080.readHumidity() >= 50 || hdc1080.readTemperature() >= 30){ digitalWrite(LED, HIGH); }` I wrote this: `if (hdc1080.readHumidity() >= mqtt_port[3] || hdc1080.readTemperature() >= 30){ digitalWrite(LED, HIGH); }` And it worked well! I could change the Humidity setting to 65 or 70 or 35 and it worked flawlessly. But after a bit of fiddling, now no matter it just triggers 48 regardless of what I input for mqtt_port. I even have a Serial.println(mqtt_port); to see what the parameter is saved as, and it is saved correctly. Thank you for looking
kerem closed this issue 2026-02-28 01:24:24 +03:00
Author
Owner

@frozenguyRS commented on GitHub (Feb 14, 2017):

When I serial print the new value of mqtt_port, I get what I input during AP mode. However the code doesn't use that value when triggering my LED from humidity sensor. If I input 51.7, the code saves it correctly, and prints it out. Then triggers my LED at a wrong value.

<!-- gh-comment-id:279839559 --> @frozenguyRS commented on GitHub (Feb 14, 2017): When I serial print the new value of mqtt_port, I get what I input during AP mode. However the code doesn't use that value when triggering my LED from humidity sensor. If I input 51.7, the code saves it correctly, and prints it out. Then triggers my LED at a wrong value.
Author
Owner

@frozenguyRS commented on GitHub (Mar 22, 2017):

I figured out how to do it. I used the 'atof' command to convert the saved parameter to a float.

<!-- gh-comment-id:288571923 --> @frozenguyRS commented on GitHub (Mar 22, 2017): I figured out how to do it. I used the 'atof' command to convert the saved parameter to a float.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#263
No description provided.