티스토리 뷰
ESP32 보드 버전 3.1.1 로 업데이트 되면서 이전에 사용하던 함수가 삭제되었습니다
ledcAttachPin 과 ledcSetup 을 사용하지 못합니다
그래서 ledcAttach 와 ledcChangeFrequency 를 사용하여 코드를 수정했습니다
const int motor_resolution =10;
const int motors[] = {23, 19, 18, 26};
const int melody[] = {300, 400, 500};
void setup() {
ledcAttach(motors[0], 1000, motor_resolution);
ledcAttach(motors[1], 1000, motor_resolution);
ledcAttach(motors[2], 1000, motor_resolution);
ledcAttach(motors[3], 1000, motor_resolution);
for(int m = 0; m < 4; m++)
{
for(int n = 0; n < 3; n++)
{
ledcChangeFrequency(motors[m], melody[n], motor_resolution);
ledcWrite(motors[m], 10);
delay(100);
}
ledcWrite(motors[m], 0);
delay(500);
}
}
void loop() {
}
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- C# textbox 커서 위치
- ESP32
- c#
- 스털링엔진
- 방울토마토
- 베란다 텃밭
- MySQL
- c# SpeechSynthesizer
- 앉은뱅이 방울토마토
- 스털링
- imemode
- 이 행은
- 암호화
- 복호화
- c# 음성
- 베란타
- 코딩
- c# Speech
- NET FRAMEWORK
- 드론
- 시스템트레이딩
- C# 마우스 폼이동
- Xingapi
- 베란다 방울토마토
- 인삼키우기
- C# textbox 커서 시작
- framework
- ArgumentException
- 이베스트
- C# textbox 커서 마지막
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
글 보관함