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.
Diff: main_old.txt
- Revision:
- 2:72952132894a
- Parent:
- 1:77096ac47e7a
--- a/main_old.txt Thu Jan 28 15:51:12 2021 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-#include "mbed.h"
-
-
-PwmOut DCMotor(D6);
-PwmOut ServoClockWise(D5);
-PwmOut ServoCounterCW(D3);
-
-DigitalOut DCMotor_IN1(D7);
-DigitalOut DCMotor_IN2(D8);
-DigitalOut ServoEnable(D4);
-
-
-
-int main()
-{
- DCMotor.period_ms(20); // shoul be 20 ms (490 Hz) and 10 ms for the servo (980 Hz)
- ServoClockWise.period_ms(10);
- ServoCounterCW.period_ms(10);
- ServoEnable=1;
-
- DCMotor_IN1=0;
- DCMotor_IN2=1;
- DCMotor.pulsewidth_us(1500);
-// wait(5);
-// DCMotor.pulsewidth_ms(0);
-
-
-
- while(0){
-
- DCMotor_IN1=0;
- DCMotor_IN2=1;
- DCMotor.pulsewidth_ms(2);
- ServoClockWise.pulsewidth_us(0);
- ServoCounterCW.pulsewidth_us(100);
- wait_ms(1000);
- ServoCounterCW.pulsewidth_us(19000);
- wait_ms(1000);
-
- DCMotor_IN1=1;
- DCMotor_IN2=0;
- DCMotor.pulsewidth_ms(10);
- ServoCounterCW.pulsewidth_us(0);
- ServoClockWise.pulsewidth_us(100);
- wait_ms(1000);
- ServoClockWise.pulsewidth_us(19000);
- wait_ms(1000);
-
- }
-}