for Conan 's Book

Dependencies:   mbed

main.cpp

Committer:
conan98
Date:
2016-03-03
Revision:
0:d839615de565

File content as of revision 0:d839615de565:

#include "mbed.h"

DigitalOut myled_B(LED_BLUE);
DigitalOut myled_R(LED_RED);
DigitalOut myled_G(LED_GREEN);


int main() {
    
myled_G=1;// OFF LED
myled_R=myled_B=1;//  OFF LED

    while(1) {
        myled_B = 0;// ON LED
        wait_ms(200);
        myled_B = 1;
        wait(1);
        
        myled_R = 0;
        wait_ms(200);
        myled_R = 1;
        wait(0.2);
        
    }
}

/*
PA_0, PA_1, PA_2, PA_3, PA_4, PA_5, PA_6, PA_7, PA_8, PA_9, PA_10, PA_11, PA_12, PA_13, PA_14

PA_00, PA_01, PA_02, PA_03, PA_04, PA_05, PA_06, PA_07, PA_08, PA_09

PB_0, PB_1, PB_2, PB_3

PB_00, PB_01, PB_02, PB_03

PC_0, PC_1, PC_2, PC_3, PC_4, PC_5, PC_6, PC_8, PC_9, PC_10, PC_11, PC_12, PC_13, PC_14, PC_15

PC_00, PC_01, PC_02, PC_03, PC_04, PC_05, PC_06, PC_08, PC_09

A0 = PC_15, A1 = PC_14, A2 = PC_13, A3 = PC_12, A4 = PC_11, A5 = PC_10, A6 = PC_9, A7 = PC_8

D0 = PA_14, D1 = PA_13, D2 = PC_3, D3 = PC_2, D4 = PA_2, D5 = PA_1, D6 = PA_0, D7 = PA_12, D8 = PA_11, D9 = PC_1, D10 = PA_5, D11 = PA_8, D12 = PA_7, D13 = PA_6, D14 = PA_10, D15 = PA_9

LED_RED = PC_0, LED_GREEN = PC_4, LED_BLUE = PC_5

LED1 = LED_RED, LED2 = LED_GREEN, LED3 = LED_BLUE, LED4 = LED_BLUE

LEDR = LED_RED, LEDG = LED_GREEN, LEDB = LED_BLUE

USBTX = PC_10, USBRX = PC_11

SD_SEL = PB_0, SD_CLK = PB_1, SD_MISO = PB_2, SD_MOSI = PB_3
*/