• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

buttons and sliders websocket server

Q&A Forum › Category: ESP32 › buttons and sliders websocket server
0 Vote Up Vote Down
David Barker asked 4 months ago

I have buttons and a slider in a websocket server programme and a  two void notifyCients wich conflict

void notifyClients(String sliderValues) {
  ws.textAll(sliderValues);  
}
and]

void notifyClients2(String state) {
  ws.textAll(state);
}

can join both in one void statement 
regards Dave

7 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 3 months ago

Hi.
What do you mean by conflict?
You need to be more specific. Can you provide more details?
Regards,
Sara

0 Vote Up Vote Down
David Barker answered 3 months ago

Hi Sara
please find link to code
https://docs.google.com/document/d/1IOpTmpmXArOr5HuGfhx1p_AWgGZwqnGdcFGDXiOAoX8/edit?usp=sharing
hope this works
regards

0 Vote Up Vote Down
Sara Santos Staff answered 3 months ago

Hi again.
I’m currently away from home and I can’t test your code.
Please share the exact issues that you get and errors so that it’s easier to understand why it doesn’t work.
Regards,
Sara

0 Vote Up Vote Down
David Barker answered 3 months ago

HI
The error I am getting is
src\main.cpp:81:6: note: ‘void notifyClients(String)’ previously defined here
void notifyClients(String sliderValues) {
I think the problem is that I have two ‘void notifyClient’ values
void notifyClients(String sliderValues) {
  ws.textAll(sliderValues);  
}
and]
void notifyClients2(String state) {
  ws.textAll(state);
}
thanks for your help
regards  Dave
 
 

0 Vote Up Vote Down
Sara Santos Staff answered 3 months ago

You can’t have multiple functions with the same name.
Each function needs to have a unique name.
Regards,
Sara

0 Vote Up Vote Down
David Barker answered 3 months ago

thanks Sara

0 Vote Up Vote Down
Sara Santos Staff answered 3 months ago

Let me know if you need further help to continue with your project.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] SMART HOME with RPi, ESP32, and ESP8266 (version 1.2) March 8, 2023
  • [eBook Updated] ESP32-CAM Projects (version 1.3) January 7, 2023

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2023 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.