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: mbed
main.cpp
- Committer:
- shiyilei
- Date:
- 2014-10-21
- Revision:
- 5:093723e0eea2
- Parent:
- 4:6c49a5b891dc
File content as of revision 5:093723e0eea2:
/********************************************** *file:rectangle wave generation *Creator:JacobShi *Time :2014/10/17 *Description: use the analogout class *to generate a rectangle wave *period :1s and the dutycycle:0.5 ***********************************************/ #include "mbed.h" AnalogOut pin(p18); int main(void) { while(1) { pin=1; wait(0.5); pin=0; wait(0.5); } }