Blynk-Technologies / Blynk-NCP-Driver

A shared interface to the services provided by Blynk.NCP
Apache License 2.0
10 stars 0 forks source link

Not able to add libraies #6

Closed LYB030 closed 1 year ago

LYB030 commented 1 year ago

after i add a DHT11 sensor libraies in to this project,the problems will show as below:

image

it is look like the platformin.ini is not auto update correctly:

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[platformio]

[env]
framework = arduino
monitor_speed = 115200
extra_scripts = 
    tools/extra_upload_ncp.py
    tools/extra_ota_bin.py
lib_deps = 
    Blynk=https://github.com/blynkkk/blynk-library.git
    BlynkNcpDriver=https://github.com/blynkkk/BlynkNcpDriver.git
    ArduinoOTA=https://github.com/JAndrassy/ArduinoOTA.git
build_src_flags = 
    -Wall -Wextra
build_flags = 
    -Wswitch -Wuninitialized
    -Wunused-function
    -Wfatal-errors
    -Werror=return-type
    -DNO_OTA_NETWORK

[rp2040]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#3.3.0
board_build.core = earlephilhower
board_build.filesystem_size = 1M
lib_ignore = 
    WiFi

[rp2040:mbed]
platform = raspberrypi
lib_ignore = 
    WiFi
    ArduinoOTA

[renesas]
platform = renesas-ra
lib_ignore = 
    WiFiC3
    WiFiS3
    ArduinoOTA

[env:nano33iot]
platform = atmelsam
board = nano_33_iot
custom_ncp.firmware = nina_w102
custom_ncp.upload_speed = 921600
lib_deps = adafruit/DHT sensor library@^1.4.4

[env:mkrwifi1010]
platform = atmelsam
board = mkrwifi1010
custom_ncp.firmware = nina_w102
custom_ncp.upload_speed = 921600
lib_deps = adafruit/DHT sensor library@^1.4.4

[env:rp2040connect]
extends = rp2040
board = arduino_nano_connect
board_build.filesystem_size = 8M
custom_ncp.firmware = nina_w102
custom_ncp.upload_speed = 921600
custom_ncp.before_upload = no_reset
lib_deps = adafruit/DHT sensor library@^1.4.4

[env:rp2040connect-mbed]
extends = rp2040:mbed
board = nanorp2040connect
custom_ncp.firmware = nina_w102
custom_ncp.upload_speed = 921600
custom_ncp.before_upload = no_reset
lib_deps = adafruit/DHT sensor library@^1.4.4

[env:unoR4wifi]
extends = renesas
board = uno_r4_wifi
custom_ncp.flasher = direct
custom_ncp.firmware = uno_r4_wifi
custom_ncp.upload_speed = 2000000
lib_deps = adafruit/DHT sensor library@^1.4.4

[env:portentaC33]
extends = renesas
board = portenta_c33
custom_ncp.firmware = generic_esp32c3_4M
custom_ncp.upload_speed = 460800
custom_ncp.use_stub = no
lib_deps = adafruit/DHT sensor library@^1.4.4

[env:pico_esp8266]
extends = rp2040
board = rpipico
custom_ncp.firmware = generic_esp8266_4M
custom_ncp.upload_speed = 460800
custom_ncp.manual_reset = yes
lib_deps = adafruit/DHT sensor library@^1.4.4

[env:uno]
platform = atmelavr
board = uno
build_src_flags = 
    ${env.build_src_flags}
    -DBLYNK_NCP_SERIAL=Serial1
    -DBLYNK_NCP_BAUD=57600
    -DBLYNK_NCP_RX=10
    -DBLYNK_NCP_TX=9
lib_deps = adafruit/DHT sensor library@^1.4.4

[env:nano]
platform = atmelavr
board = nanoatmega328new
build_src_flags = 
    ${env.build_src_flags}
    -DBLYNK_NCP_SERIAL=Serial1
    -DBLYNK_NCP_BAUD=57600
    -DBLYNK_NCP_RX=10
    -DBLYNK_NCP_TX=9
lib_deps = adafruit/DHT sensor library@^1.4.4

[env:promicro8]
platform = atmelavr
board = sparkfun_promicro8
build_src_flags = 
    ${env.build_src_flags}
    -DBLYNK_NCP_SERIAL=Serial1
    -DBLYNK_NCP_BAUD=57600
lib_deps = adafruit/DHT sensor library@^1.4.4

[env:pico]
extends = rp2040
board = rpipico
custom_ncp.firmware = generic_esp32_4M
custom_ncp.upload_speed = 460800
custom_ncp.manual_reset = yes
build_src_flags = 
    ${env.build_src_flags}
    -DBLYNK_NCP_BAUD=115200
lib_deps = adafruit/DHT sensor library@^1.4.4

[env:pico-mbed]
extends = rp2040:mbed
board = pico
custom_ncp.firmware = generic_esp32_4M
custom_ncp.upload_speed = 460800
custom_ncp.manual_reset = yes
build_src_flags = 
    ${env.build_src_flags}
    -DBLYNK_NCP_SERIAL=Serial1
    -DBLYNK_NCP_BAUD=115200
lib_deps = adafruit/DHT sensor library@^1.4.4

[env:linux]
platform = native
custom_ncp.flasher = direct
custom_ncp.firmware = generic_esp32_4M
custom_ncp.upload_speed = 460800
framework = 
lib_deps = 
    ${env.lib_deps}
    EpoxyDuino=https://github.com/bxparks/EpoxyDuino.git
    adafruit/DHT sensor library@^1.4.4
lib_ignore = 
    ArduinoOTA
build_src_flags = 
    ${env.build_src_flags}
    -DBLYNK_NCP_BAUD=921600
build_flags = 
    ${env.build_flags}
    -DARDUINO=100 -DLINUX
    -lserialport
vshymanskyy commented 1 year ago

Add your libs to the [env] section. by specifying libs for each board, you override the env setting, so you effectively remove the required Blynk libraries.

Not related to this example, so closing it

LYB030 commented 1 year ago

hi i find another problem ,i am not able to use WidgetTerminal.h due below error:

image
vshymanskyy commented 1 year ago

@LYB030 nice catch! I fixed the issue, but you need to get the latest Blynk Library. Try this:

pio pkg update --no-save -e unoR4wifi -l Blynk
LYB030 commented 1 year ago

after update,my phone could not find device, i think the device wifi is not activate.

LYB030 commented 1 year ago

and if i run pio run -e unoR4wifi -t upload_ncp again,the previous error return : image

vshymanskyy commented 1 year ago

@LYB030 did you figure it out?

I can only suggest restarting from scratch:

LYB030 commented 1 year ago

@LYB030 did you figure it out?

I can only suggest restarting from scratch:

  • download the clean, latest version of the BlynkNcpExample
  • remove the PIO cache: %HOME%/.platformio/.cache
  • try following the example instructions again
  • add your libraries

after i reinstall core of platformIO,the problem solved!