mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-13 22:13:07 +01:00
First branch for OBPP60 V2
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// General hardware definitions
|
||||
// CAN bus pin definitions see GwOBP60Task.h
|
||||
// CAN bus pin definitions see obp60task.h
|
||||
|
||||
// Direction pin for RS485 NMEA0183
|
||||
#define OBP_DIRECTION_PIN 27
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
#pragma once
|
||||
#include "GwApi.h"
|
||||
//we only compile for some boards
|
||||
#ifdef BOARD_NODEMCU32S_OBP60
|
||||
// CAN NMEA2000
|
||||
#define ESP32_CAN_TX_PIN GPIO_NUM_13
|
||||
#define ESP32_CAN_RX_PIN GPIO_NUM_12
|
||||
// Bus load in 50mA steps
|
||||
#define N2K_LOAD_LEVEL 5 // 5x50mA = 250mA max bus load with back light on
|
||||
// RS485 NMEA0183
|
||||
#define GWSERIAL_TX 26
|
||||
#define GWSERIAL_RX 14
|
||||
#define GWSERIAL_MODE "UNI"
|
||||
// Allowed to set a new password for access point
|
||||
#define FORCE_AP_PWCHANGE
|
||||
#ifdef BOARD_OBP60S3
|
||||
#define USBSerial Serial
|
||||
// CAN NMEA2000
|
||||
#define ESP32_CAN_TX_PIN GPIO_NUM_13
|
||||
#define ESP32_CAN_RX_PIN GPIO_NUM_12
|
||||
// Bus load in 50mA steps
|
||||
#define N2K_LOAD_LEVEL 5 // 5x50mA = 250mA max bus load with back light on
|
||||
// RS485 NMEA0183
|
||||
#define GWSERIAL_TX 26
|
||||
#define GWSERIAL_RX 14
|
||||
#define GWSERIAL_MODE "UNI"
|
||||
// Allowed to set a new password for access point
|
||||
#define FORCE_AP_PWCHANGE
|
||||
|
||||
// Init OBP60 Task
|
||||
void OBP60Init(GwApi *param);
|
||||
DECLARE_INITFUNCTION(OBP60Init);
|
||||
|
||||
// OBP60 Task
|
||||
void OBP60Task(GwApi *param);
|
||||
DECLARE_USERTASK_PARAM(OBP60Task, 8000) // Need 8k RAM as stack size
|
||||
DECLARE_CAPABILITY(obp60,true);
|
||||
// Init OBP60 Task
|
||||
void OBP60Init(GwApi *param);
|
||||
DECLARE_INITFUNCTION(OBP60Init);
|
||||
|
||||
// OBP60 Task
|
||||
void OBP60Task(GwApi *param);
|
||||
DECLARE_USERTASK_PARAM(OBP60Task, 8000) // Need 8k RAM as stack size
|
||||
DECLARE_CAPABILITY(obp60,true);
|
||||
#endif
|
||||
@@ -2,21 +2,24 @@
|
||||
#if you want a pio run to only build
|
||||
#your special environments you can set this here
|
||||
#by uncommenting the next line
|
||||
default_envs = nodemcu32s_obp60
|
||||
[env:nodemcu32s_obp60]
|
||||
default_envs = obp60_s3
|
||||
[env:obp60_s3]
|
||||
platform = espressif32@6.3.2
|
||||
board_build.partitions = lib/obp60task/partitions_obp60.csv
|
||||
board = nodemcu-32s
|
||||
board = obp60_s3
|
||||
board_build.variants_dir = variants
|
||||
framework = arduino
|
||||
lib_deps =
|
||||
${env.lib_deps}
|
||||
lib_deps =
|
||||
Wire
|
||||
SPI
|
||||
fastled/FastLED@^3.6.0
|
||||
robtillaart/PCF8574@^0.3.9
|
||||
adafruit/Adafruit Unified Sensor @ 1.1.13
|
||||
blemasle/MCP23017@2.0.0
|
||||
adafruit/Adafruit BusIO@1.5.0
|
||||
adafruit/Adafruit GFX Library@1.11.9
|
||||
zinggjm/GxEPD@3.1.0
|
||||
zinggjm/GxEPD@3.1.3
|
||||
sstaub/Ticker@4.4.0
|
||||
adafruit/Adafruit BMP280 Library@2.6.2
|
||||
adafruit/Adafruit BME280 Library@2.2.2
|
||||
@@ -25,8 +28,9 @@ lib_deps =
|
||||
robtillaart/INA226@0.2.0
|
||||
signetica/SunRise@2.0.2
|
||||
build_flags=
|
||||
-D BOARD_NODEMCU32S_OBP60
|
||||
-DTIME=$UNIX_TIME
|
||||
-D BOARD_OBP60S3
|
||||
${env.build_flags}
|
||||
upload_port = //dev/ttyUSB0
|
||||
upload_port = /dev/ttyACM0
|
||||
upload_protocol = esptool
|
||||
monitor_speed = 115200
|
||||
Reference in New Issue
Block a user