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: HC_SR04_Ultrasonic_Library Servo mbed
main.cpp
00001 #include "mbed.h" 00002 DigitalOut pin1(D11); 00003 DigitalOut pin2(D12); 00004 00005 float p; 00006 00007 int main() { 00008 while(1){ 00009 00010 pin1=1; 00011 pin2=0; 00012 printf("Pin1: %d\n", pin1); 00013 printf("Pin2: %d\n", pin2); 00014 wait(5); 00015 pin1=1; 00016 pin2=1; 00017 printf("Pin1: %d\n", pin1); 00018 printf("Pin2: %d\n", pin2); 00019 wait(5); 00020 pin1=0; 00021 pin2=1; 00022 printf("Pin1: %d\n", pin1); 00023 printf("Pin2: %d\n", pin2); 00024 wait(5); 00025 00026 } 00027 00028 00029 00030 }
Generated on Mon Aug 1 2022 11:09:18 by
1.7.2