![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
relay exmaples
Fork of Hexi_Click_Relay_Example by
main.cpp
- Committer:
- GregC
- Date:
- 2016-08-24
- Revision:
- 0:b492a09a523e
- Child:
- 1:489e49494755
File content as of revision 0:b492a09a523e:
#include "mbed.h" DigitalOut relay1(PTA10); DigitalOut relay2(PTC4); // main() runs in its own thread in the OS // (note the calls to Thread::wait below for delays) int main() { while (true) { relay1 = 1; Thread::wait(500); relay1 = 0; Thread::wait(500); relay2 = 1; Thread::wait(500); relay2 = 0; Thread::wait(500); } }