Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp@4:40c5308a8d0d, 2021-02-17 (annotated)
- Committer:
- mrtkhmbed
- Date:
- Wed Feb 17 08:16:15 2021 +0000
- Revision:
- 4:40c5308a8d0d
- Parent:
- 2:225c3cffe1d8
123 while(duty>=-0.85) --> while(duty>-0.85)
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mrtkhmbed | 1:6557a0b818c2 | 1 | #include "mbed.h" |
| mrtkhmbed | 1:6557a0b818c2 | 2 | #include "EC.h" |
| mrtkhmbed | 1:6557a0b818c2 | 3 | #include "SCforMatlab.h" |
| mrtkhmbed | 1:6557a0b818c2 | 4 | |
| mrtkhmbed | 1:6557a0b818c2 | 5 | #define RESOLUTION 500 //分解 |
| mrtkhmbed | 1:6557a0b818c2 | 6 | |
| mrtkhmbed | 1:6557a0b818c2 | 7 | Ticker ticker; //割り込み |
| mrtkhmbed | 1:6557a0b818c2 | 8 | Serial pc(USBTX,USBRX); |
| mrtkhmbed | 1:6557a0b818c2 | 9 | |
| mrtkhmbed | 2:225c3cffe1d8 | 10 | Ec1multi EC(PC_3,PC_2,RESOLUTION); |
| mrtkhmbed | 1:6557a0b818c2 | 11 | SCforMatlab SC(PC_8, PC_6, 50, EC, 0.05);//1: モーター正回転, 2: モーター負回転, 3:PWMの周期, 4:クラスアドレス, 5:ステップ時間(whileの周期に合わせる) |
| mrtkhmbed | 1:6557a0b818c2 | 12 | |
| mrtkhmbed | 1:6557a0b818c2 | 13 | int main(){ |
| mrtkhmbed | 1:6557a0b818c2 | 14 | wait(5); |
| mrtkhmbed | 2:225c3cffe1d8 | 15 | SC.measureMotor(); |
| mrtkhmbed | 1:6557a0b818c2 | 16 | } |