Skip to content

Tone.cpp - not working #6877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
stbaumg opened this issue Jun 16, 2022 · 1 comment · Fixed by #6898
Closed
1 task done

Tone.cpp - not working #6877

stbaumg opened this issue Jun 16, 2022 · 1 comment · Fixed by #6898
Assignees
Labels
Area: Peripherals API Relates to peripheral's APIs. Status: Awaiting triage Issue is waiting for triage

Comments

@stbaumg
Copy link

stbaumg commented Jun 16, 2022

Board

lolin 32 lite

Device Description

devkit

Hardware Configuration

Buzzer on PIN 25

Version

v2.0.3

IDE Name

Arduino

Operating System

ubuntu

Flash frequency

40MHz

PSRAM enabled

no

Upload speed

921600

Description

Line 37 and 38 needed to change place for my board to work

not working

        ledcWriteTone(_channel, tone_msg.frequency);
        ledcAttachPin(tone_msg.pin, _channel);

working:

        ledcAttachPin(tone_msg.pin, _channel);
        ledcWriteTone(_channel, tone_msg.frequency);

Sketch

#define BUZZERPIN 25

void setup() {

}

void loop() {
  tone(BUZZERPIN, 440,200);
  // wait _at least_ 200ms (tone duration) before playing next tone
  delay(1000); 
}

Debug Message

none

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@stbaumg stbaumg added the Status: Awaiting triage Issue is waiting for triage label Jun 16, 2022
@VojtechBartoska VojtechBartoska added the Area: Peripherals API Relates to peripheral's APIs. label Jun 17, 2022
@VojtechBartoska
Copy link
Contributor

Hello @stbaumg,

thanks for your contribution.

@P-R-O-C-H-Y When you will have some time, can you please help with triaging this issue? Thanks

@PilnyTomas PilnyTomas self-assigned this Jun 21, 2022
This was referenced Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Peripherals API Relates to peripheral's APIs. Status: Awaiting triage Issue is waiting for triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants