Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARDUINO connection with motors #521

Open
ayahelmyy opened this issue Nov 4, 2024 · 1 comment
Open

ARDUINO connection with motors #521

ayahelmyy opened this issue Nov 4, 2024 · 1 comment
Labels
question Further information is requested

Comments

@ayahelmyy
Copy link

Variant

USART

Control type

FOC

Control mode

Speed

Description

i need to test arduino with motors , so i used uart3 i changed the #define to uart and then upload the code to arduino and inside the variant uart "i will upload picture to the code , any help?
Uploading Screenshot from 2024-11-04 15-45-34.png…

@ayahelmyy ayahelmyy added the question Further information is requested label Nov 4, 2024
@ayahelmyy
Copy link
Author

`#ifdef VARIANT_USART

// #define SIDEBOARD_SERIAL_USART2 0
//#define CONTROL_SERIAL_USART2 0 // left sensor board cable, disable if ADC or PPM is used! For Arduino control check the hoverSerial.ino
//#define FEEDBACK_SERIAL_USART2 // left sensor board cable, disable if ADC or PPM is used!

// #define SIDEBOARD_SERIAL_USART3 0
#define CONTROL_SERIAL_USART3 0 // right sensor board cable. Number indicates priority for dual-input. Disable if I2C (nunchuk or lcd) is used! For Arduino control check the hoverSerial.ino
#define FEEDBACK_SERIAL_USART3 // right sensor board cable, disable if I2C (nunchuk or lcd) is used!

//#define DUAL_INPUTS // UART*(Primary) + SIDEBOARD(Auxiliary). Uncomment this to use Dual-inputs
#define PRI_INPUT1 3, -1000, 0, 1000, 0 // TYPE, MIN, MID, MAX, DEADBAND. See INPUT FORMAT section
#define PRI_INPUT2 3, -1000, 0, 1000, 0 // TYPE, MIN, MID, MAX, DEADBAND. See INPUT FORMAT section
#ifdef DUAL_INPUTS

#define FLASH_WRITE_KEY      0x1102  // Flash memory writing key. Change this key to ignore the input calibrations from the flash memory and use the ones in config.h
#define CONTROL_SERIAL_USART3  1    // right sensor board cable. Number indicates priority for dual-input. Disable if I2C (nunchuk or lcd) is used! For Arduino control check the hoverSerial.ino
#define FEEDBACK_SERIAL_USART3   

/// #define SIDEBOARD_SERIAL_USART2 1 // left sideboard
/// #define SIDEBOARD_SERIAL_USART3 1 // right sideboard
#define AUX_INPUT1 3, -1000, 0, 1000, 0 // TYPE, MIN, MID, MAX, DEADBAND. See INPUT FORMAT section
#define AUX_INPUT2 3, -1000, 0, 1000, 0 // TYPE, MIN, MID, MAX, DEADBAND. See INPUT FORMAT section
#else
#define FLASH_WRITE_KEY 0x1002 // Flash memory writing key. Change this key to ignore the input calibrations from the flash memory and use the ones in config.h
#endif

// #define SUPPORT_BUTTONS_LEFT // use left sensor board cable for button inputs. Disable DEBUG_SERIAL_USART2!
// #define SUPPORT_BUTTONS_RIGHT // use right sensor board cable for button inputs. Disable DEBUG_SERIAL_USART3!
`#endif``

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant