last serial command

Dependencies:   mbed

main.cpp

Committer:
NorNick
Date:
2015-11-22
Revision:
0:04ab8946d33a

File content as of revision 0:04ab8946d33a:

#include "mbed.h"

//------------------------------------
// Hyperterminal configuration
// 9600 bauds, 8-bit data, no parity
//------------------------------------

Serial pc(SERIAL_TX, SERIAL_RX);
 
//Serial device(D8, D2);

AnalogIn analog_value(A1);

DigitalIn Sw(D3);

BusOut ledSet1(D11, D10, D9, D4); //อย่าลืมกลับเลขด้วยเพราะมันต้องใช้ 7-Segment
BusOut ledSet2(D15, D14, D13, D12); //อย่าลืมกลับเลขด้วยเพราะมันต้องใช้ 7-Se
 
int main(){
    pc.baud(9600);
    uint8_t value[15]={'a','9','8','0','0','0','5','0','4','3','7','5','z'};//57340500089 ใสรหัส นศ ช่องนี้
    uint8_t ch[12];//ใส่ code 11 bits here
    int i=0;
    pc.printf("Hello Nucleo !\n");
     
    for(i=0;i<=13;i++)
    { 
        pc.printf(" %c",value[i]);
    } 
    pc.printf("\n");    
}