Exclusive code for server communication

Dependencies:   mbed-rtos mbed

Fork of test_thread by GR_Peach_Abhinav_Rahul

main.cpp

Committer:
akverma
Date:
2016-12-03
Revision:
0:adb256c0dfa9
Child:
1:0ceb20b56f7f

File content as of revision 0:adb256c0dfa9:

#include "mbed.h"
#include "rtos.h"
 
DigitalOut led1(LED1);
DigitalOut led2(LED2);
 
void led2_thread(void const *args) {
    int i=0;
    while (i<4) {
        led2 = !led2;
        Thread::wait(1000);
        i++;
    }
}
 
int main() {
    led1 = 1;
    led2 = 1;
    uint8_t data[3] = {0x47, 0x32, 0xA7};
    Thread thread(led2_thread);
    
    while (true) {
        led1 = !led1;
        Thread::wait(500);
    }
}