diff options
| author | Abel Tim <abel.tim.t@gmail.com> | 2026-02-08 10:52:55 +0100 |
|---|---|---|
| committer | Abel Tim <abel.tim.t@gmail.com> | 2026-02-08 10:52:55 +0100 |
| commit | 282231ea2829d286ae3432022d56a6c4f573ed33 (patch) | |
| tree | 41f9785885f60a4d45253453988f6b30390aa8b7 /code/debug/motors/3motor_test | |
| parent | a320df8fb9789016b17e98b019f32cff31e31773 (diff) | |
| download | robotica-282231ea2829d286ae3432022d56a6c4f573ed33.tar.gz robotica-282231ea2829d286ae3432022d56a6c4f573ed33.zip | |
SOFTPWM
Multi-line description of commit,
feel free to be detailed.
[Issue: X]
Diffstat (limited to 'code/debug/motors/3motor_test')
| -rw-r--r-- | code/debug/motors/3motor_test/include/README | 37 | ||||
| -rw-r--r-- | code/debug/motors/3motor_test/lib/README | 46 | ||||
| -rw-r--r-- | code/debug/motors/3motor_test/platformio.ini | 14 | ||||
| -rw-r--r-- | code/debug/motors/3motor_test/src/main.cpp | 92 | ||||
| -rw-r--r-- | code/debug/motors/3motor_test/test/README | 11 |
5 files changed, 0 insertions, 200 deletions
diff --git a/code/debug/motors/3motor_test/include/README b/code/debug/motors/3motor_test/include/README deleted file mode 100644 index 49819c0..0000000 --- a/code/debug/motors/3motor_test/include/README +++ /dev/null @@ -1,37 +0,0 @@ - -This directory is intended for project header files. - -A header file is a file containing C declarations and macro definitions -to be shared between several project source files. You request the use of a -header file in your project source file (C, C++, etc) located in `src` folder -by including it, with the C preprocessing directive `#include'. - -```src/main.c - -#include "header.h" - -int main (void) -{ - ... -} -``` - -Including a header file produces the same results as copying the header file -into each source file that needs it. Such copying would be time-consuming -and error-prone. With a header file, the related declarations appear -in only one place. If they need to be changed, they can be changed in one -place, and programs that include the header file will automatically use the -new version when next recompiled. The header file eliminates the labor of -finding and changing all the copies as well as the risk that a failure to -find one copy will result in inconsistencies within a program. - -In C, the convention is to give header files names that end with `.h'. - -Read more about using header files in official GCC documentation: - -* Include Syntax -* Include Operation -* Once-Only Headers -* Computed Includes - -https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html diff --git a/code/debug/motors/3motor_test/lib/README b/code/debug/motors/3motor_test/lib/README deleted file mode 100644 index 9379397..0000000 --- a/code/debug/motors/3motor_test/lib/README +++ /dev/null @@ -1,46 +0,0 @@ - -This directory is intended for project specific (private) libraries. -PlatformIO will compile them to static libraries and link into the executable file. - -The source code of each library should be placed in a separate directory -("lib/your_library_name/[Code]"). - -For example, see the structure of the following example libraries `Foo` and `Bar`: - -|--lib -| | -| |--Bar -| | |--docs -| | |--examples -| | |--src -| | |- Bar.c -| | |- Bar.h -| | |- library.json (optional. for custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html -| | -| |--Foo -| | |- Foo.c -| | |- Foo.h -| | -| |- README --> THIS FILE -| -|- platformio.ini -|--src - |- main.c - -Example contents of `src/main.c` using Foo and Bar: -``` -#include <Foo.h> -#include <Bar.h> - -int main (void) -{ - ... -} - -``` - -The PlatformIO Library Dependency Finder will find automatically dependent -libraries by scanning project source files. - -More information about PlatformIO Library Dependency Finder -- https://docs.platformio.org/page/librarymanager/ldf.html diff --git a/code/debug/motors/3motor_test/platformio.ini b/code/debug/motors/3motor_test/platformio.ini deleted file mode 100644 index a13d034..0000000 --- a/code/debug/motors/3motor_test/platformio.ini +++ /dev/null @@ -1,14 +0,0 @@ -; PlatformIO Project Configuration File -; -; Build options: build flags, source filter -; Upload options: custom upload port, speed and extra flags -; Library options: dependencies, extra library storages -; Advanced options: extra scripting -; -; Please visit documentation for the other options and examples -; https://docs.platformio.org/page/projectconf.html - -[env:teensy41] -platform = teensy -board = teensy41 -framework = arduino diff --git a/code/debug/motors/3motor_test/src/main.cpp b/code/debug/motors/3motor_test/src/main.cpp deleted file mode 100644 index 24a4aff..0000000 --- a/code/debug/motors/3motor_test/src/main.cpp +++ /dev/null @@ -1,92 +0,0 @@ -//a test to test all motors, no PWM -#include <Arduino.h> - -int led = 13; - -int m1enA = 6; -int m1enB = 5; -int m1pwm1 = 4; -int m1pwm2 = 3; -int m1encoA = 32; -int m1encoB = 31; - -int m2enA = 12; -int m2enB = 11; -int m2pwm1 = 9; -int m2pwm2 = 10; -int m2encoA = 30; -int m2encoB = 29; - -int m3enA = 27; -int m3enB = 26; -int m3pwm1 = 24; -int m3pwm2 = 25; -int m3encoA = 28; -int m3encoB = 23; - - -void setup() { - pinMode(m1enA, OUTPUT); - pinMode(m1enB, OUTPUT); - pinMode(m1pwm1, OUTPUT); - pinMode(m1pwm2, OUTPUT); - - pinMode(m2enA, OUTPUT); - pinMode(m2enB, OUTPUT); - pinMode(m2pwm1, OUTPUT); - pinMode(m2pwm2, OUTPUT); - - pinMode(m3enA, OUTPUT); - pinMode(m3enB, OUTPUT); - pinMode(m3pwm1, OUTPUT); - pinMode(m3pwm2, OUTPUT); - Serial.begin(9600); - Serial.print("debug 001"); - -} - -// the loop routine runs over and over again forever: -void loop() { - digitalWrite(led, HIGH); - - digitalWrite(m1enA, HIGH); - digitalWrite(m1enB, LOW); - digitalWrite(m1pwm1, HIGH); - digitalWrite(m1pwm2, LOW); - - - digitalWrite(m2enA, HIGH); - digitalWrite(m2enB, LOW); - digitalWrite(m2pwm1, HIGH); - digitalWrite(m2pwm2, LOW); - - digitalWrite(m3enA, HIGH); - digitalWrite(m3enB, LOW); - digitalWrite(m3pwm1, HIGH); - digitalWrite(m3pwm2, LOW); - - delay(5000); - - - digitalWrite(led, LOW); - - digitalWrite(m1enA, HIGH); - digitalWrite(m1enB, LOW); - digitalWrite(m1pwm1, LOW); - digitalWrite(m1pwm2, LOW); - - digitalWrite(m2enA, HIGH); - digitalWrite(m2enB, LOW); - digitalWrite(m2pwm1, LOW); - digitalWrite(m2pwm2, LOW); - - digitalWrite(m3enA, HIGH); - digitalWrite(m3enB, LOW); - digitalWrite(m3pwm1, LOW); - digitalWrite(m3pwm2, LOW); - - - delay(5000); - - -}
\ No newline at end of file diff --git a/code/debug/motors/3motor_test/test/README b/code/debug/motors/3motor_test/test/README deleted file mode 100644 index 9b1e87b..0000000 --- a/code/debug/motors/3motor_test/test/README +++ /dev/null @@ -1,11 +0,0 @@ - -This directory is intended for PlatformIO Test Runner and project tests. - -Unit Testing is a software testing method by which individual units of -source code, sets of one or more MCU program modules together with associated -control data, usage procedures, and operating procedures, are tested to -determine whether they are fit for use. Unit testing finds problems early -in the development cycle. - -More information about PlatformIO Unit Testing: -- https://docs.platformio.org/en/latest/advanced/unit-testing/index.html |
