• 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

ESP32 Course Module 5 Unit 2

Q&A Forum › Category: ESP32 › ESP32 Course Module 5 Unit 2
0 Vote Up Vote Down
Charles Phillips asked 5 years ago

In the notify sketch this line of code in the loop() gives me an error.

pCharacteristic->setValue(&value, 1);

no instance of overloaded function matches the argument list. The second argument the value 1 is flagged. Also get candidate expects 1 argument, 2 provided.  Wondering what the problem might be?

Also there is a difference in the libraries used in the code and those shown in the book.

I’m using VSC with PlatformIO.

1 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi Charles.

That error means that the function setValue() only accepts one argument, but there are two arguments.
However, I’ve just tried the example in VS Code and it is working fine for me.

Did you add

#include <Arduino.h>

At the beginning of your sketch?

What is the version of the code that you are following? Always follow the code in the link. The link provides the most updated code. The eBook will be updated in the next release.

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] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition 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.