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

1.0.2 Release version #8

Merged
merged 11 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,32 +26,32 @@ jobs:
- arduino:mbed_rp2040:pico # rpi pico
include:
- arduino-boards-fqbn: arduino:avr:uno
required-libraries: Simple FOC
required-libraries: Simple FOC,SimpleFOCDrivers
- arduino-boards-fqbn: arduino:sam:arduino_due_x
required-libraries: Simple FOC
required-libraries: Simple FOC,SimpleFOCDrivers
- arduino-boards-fqbn: arduino:samd:nano_33_iot
required-libraries: Simple FOC
required-libraries: Simple FOC,SimpleFOCDrivers
- arduino-boards-fqbn: arduino:mbed_rp2040:pico
required-libraries: Simple FOC
required-libraries: Simple FOC,SimpleFOCDrivers
- arduino-boards-fqbn: adafruit:samd:adafruit_metro_m4
platform-url: https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
required-libraries: Simple FOC
required-libraries: Simple FOC,SimpleFOCDrivers
# - arduino-boards-fqbn: esp32:esp32:esp32doit-devkit-v1
# platform-url: https://dl.espressif.com/dl/package_esp32_index.json
# required-libraries: Simple FOC
# sketch-names: '**.ino'
- arduino-boards-fqbn: esp32:esp32:esp32 # esp32
platform-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json
required-libraries: Simple FOC
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
required-libraries: Simple FOC,SimpleFOCDrivers
- arduino-boards-fqbn: esp32:esp32:esp32s2 # esp32s2
platform-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json
required-libraries: Simple FOC
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
required-libraries: Simple FOC,SimpleFOCDrivers
- arduino-boards-fqbn: STMicroelectronics:stm32:GenF1:pnum=BLUEPILL_F103C8
platform-url: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
required-libraries: Simple FOC
required-libraries: Simple FOC,SimpleFOCDrivers
- arduino-boards-fqbn: STMicroelectronics:stm32:Nucleo_64:pnum=NUCLEO_F411RE
platform-url: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
required-libraries: Simple FOC
required-libraries: Simple FOC,SimpleFOCDrivers
# Do not cancel all jobs / architectures if one job fails
fail-fast: false
steps:
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
![Release](https://www.ardu-badge.com/badge/SimpleDCMotor.svg?)


Release 1.0.1 for SimpleFOC 2.3.1
Release 1.0.2 for SimpleFOC 2.3.1 or later

:warning: code in development! Please help us test it!

Expand Down Expand Up @@ -130,6 +130,7 @@ void setup() {
driver.voltage_power_supply = 10.0f;
driver.voltage_limit = 10.0f;
driver.pwm_frequency = 5000;
motor.torque_controller = TorqueControlType::voltage;
motor.controller = MotionControlType::torque;
Expand Down
4 changes: 2 additions & 2 deletions examples/dc-open-loop/dc-open-loop.ino
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
#include <Arduino.h>

#include "SimpleFOC.h"
#include "SimpleFOCDCMotor.h"
#include "SimpleDCMotor.h"

// DCDriver object - this is the only thing needed for open-loop control.
// There are different types to choose from, please select the correct one
// that matches your motor driver hardware.
DCDriverSpeedDir driver = DCDriverSpeedDir(2, 3);
DCDriver1PWM1Dir driver = DCDriver1PWM1Dir(2, 3);

/**
* Setup function, in which you should intialize the driver.
Expand Down
3 changes: 2 additions & 1 deletion examples/dc-torque-voltage/dc-torque-voltage.ino
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <Arduino.h>

#include "SimpleFOC.h"
#include "SimpleFOCDCMotor.h"
#include "SimpleDCMotor.h"


// DCMotor object
Expand Down Expand Up @@ -46,6 +46,7 @@ void setup() {
// if you want, you can limit the voltage used by the driver.
// This value has to be same as or lower than the power supply voltage.
driver.voltage_limit = 10.0f;
// often, you will want to set a lower PWM frequency than the default
driver.pwm_frequency = 5000;
// init driver
driver.init();
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=SimpleDCMotor
version=1.0.1
version=1.0.2
author=Simplefoc <[email protected]>
maintainer=Simplefoc <[email protected]>
sentence=A library enabling DC motor control with SimpleFOC.
Expand Down
2 changes: 1 addition & 1 deletion src/DCMotor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void DCMotor::init() {
enable();
_delay(50);

if (!_isset(sensor_direction)) {
if (sensor_direction==Direction::UNKNOWN) {
sensor_direction = Direction::CW;
SIMPLEFOC_DEBUG("MOT: Sensor Dir: CW");
}
Expand Down
Loading