ESP32-DevKitC-32D(ESP-WROOM-32D 개발 보드)를 Grove 센서에 직접 연결
소재
이번에 사용한 것입니다.
샘플 프로그램
Arduino IDE의 스케치 예제에서 "Blink"를 기반으로 만들었습니다.
LED는 4번에 연결하기로 했습니다.
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(4, OUTPUT);
}
void loop() {
digitalWrite(4, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a 500ms
digitalWrite(4, LOW); // turn the LED off by making the voltage LOW
delay(500); // wait for a 500ms
}
연결
따로 ESP32-DevKitC-32D와 Grove 센서를 직결해도 됩니다만, 다른 핀트의 접촉이나 쓰기 문제(※후술)에서 Boot/EN 버튼을 눌러야 하기 때문에 안정시키기 위해 브레드보드를 사용했습니다.
다만, 브레드보드가 작으면 케이블이 찔리지 않기 때문에, 이번은 절반만 찔렀습니다(쓴웃음)

그 때문에, 찌르지 않은 측에서 사용하는 핀(이번은 5V)에는, 앞이 이하와 같이 되어 있는 케이블을 직결했습니다.

ESP32-DevKitC-32D 측의 사용 핀
ESP32-DevKitC-32D 측에서 사용하는 핀은 다음과 같습니다.

※참고: htps : // ht-에서. 코 m/아 r즈이노/에스-w 로오 m-32. HTML
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(4, OUTPUT);
}
void loop() {
digitalWrite(4, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a 500ms
digitalWrite(4, LOW); // turn the LED off by making the voltage LOW
delay(500); // wait for a 500ms
}
따로 ESP32-DevKitC-32D와 Grove 센서를 직결해도 됩니다만, 다른 핀트의 접촉이나 쓰기 문제(※후술)에서 Boot/EN 버튼을 눌러야 하기 때문에 안정시키기 위해 브레드보드를 사용했습니다.
다만, 브레드보드가 작으면 케이블이 찔리지 않기 때문에, 이번은 절반만 찔렀습니다(쓴웃음)

그 때문에, 찌르지 않은 측에서 사용하는 핀(이번은 5V)에는, 앞이 이하와 같이 되어 있는 케이블을 직결했습니다.

ESP32-DevKitC-32D 측의 사용 핀
ESP32-DevKitC-32D 측에서 사용하는 핀은 다음과 같습니다.

※참고: htps : // ht-에서. 코 m/아 r즈이노/에스-w 로오 m-32. HTML
※이번 사용하는 전압은 5V가 됩니다

※참고: h tp // 우우키. 그래, ds. 코 m / G
Grove측
Grove LED 측이 사용하는 핀은 다음과 같습니다.

연결
각각 해당 핀을 케이블로 연결합니다.


실행
연결되면 샘플 프로그램을 컴파일하고 쓰고 실행합니다.

무사히, 0.5초마다 점멸할 수 있었습니다.
요약
ESP32-DevKitC-32D와 Grove 센서는 간단하게 연결할 수 있습니다만, 복수의 센서를 연결할 때의 일 등을 생각하면, 역시 큰 브레드 보드가 있는 편이 좋습니다.
【덤】쓰기 문제
컴파일하고 쓰려고하면. . . 오류가 발생합니다.

esptool.py v2.6
Serial port COM4
Connecting........_____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
조사해 보았는데, 해결 방법은 지금까지 이하 밖에 없는 모양.
ESP32-DevKitC-32D와 Grove 센서는 간단하게 연결할 수 있습니다만, 복수의 센서를 연결할 때의 일 등을 생각하면, 역시 큰 브레드 보드가 있는 편이 좋습니다.
【덤】쓰기 문제
컴파일하고 쓰려고하면. . . 오류가 발생합니다.

esptool.py v2.6
Serial port COM4
Connecting........_____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
조사해 보았는데, 해결 방법은 지금까지 이하 밖에 없는 모양.
esptool.py v2.6
Serial port COM4
Connecting........_____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
Reference
이 문제에 관하여(ESP32-DevKitC-32D(ESP-WROOM-32D 개발 보드)를 Grove 센서에 직접 연결), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/mine820/items/b6ba2187595e6df0affa텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)