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
- Committer:
- mksaga
- Date:
- 2019-05-01
- Revision:
- 7:dbe5b06987d7
- Parent:
- 6:8562953f94bf
- Child:
- 8:e0cd3bd2d051
File content as of revision 7:dbe5b06987d7:
#include "mbed.h" DigitalOut motor_pin_1(p14); DigitalOut motor_pin_2(p15); DigitalOut motor_enable(p19); void run_pump(int secs) { motor_enable = 1; motor_pin_1 = 0; motor_pin_2 = 1; int i = 0; while(i < secs * 148) { i++; printf("%d | ", i);} motor_pin_2 = 0; } int main() { run_pump(10); printf("\ngreetings\n"); }