mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 10:42:49 +00:00
add beginnings of mesh radio
This commit is contained in:
@@ -25,34 +25,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <lmic.h>
|
||||
void ttn_register(void (*callback)(uint8_t message));
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Version
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#define APP_NAME "TTN MAP-TRACK"
|
||||
#define APP_VERSION "1.1.0"
|
||||
#define APP_NAME "meshtastic-esp32"
|
||||
#define APP_VERSION "0.0.1"
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Configuration
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// Select which T-Beam board is being used. Only uncomment one.
|
||||
// #define T_BEAM_V07 // AKA Rev0 (first board released)
|
||||
#define T_BEAM_V10 // AKA Rev1 (second board released)
|
||||
|
||||
// Select the payload format. Change on TTN as well. Only uncomment one.
|
||||
#define PAYLOAD_USE_FULL
|
||||
// #define PAYLOAD_USE_CAYENNE
|
||||
|
||||
// If using a single-channel gateway, uncomment this next option and set to your gateway's channel
|
||||
//#define SINGLE_CHANNEL_GATEWAY 0
|
||||
|
||||
// If you are having difficulty sending messages to TTN after the first successful send,
|
||||
// uncomment the next option and experiment with values (~ 1 - 5)
|
||||
//#define CLOCK_ERROR 5
|
||||
|
||||
#define DEBUG_PORT Serial // Serial debug port
|
||||
#define SERIAL_BAUD 115200 // Serial debug baud rate
|
||||
@@ -60,10 +46,6 @@ void ttn_register(void (*callback)(uint8_t message));
|
||||
#define SEND_INTERVAL (5 * 60 * 1000) // Sleep for these many millis
|
||||
#define MESSAGE_TO_SLEEP_DELAY 5000 // Time after message before going to sleep
|
||||
#define LOGO_DELAY 5000 // Time to show logo on first boot
|
||||
#define LORAWAN_PORT 10 // Port the messages will be sent to
|
||||
#define LORAWAN_CONFIRMED_EVERY 0 // Send confirmed message every these many messages (0 means never)
|
||||
#define LORAWAN_SF DR_SF10 // Spreading factor (recommended DR_SF7 for ttn network map purposes, DR_SF10 works for slow moving trackers)
|
||||
#define LORAWAN_ADR 0 // Enable ADR
|
||||
#define REQUIRE_RADIO true // If true, we will fail to start if the radio is not found
|
||||
|
||||
// If not defined, we will wait for lock forever
|
||||
@@ -95,10 +77,7 @@ void ttn_register(void (*callback)(uint8_t message));
|
||||
#define I2C_SDA 21
|
||||
#define I2C_SCL 22
|
||||
|
||||
#if defined(T_BEAM_V07)
|
||||
#define LED_PIN 14
|
||||
#define BUTTON_PIN 39
|
||||
#elif defined(T_BEAM_V10)
|
||||
#if defined(T_BEAM_V10)
|
||||
#define BUTTON_PIN 38
|
||||
#endif
|
||||
|
||||
@@ -116,10 +95,7 @@ void ttn_register(void (*callback)(uint8_t message));
|
||||
#define GPS_BAUDRATE 9600
|
||||
#define USE_GPS 1
|
||||
|
||||
#if defined(T_BEAM_V07)
|
||||
#define GPS_RX_PIN 12
|
||||
#define GPS_TX_PIN 15
|
||||
#elif defined(T_BEAM_V10)
|
||||
#if defined(T_BEAM_V10)
|
||||
#define GPS_RX_PIN 34
|
||||
#define GPS_TX_PIN 12
|
||||
#endif
|
||||
@@ -134,8 +110,6 @@ void ttn_register(void (*callback)(uint8_t message));
|
||||
#define NSS_GPIO 18
|
||||
#if defined(T_BEAM_V10)
|
||||
#define RESET_GPIO 14
|
||||
#else
|
||||
#define RESET_GPIO 23
|
||||
#endif
|
||||
#define DIO0_GPIO 26
|
||||
#define DIO1_GPIO 33 // Note: not really used on this board
|
||||
|
||||
Reference in New Issue
Block a user