Update pins

This commit is contained in:
2025-07-15 21:24:09 -04:00
parent 373525c608
commit 804d3ad0e8
2 changed files with 4 additions and 4 deletions

View File

@@ -9,10 +9,10 @@
#include "flatbuffers_generated/RobotModule_generated.h" #include "flatbuffers_generated/RobotModule_generated.h"
inline std::unordered_map<int, int> MODULE_TO_NUM_CHANNELS_MAP {{ModuleType_SPLITTER, 2}, {ModuleType_SERVO_1, 2}, {ModuleType_DC_MOTOR, 1}}; inline std::unordered_map<int, int> MODULE_TO_NUM_CHANNELS_MAP {{ModuleType_SPLITTER, 4}, {ModuleType_SERVO_1, 2}, {ModuleType_DC_MOTOR, 1}};
#define PC_ADDR 0 #define PC_ADDR 0
#define SERVO_GPIO 18 #define SERVO_GPIO 1
#endif //MODULE_H #endif //MODULE_H

View File

@@ -91,7 +91,7 @@ class RMTManager{
// rmt_channel_handle_t tx_chan; // rmt_channel_handle_t tx_chan;
const gpio_num_t tx_gpio[MAX_CHANNELS] = {GPIO_NUM_1, GPIO_NUM_2, GPIO_NUM_3, GPIO_NUM_4}; //using pins 1,2,3,4 for channels 0,1,2,3 respectively for tx const gpio_num_t tx_gpio[MAX_CHANNELS] = {GPIO_NUM_3, GPIO_NUM_5, GPIO_NUM_11, GPIO_NUM_13}; //using pins 1,2,3,4 for channels 0,1,2,3 respectively for tx
// gpio_num_t tx_gpio[MAX_CHANNELS] = {GPIO_NUM_1}; //using pins 1,2,3,4 for channels 0,1,2,3 respectively for tx // gpio_num_t tx_gpio[MAX_CHANNELS] = {GPIO_NUM_1}; //using pins 1,2,3,4 for channels 0,1,2,3 respectively for tx
// rmt_encoder_context_t encoder_context = {0}; // rmt_encoder_context_t encoder_context = {0};
@@ -107,7 +107,7 @@ class RMTManager{
//=====================RX===================== //=====================RX=====================
rmt_channel_handle_t rx_chan; rmt_channel_handle_t rx_chan;
const gpio_num_t rx_gpio[MAX_CHANNELS] = {GPIO_NUM_12, GPIO_NUM_13, GPIO_NUM_14, GPIO_NUM_15}; //using pins 12,13,14,15 for channels 0,1,2,3 respectively for rx const gpio_num_t rx_gpio[MAX_CHANNELS] = {GPIO_NUM_4, GPIO_NUM_6, GPIO_NUM_12, GPIO_NUM_14}; //using pins 12,13,14,15 for channels 0,1,2,3 respectively for rx
// gpio_num_t rx_gpio[MAX_CHANNELS] = {GPIO_NUM_12}; //using pins 12,13,14,15 for channels 0,1,2,3 respectively for rx // gpio_num_t rx_gpio[MAX_CHANNELS] = {GPIO_NUM_12}; //using pins 12,13,14,15 for channels 0,1,2,3 respectively for rx
// QueueHandle_t receive_queue = NULL; // QueueHandle_t receive_queue = NULL;