michael kosinski
/
GR-PEACH_ArduinoRelay
Example of using the Arduino header on the GR-PEACH
main.cpp
- Committer:
- zkimike
- Date:
- 2017-06-29
- Revision:
- 0:83f8f2250665
File content as of revision 0:83f8f2250665:
#include "mbed.h" /* This demo uses the Arduino Relay Sheild from Seeed. Here is the link to the shield http://wiki.seeed.cc/Relay_Shield_v3/ The Arduino pin mapping is as follows Ardino Relay D7 relay 1 D6 relay 2 D5 relay 3 D4 relay 4 */ DigitalOut relay1(D7); DigitalOut relay2(D6); DigitalOut relay3(D5); DigitalOut relay4(D4); /* Toggle the relay with a period of */ int main() { while(1) { relay1 = 1; wait(0.5); // wait 0.5 sec ( 500ms) relay1 = 0; wait(0.5); // wait 0.5 sec ( 500ms) } }