demo project

Dependencies:   AX-12A Dynamixel mbed iothub_client EthernetInterface NTPClient ConfigFile SDFileSystem iothub_amqp_transport mbed-rtos proton-c-mbed wolfSSL

Committer:
henryrawas
Date:
Wed Jan 06 00:58:41 2016 +0000
Revision:
10:9b21566a5ddb
Child:
13:ffeff9b5e513
Send status every minute. Add stress sequence. Use LED colors

Who changed what in which revision?

UserRevisionLine numberNew contents of line
henryrawas 10:9b21566a5ddb 1 #include "mbed.h"
henryrawas 10:9b21566a5ddb 2 #include "rtos.h"
henryrawas 10:9b21566a5ddb 3
henryrawas 10:9b21566a5ddb 4 DigitalOut greenLed(LED_GREEN);
henryrawas 10:9b21566a5ddb 5 DigitalOut redLed(LED_RED);
henryrawas 10:9b21566a5ddb 6 DigitalOut blueLed(LED_BLUE);
henryrawas 10:9b21566a5ddb 7
henryrawas 10:9b21566a5ddb 8
henryrawas 10:9b21566a5ddb 9 void ShowLedColor(int col)
henryrawas 10:9b21566a5ddb 10 {
henryrawas 10:9b21566a5ddb 11 greenLed = 1;
henryrawas 10:9b21566a5ddb 12 redLed = 1;
henryrawas 10:9b21566a5ddb 13 blueLed = 1;
henryrawas 10:9b21566a5ddb 14
henryrawas 10:9b21566a5ddb 15 if (col == 1)
henryrawas 10:9b21566a5ddb 16 greenLed = 0;
henryrawas 10:9b21566a5ddb 17 else if (col == 2)
henryrawas 10:9b21566a5ddb 18 redLed = 0;
henryrawas 10:9b21566a5ddb 19 else if (col == 3)
henryrawas 10:9b21566a5ddb 20 blueLed = 0;
henryrawas 10:9b21566a5ddb 21 }
henryrawas 10:9b21566a5ddb 22
henryrawas 10:9b21566a5ddb 23 void ShowLedGreen()
henryrawas 10:9b21566a5ddb 24 {
henryrawas 10:9b21566a5ddb 25 ShowLedColor(1);
henryrawas 10:9b21566a5ddb 26 }
henryrawas 10:9b21566a5ddb 27
henryrawas 10:9b21566a5ddb 28 void ShowLedRed()
henryrawas 10:9b21566a5ddb 29 {
henryrawas 10:9b21566a5ddb 30 ShowLedColor(2);
henryrawas 10:9b21566a5ddb 31 }
henryrawas 10:9b21566a5ddb 32 void ShowLedBlue()
henryrawas 10:9b21566a5ddb 33 {
henryrawas 10:9b21566a5ddb 34 ShowLedColor(3);
henryrawas 10:9b21566a5ddb 35 }