Skip to content

Commit eb639f2

Browse files
committed
Merge branch 'dev' of https://github.com/runger1101001/Arduino-FOC into runger1101001-dev
2 parents a09f828 + fbb7875 commit eb639f2

File tree

134 files changed

+7906
-1761
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+7906
-1761
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[BUG]"
5+
labels: possible bug
6+
assignees: ''
7+
8+
---
9+
10+
This is a simplified template, feel free to change it if it does not fit your case.
11+
12+
**Describe the bug**
13+
A clear and concise description of what the bug is.
14+
15+
**Describe the hardware setup**
16+
For us it is very important to know what is the hardware setup you're using in order to be able to help more directly
17+
- Which motor
18+
- Which driver
19+
- Which microcontroller
20+
- Which position sensor
21+
- Current sensing used?
22+
23+
**IDE you are using**
24+
- Arduino IDE
25+
- Platformio
26+
- Something else
27+
28+
**Tried the Getting started guide? - if applicable**
29+
Have you tried the getting started guide and at which step are you blocked in
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: "[FEATURE]"
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
Description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
Description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
Description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/ccpp.yml

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,34 @@ jobs:
1010
arduino-boards-fqbn:
1111
- arduino:avr:uno # arudino uno
1212
- arduino:sam:arduino_due_x # arduino due
13+
- arduino:avr:mega # arduino mega2650
14+
- arduino:avr:leonardo # arduino leonardo
1315
- arduino:samd:nano_33_iot # samd21
1416
- adafruit:samd:adafruit_metro_m4 # samd51
15-
- esp32:esp32:esp32doit-devkit-v1 # esm32
16-
- STM32:stm32:GenF1:pnum=BLUEPILL_F103C8 # stm32 bluepill
17-
- STM32:stm32:Nucleo_64:pnum=NUCLEO_F411RE # stm32 nucleo
17+
- esp32:esp32:esp32doit-devkit-v1 # esp32
18+
- esp32:esp32:esp32s2 # esp32s2
19+
- esp32:esp32:esp32s3 # esp32s3
20+
- STMicroelectronics:stm32:GenF1:pnum=BLUEPILL_F103C8 # stm32 bluepill
21+
- STMicroelectronics:stm32:Nucleo_64:pnum=NUCLEO_F411RE # stm32 nucleo
22+
- STMicroelectronics:stm32:GenF4:pnum=GENERIC_F405RGTX # stm32f405 - odrive
23+
- STMicroelectronics:stm32:Disco:pnum=B_G431B_ESC1 # B-G431-ESC1
1824
- arduino:mbed_rp2040:pico # rpi pico
1925

2026
include:
2127
- arduino-boards-fqbn: arduino:avr:uno # arudino uno - compiling almost all examples
2228
sketch-names: '**.ino'
2329
required-libraries: PciManager
24-
sketches-exclude: bluepill_position_control, esp32_position_control, esp32_i2c_dual_bus_example, stm32_i2c_dual_bus_example, magnetic_sensor_spi_alt_example, osc_esp32_3pwm, osc_esp32_fullcontrol, nano33IoT_velocity_control, smartstepper_control,esp32_current_control_low_side, stm32_spi_alt_example, esp32_spi_alt_example, B_G431B_ESC1_position_control
30+
sketches-exclude: bluepill_position_control, esp32_position_control, esp32_i2c_dual_bus_example, stm32_i2c_dual_bus_example, magnetic_sensor_spi_alt_example, osc_esp32_3pwm, osc_esp32_fullcontrol, nano33IoT_velocity_control, smartstepper_control,esp32_current_control_low_side, stm32_spi_alt_example, esp32_spi_alt_example, B_G431B_ESC1, odrive_example_spi, odrive_example_encoder, single_full_control_example, double_full_control_example, stm32_current_control_low_side
2531

2632
- arduino-boards-fqbn: arduino:sam:arduino_due_x # arduino due - one full example
2733
sketch-names: single_full_control_example.ino
2834

35+
- arduino-boards-fqbn: arduino:avr:leonardo # arduino leonardo - one full example
36+
sketch-names: open_loop_position_example.ino
37+
38+
- arduino-boards-fqbn: arduino:avr:mega # arduino mega2660 - one full example
39+
sketch-names: single_full_control_example.ino
40+
2941
- arduino-boards-fqbn: arduino:samd:nano_33_iot # samd21
3042
sketch-names: nano33IoT_velocity_control.ino, smartstepper_control.ino
3143

@@ -36,19 +48,37 @@ jobs:
3648
platform-url: https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
3749
sketch-names: single_full_control_example.ino
3850

