• 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 2 years 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 2 years 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 2 years 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 2 years 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 2 years 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 2 years 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 2 years ago

thanks Sara

0 Vote Up Vote Down
Sara Santos Staff answered 2 years 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

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

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

Copyright © 2013-2025 · 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.