Skip to content

Commit

Permalink
Add PlatformIO and ARDUINO_TTGO_T_PICO_C3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
vshymanskyy committed May 25, 2024
1 parent 9b4e17e commit 92a00ea
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.pio/
.DS_Store
.vscode/

2 changes: 2 additions & 0 deletions examples/BlynkNCP_LowLevel/ArduinoUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#define SerialNCP BLYNK_NCP_SERIAL
#elif defined(ARDUINO_NANO_RP2040_CONNECT)
#define SerialNCP SerialNina
#elif defined(ARDUINO_TTGO_T_PICO_C3)
#define SerialNCP Serial2
#elif defined(LINUX)
#include <compat/LibSerialPort.h>
#if !defined(BLYNK_NCP_PORT)
Expand Down
6 changes: 5 additions & 1 deletion examples/BlynkNCP_LowLevel/BlynkNCP_LowLevel.ino
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@ void setup()
SerialDbg.begin(115200);
waitSerialConsole(SerialDbg);

// Power-up NCP (if needed)
// Set up NCP (if needed)
#if defined(ARDUINO_NANO_RP2040_CONNECT)
pinMode(NINA_RESETN, OUTPUT);
digitalWrite(NINA_RESETN, HIGH);
#elif defined(ARDUINO_TTGO_T_PICO_C3)
SerialNCP.setFIFOSize(2048);
SerialNCP.setTX(8);
SerialNCP.setRX(9);
#endif

if (!ncpSetupSerial()) {
Expand Down
56 changes: 56 additions & 0 deletions examples/BlynkNCP_LowLevel/platformio.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
; PlatformIO Project Configuration File
; https://docs.platformio.org/page/projectconf.html

[platformio]

src_dir = .

[env]
framework = arduino
monitor_speed = 115200

lib_deps =
BlynkNcpDriver=symlink://../../

build_flags =
-Wswitch -Wuninitialized
-Wunused-function
-Werror=return-type ; Fail on return type error

[rp2040]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board_build.core = earlephilhower
board_build.filesystem_size = 1M

lib_ignore =
WiFi

[rp2040:mbed]
platform = raspberrypi

lib_ignore =
WiFi
ArduinoOTA

########################################################
## Dual-MCU boards
########################################################

[env:rp2040connect]
extends = rp2040
board = arduino_nano_connect
board_build.filesystem_size = 8M

[env:rp2040connect-mbed]
extends = rp2040:mbed
board = nanorp2040connect

[env:t_pico_c3]
extends = rp2040
board = rpipico
board_upload.maximum_size = 4194304
board_build.filesystem_size = 2M

build_flags =
${env.build_flags}
-DARDUINO_TTGO_T_PICO_C3

0 comments on commit 92a00ea

Please sign in to comment.