51+
- arduino-boards-fqbn: esp32:esp32:esp32s2 # esp32s2
52+
platform-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json
53+
sketch-names: bldc_driver_3pwm_standalone.ino, stepper_driver_2pwm_standalone.ino, stepper_driver_4pwm_standalone
54+
55+
- arduino-boards-fqbn: esp32:esp32:esp32s3 # esp32s3
56+
platform-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json
57+
sketch-names: esp32_position_control.ino, esp32_i2c_dual_bus_example.ino
58+
3959
- arduino-boards-fqbn: esp32:esp32:esp32doit-devkit-v1 # esp32
40-
platform-url: https://dl.espressif.com/dl/package_esp32_index.json
60+
platform-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json
4161
sketch-names: esp32_position_control.ino, esp32_i2c_dual_bus_example.ino, esp32_current_control_low_side.ino, esp32_spi_alt_example.ino
4262

43-
- arduino-boards-fqbn: STM32:stm32:GenF1:pnum=BLUEPILL_F103C8 # bluepill - hs examples
44-
platform-url: https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json
63+
- arduino-boards-fqbn: STMicroelectronics:stm32:GenF1:pnum=BLUEPILL_F103C8 # bluepill - hs examples
64+
platform-url: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
4565
sketch-names: bluepill_position_control.ino, stm32_i2c_dual_bus_example.ino, stm32_spi_alt_example.ino
66+
67+
- arduino-boards-fqbn: STMicroelectronics:stm32:Disco:pnum=B_G431B_ESC1 # B-G431-ESC1
68+
platform-url: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
69+
sketch-names: B_G431B_ESC1.ino
70+
build-properties:
71+
B_G431B_ESC1:
72+
-DHAL_OPAMP_MODULE_ENABLED
73+
74+
- arduino-boards-fqbn: STMicroelectronics:stm32:GenF4:pnum=GENERIC_F405RGTX # stm32f405 - odrive
75+
platform-url: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
76+
sketch-names: odrive_example_encoder.ino, odrive_example_spi.ino, stm32_current_control_low_side.ino
4677

47-
- arduino-boards-fqbn: STM32:stm32:Nucleo_64:pnum=NUCLEO_F411RE # one full example
48-
platform-url: https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json
49-
sketch-names: single_full_control_example.ino, stm32_spi_alt_example.ino
78+
- arduino-boards-fqbn: STMicroelectronics:stm32:Nucleo_64:pnum=NUCLEO_F411RE # nucleo one full example
79+
platform-url: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
80+
sketch-names: single_full_control_example.ino, stm32_spi_alt_example.ino, sdouble_full_control_example.ino, stm32_current_control_low_side.ino
5081

51-
5282

5383
# Do not cancel all jobs / architectures if one job fails
5484
fail-fast: false
@@ -63,3 +93,4 @@ jobs:
6393
platform-url: ${{ matrix.platform-url }}
6494
sketch-names: ${{ matrix.sketch-names }}
6595
sketches-exclude: ${{ matrix.sketches-exclude }}
96+
build-properties: ${{ toJson(matrix.build-properties) }}

CITATION.cff

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
cff-version: 1.0.0
2+
message: "If you use this software, please cite it as below."
3+
authors:
4+
- family-names: "Skuric"
5+
given-names: "Antun"
6+
orcid: "https://orcid.org/0000-0002-3323-4482"
7+
- family-names: "Bank"
8+
given-names: "Hasan Sinan"
9+
orcid: "https://orcid.org/0000-0002-0626-2664"
10+
- family-names: "Unger"
11+
given-names: "Richard"
12+
- family-names: "Williams"
13+
given-names: "Owen"
14+
- family-names: "González-Reyes"
15+
given-names: "David"
16+
orcid: "https://orcid.org/0000-0002-1535-3007"
17+
title: "SimpleFOC: A Field Oriented Control (FOC) Library for Controlling Brushless Direct Current (BLDC) and Stepper Motors"
18+
version: 2.2.2
19+
doi: 10.21105/joss.04232
20+
date-released: 2022-06-26
21+
url: "https://github.com/simplefoc/Arduino-FOC"
22+
23+
preferred-citation:
24+
type: article
25+
authors:
26+
- family-names: "Skuric"
27+
given-names: "Antun"
28+
orcid: "https://orcid.org/0000-0002-3323-4482"
29+
- family-names: "Bank"
30+
given-names: "Hasan Sinan"
31+
orcid: "https://orcid.org/0000-0002-0626-2664"
32+
- family-names: "Unger"
33+
given-names: "Richard"
34+
- family-names: "Williams"
35+
given-names: "Owen"
36+
- family-names: "González-Reyes"
37+
given-names: "David"
38+
orcid: "https://orcid.org/0000-0002-1535-3007"
39+
doi: "10.21105/joss.04232"
40+
journal: "Journal of Open Source Software"
41+
url: "https://doi.org/10.21105/joss.04232"
42+
month: 6
43+
start: 4232 # First page number
44+
end: 4232 # Last page number
45+
title: "SimpleFOC: A Field Oriented Control (FOC) Library for Controlling Brushless Direct Current (BLDC) and Stepper Motors"
46+
volume: 7
47+
issue: 74
48+
year: 2022

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

0 commit comments

Comments
 (0)