This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
# Board selection | |
platform = atmelavr | |
board = pro16MHzatmega328 | |
framework = arduino | |
monitor_speed = 38400 | |
lib_deps = | |
; Simple FOC#minimal | |
jrowberg/I2Cdevlib-MPU6050 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// THIS DOESN'T WORK. | |
// Discussed here https://www.stm32duino.com/viewtopic.php?f=7&t=832 | |
#include <Arduino.h> | |
#include "fdcan.h" | |
FDCAN_HandleTypeDef hfdcan1; | |
FDCAN_TxHeaderTypeDef tx_header; | |
void sendCanMessage() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Discussed here: https://community.simplefoc.com/t/motor-driver-st-ihm08m1-6pwm/131/9?u=owen_williams | |
// youtube vid here: https://youtu.be/U1_6f7bK6rI | |
#include <Arduino.h> | |
#define STATUS_LED PC6 | |
#define POT PB12 | |
#define TX PB3 | |
#define RX PB4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
#include <SimpleFOC.h> | |
/* | |
This works best on an esp32 but have tested on atmega328p too | |
Be careful to set voltage appropriately. Might want to turn down power_supply to 6v too. | |
*/ | |
#ifdef ESP32 | |
BLDCMotor motor = BLDCMotor(5, 18, 19, 7, 4); |