전체 글 185

ESP32, NVS, nvs_rw_blob

ESP32, NVS, nvs_rw_blob 보드의 Boot (GPIO_0) 버튼을 1초 이상 누르면 리셋이 되며이 때 보드 동작 시간을 uint32_t blob 형태로 연속 저장합니다."Boot 1 time", "Boot 2 time", ... esp-idf\components\nvs_flash\include\nvs_flash.h esp-idf\components\nvs_flash\include\nvs.h esp-idf\components\driver\include\driver\gpio.h 0. 참고 사이트esp-idf\examples\storage\nvs_rw_blobhttps://github.com/espressif/esp-idf/tree/020ade652d9b6b0b87b0bebe176a150cc4..

ESP32 2018.08.23

ESP32, NVS 이해하기

ESP32, NVS 이해하기 결론적으로 얘기하면 50% 정도만 이해하였다고 판단합니다. 0. 참고 사이트http://www.lucadentella.it/en/2017/06/03/esp32-19-nvs/https://github.com/lucadentella/esp32-tutorial/blob/master/13_nvs/ https://esp-idf.readthedocs.io/en/latest/api-guides/partition-tables.html#https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/storage/nvs_flash.html#https://github.com/espressif/esp-idf/tree/020ade652d9b..

ESP32 2018.08.22

ESP32, TIMER, esp_timer

ESP32, TIMER, esp_timer us 단위로 timer를 설정합니다.esp_timer_get_time() 함수를 부팅 이후 동작 시간을 확인할 수 있습니다.esp_sleep_enable_timer_wakeup(), esp_light_sleep_start() 함수를 통해 조금 더 정확하게 delay를 줄 수 있습니다. 0. 참고 사이트esp-idf\examples\system\esp_timerhttps://github.com/espressif/esp-idf/tree/master/examples/system/esp_timerhttps://esp-idf.readthedocs.io/en/latest/api-reference/peripherals/timer.html 1. 모듈 2. 보드 연결 3. 소스..

ESP32 2018.08.22

ESP32, GPIO, gpio_intr

ESP32, GPIO, gpio_intr ESP32 보드에서 BOOT 라벨의 버튼이 GPIO_0 이므로 이를 사용하였고LED는 GPIO_5 에 연결하여 테스트를 진행하였습니다. 소스에서 사용하는 gpio 관련 설정은 아래 Header 파일을 참고하면 됩니다. esp-idf\components\driver\include\driver\gpio.h esp-idf\components\esp32\include\esp_intr_alloc.h 0. 참고 사이트esp-idf\examples\peripherals\gpiohttps://github.com/espressif/esp-idf/tree/master/examples/peripherals/gpio https://esp-idf.readthedocs.io/en/late..

ESP32 2018.08.22

ESP32, Bluetooth, ble_spp_server, ble_spp_client

ESP32, Bluetooth, ble_spp_server, ble_spp_client spp를 간단하게 표현하면 채팅 같은 것이라 생각하면 됨 server heartbeat 전송 -> client 수신 정상client heartbeat 전송 오류, 이유 모름 server terminal 입력, 전송 -> client 수신 정상client terminal 입력, 전송 -> server 수신 정상 0. 참고 사이트esp-idf\examples\bluetooth\ble_spp_serveresp-idf\examples\bluetooth\ble_spp_clienthttps://esp-idf.readthedocs.io/en/latest/api-reference/bluetooth/index.html https://..

ESP32 2018.08.21

ESP32, Wi-Fi, smart_config

ESP32, Wi-Fi, smart_config Google Play를 통해 Esp8266_SmartConfig 앱을 다운로드받을 수 있습니다. EPS32 부팅 후 패킷 스니핑 상태를 유지합니다. 안드로이드 Esp8266_SmartConfig 앱에서 wifi ssid, passwd를 입력하면ESP32 보드에서 이 패킷을 스니핑하여 외부 AP와 연결합니다. 즉, APP에서 ssid, passwd를 wifi 형태로 브로드캐스팅하면 ESP32가 패킷 스니핑으로 정보를 취한 다음 외부 wifi와 연결하는 방식입니다. 0. 참고 사이트esp-idf/examples/wifi/smart_config/https://esp-idf.readthedocs.io/en/latest/api-reference/wifi/esp_sm..

ESP32 2018.08.21

ESP32, Bluetooth, Wi-Fi, blufi

ESP32, Bluetooth, Wi-Fi, blufi 안드로이드 기기가 꼭 필요함테스트 앱이 안드로이드용만 있음 EPS32 부팅 후 ibeacon(?) 같은 신호를 브로드캐스팅하면 안드로이드 EspBlufi 앱에서 이를 수신하면 EPS32 리스트가 보여집니다. 그 중에서 해당 보드를 선택한 다음 wifi ssid, passwd를 입력합니다. 앱의 Bluetooth를 통해 wifi ssid, passwd를 해당 보드로 넘겨주게 되면 해당 보드는 이 정보를 통해 wifi 설정을 하고 BT를 종료하는 것으로 확인됩니다. esp/esp-idf/components/bt/bluedroid/api/include/api/esp_gap_ble_api.h 0. 참고 사이트esp-idf/examples/bluetooth/..

ESP32 2018.08.21

ESP32, Wi-Fi, http2_request

ESP32, Wi-Fi, http2_request https://http2.golang.org 홈페이지에 접속하여현재 시간을 가져오는 example입니다. 0. 참고 사이트esp\esp-idf\examples\protocols\http2_requesthttps://github.com/espressif/esp-idf/tree/master/examples/protocols/http2_request 1. 모듈 2. 보드 연결 3. 소스 설명make menuconfig를 통해 ssid, password를 지정해야 합니다. 4. 소스https://github.com/sglee0223/esp32/tree/master/http2_request 5. 결과 확인현재 시간은 UTC 기준으로 출력됩니다. I (424) he..

ESP32 2018.08.21