Skip to content

Latest commit

 

History

History
83 lines (56 loc) · 3.57 KB

BuildYourOwn.md

File metadata and controls

83 lines (56 loc) · 3.57 KB

Building a new device using Blynk.NCP

Blynk.NCP connection

Components Used in This Project

You will need:

  • Raspberry Pi Pico
  • One of the supported connectivity modules
  • An adapter/breakout board for your connectivity module (in some cases)
  • Breadboard and some jumper wires

1. Flash Blynk.NCP firmware to your connectivity module

Please follow the official firmware flashing guide. This is usually provided by the module vendor.
Blynk.NCP is shipped as a combined firmware, so you only need to flash a single file (flash at address 0).
Select the firmware file, corresponding to your module type.

To verify that Blynk.NCP is flashed correctly and running, check the UART0 output (38400 or 115200, 8N1) of the module, right after the power-up:

<...bootloader output...>
[rpc port] Blynk.NCP started
Version: 0.x.x, Build: Jul  6 2023 16:56:18

After printing this bootlog identification, the device waits for the BlynkNcpDriver connection on the same port.

2. Assemble the board

Connect Blynk.NCP to the Primary MCU of your choice (i.e. STM32, ATmega, RP2040, ATSAMD, K210, ...) using UART.
Here are some examples:

Arduino Nano + ESP01 RPi Pico + XBee modules (Macchina SuperB, DFRobot WiFi Bee) Pro Micro + WT32 ETH01 Pro Micro + Witty Cloud
1 1 1 1

3. Use the Blynk library to communicate with the NCP

The official Blynk library provides everything needed to work with Blynk.NCP.

  1. Use this example

  2. Open src/main.cpp and fill in information from your Blynk Template:

    #define BLYNK_TEMPLATE_ID           "TMPxxxxxx"
    #define BLYNK_TEMPLATE_NAME         "MyDevice"
  3. Run the example on your Primary MCU:

    pio run -e pico -t upload -t monitor

    The expected debug output looks like this:

    [1345] NCP responding (baud 115200, 2289 us)
    [1349] Blynk.NCP firmware: x.x.x
    [1684] State: Configuration
    

Note: Blynk C++ library uses BlynkNcpDriver internally to talk to the NCP. You can use this low-level, C99 compatible library with minimal dependencies directly if you prefer. See BlynkNcpDriver example.

4. Use the Blynk iOS/Android app to configure your new device

Ensure that the Blynk App is installed on your smartphone.
Open the Blynk App -> click Add New Device -> select Find Devices Nearby

5. Next steps

When using BlynkNcpDriver directly or integrating Blynk.NCP with non-Arduino boards, additional development may be needed to support features like the primary MCU OTA upgrades, Real-Time Clock integration, etc.

Please check out the BlynkNcpDriver docs for further details.

Disclaimer

The community edition of Blynk.NCP is available for personal use and evaluation.
If you're interested in using Blynk.NCP for commercial applications, feel free to contact Blynk. Thank you!