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.
Dependencies: Encoder HIDScope mbed
Fork of Motor_component_testing by
Revision 1:0471de635f87, committed 2014-10-23
- Comitter:
- BArendshorst
- Date:
- Thu Oct 23 09:40:10 2014 +0000
- Parent:
- 0:2240263f7068
- Child:
- 2:b7d757570748
- Commit message:
- Goede pinnen. Rood: M1-, Zwart M1+
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Oct 23 09:09:24 2014 +0000
+++ b/main.cpp Thu Oct 23 09:40:10 2014 +0000
@@ -5,22 +5,22 @@
#define M1_PWM PTA5
#define M1_DIR PTA4
-Encoder motor1(PTD3,PTD1, true);
+Encoder motor1(PTD3,PTD1);
PwmOut pwm_motor1(M1_PWM);
DigitalOut motordir1(M1_DIR);
DigitalOut LED(LED_GREEN);
-float PWM = 0.2; /// (1000/200);
+float PWM = 0.6; /// (1000/200);
//HIDScope scope(3);
int main() {
- //pwm_motor1.period_us(100);
- //pwm_motor1.write(PWM);
+ pwm_motor1.period_us(100);
+ pwm_motor1.write(PWM);
LED = 0;
- motordir1 = 1;
+ motordir1 = 0;
while(true) {
//wait(3);
- pwm_motor1.write(0.4);
+ //pwm_motor1.write(0.4);
LED = 1;
//wait(1);
//PWM = PWM + 0.05;
