안녕하세요.
기계과 감성쟁이입니다.
오늘 사실 ESP8266 을 이용해서
인터넷 시간을 받아오거나, 센서를 제어해보려고 했는데
에러 때문에 시간이 오래걸려서...일단 써볼게요?
1. ESP8266 사용하기
ESP 8266은 저렴한 가격의 와이파이 마이크로칩입니다.
ESP8266 - Wikipedia
ESP8266ESP-01 module by Ai-Thinker with ESP8266EX SoCManufacturerEspressif SystemsType32-bit microcontrollerCPUTensilica Diamond Standard 106Micro (aka. L106) @ 80 MHz (default) or 160 MHzMemory32 KiB instruction, 80 KiB user dataInput17 GPIO pinsPower3.3
en.wikipedia.org
자세한 사항은 위 사이트를 참고해주세요.
아두이노 우노 Esp8266 : 송파 메이커스페이스
[송파 메이커스페이스] 아두이노,라즈베리파이를 이용한 코딩 교육 재료, 교재 및 교구 개발, 컨텐츠 및 교육 지원
smartstore.naver.com
제가 쓰는 보드에는 ESP8266 이 자체 결합되어 있어서,
이걸 이용했습니다.
환경설정에서 빨간색 상자 부분에
https://arduino.esp8266.com/stable/package_esp8266com_index.json
넣어주세요.
툴 - 보드 - 보드매니저에서 esp8266 다운받아주신 뒤,
포트랑 보드 설정해주시면 됩니다.
그 다음, 예제 - esp 8266 - blink 로 시험해보세요!
/*
ESP8266 Blink by Simon Peter
Blink the blue LED on the ESP-01 module
This example code is in the public domain
The blue LED on the ESP-01 module is connected to GPIO1
(which is also the TXD pin; so we cannot use Serial.print() at the same time)
Note that this sketch uses LED_BUILTIN to find the pin with the internal LED
*/
void setup() {
pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, LOW); // Turn the LED on (Note that LOW is the voltage level
// but actually the LED is on; this is because
// it is acive low on the ESP-01)
delay(1000); // Wait for a second
digitalWrite(LED_BUILTIN, HIGH); // Turn the LED off by making the voltage HIGH
delay(2000); // Wait for two seconds (to demonstrate the active low LED)
}
못찾으시는 분들을 위해 올림
2. 어 안되네?
1. 왜 안돼?
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
라는 에러가 떴습니다...
https://forum.arduino.cc/t/esp-8266-timed-out-waiting-for-packet-header/597634/7
케이블 커넥션 상태를 확인하라는 글들 가운데에서 뿜어져나오는 광채
저 보드의 메뉴얼 (구매링크 가면 있어요)에서 쓰는 대로 2.1.0 버전 쓰니 해결!
2. 또 왜 안돼?
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed
라는 에러가 등장...
http://makeshare.org/bbs/board.php?bo_table=question&wr_id=3520
아두이노 와이파이쉴드 esp8266 질문드려요
이렇게 생긴 와이파이 쉴드를 아두이노 우노와 연결하려고 하는데요 구부러진 점퍼코드로 rx -0 tx -1(둘다 디지털) 에 연결 후 와이파이 쉴드의 01번을 접어서 연결 했습니다. 여기서 보고 따
makeshare.org
위 게시글 댓글처럼 모드 확인을 해보았으나 문제 없음
리셋을 해보았으나 동일한 에러 발생
케이블을 뽑았다 끼우니 됨...
근데 코드를 한번 업로드 할 때 마다 (수정할 때 마다)
선을 뽑았다 끼워줘야함...
ESP 8266 timed out waiting for packet header
I had the same issue today. I wanted to update a code I wrote for a generic ESP 8266 last year. I do not have a programmer so I work though Arduino Uno board. Last year this procedure worked seamlessly, today I struggled to make it work. I use the esp8266
forum.arduino.cc
3. 아웃풋과 인풋이 반대로 먹힘
digitalWrite HIGH & LOW inverted · Issue #16 · nodemcu/nodemcu-devkit-v1.0
Hello! Let me get this straight. I bought the following board: http://www.aliexpress.com/item/Free-shipping-NodeMCU-development-board-for-ESP-12E-from-ESP8266-esp-12E-Lua-IoT-programable-wifi/32583...
github.com
즉, BuildinLED 가 1일 때 꺼지고
0일 때 켜짐;;
근데 어떤 보드들은 LED 를 VCC에 연결시켜 놓아서,
디지털 핀에 0 이 입력되어야 불이 켜진다고 한다.
이 외에도 여러 답변이 있는데,
무엇이 원인인지는 정확히 모르겠다만
크게 신경쓸 문제는 아니라고 판단.
해서... 성공했습니다.
이제 와이파이 연결해보러 가야겠네유
내일 수강신청인데,,,
살려주세요,,,