Question: Hi, I Need help with STM32CudeIDE HAL code in main.c I have a STM32F3Discovery card, BlueRobotics Basic ESC controller and M100 motor. According to the

Hi,

I Need help with STM32CudeIDE HAL code in main.c I have a STM32F3Discovery card, BlueRobotics Basic ESC controller and M100 motor. According to the Basic ESC documentation i need to generate a 1500microsecond signal to initilize the controller. How can i do this inside my main.c code? Hi, I Need help with STM32CudeIDE HAL code in main.c I have

In the documentation they provide an Arduino example code if this will help.

a STM32F3Discovery card, BlueRobotics Basic ESC controller and M100 motor. According to

95 /* USER CODE END SysInit */ 96 97 /* Initialize all configured peripherals */ 98 MX_GPIO_Init(); 99 MX_12C1_Init(); 100 MX_SP11_Init(); 101 MX_USB_PCD_Init(); LO2 MX_TIM2_Init(); 103 /* USER CODE BEGIN 2 */ 104 HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_1); 105 Need to initilize signal here? 106 * USER CODE END 2 */ 107 108 /* Infinite loop */ 109* USER CODE BEGIN WHILE */ 110 while (1) 111 { 112 * USER CODE END WHILE *). 113 #include byte servoPin = 9; Servo servo; void setup() { servo.attach(servoPin); servo.writeMicroseconds(1500); // send "stop" signal to ESC. delay(7000); // delay to allow the ESC to recognize the stopped signal } void loop() { int signal = 1700; // Set signal value, which should be between 1100 and 1900 servo.write Microseconds(signal); // Send signal to ESC

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!