Hepta Lab1

Dependencies:   mbed

Fork of Lab7-01_template by HEPTA-Sat Training 2017~2018

Committer:
HEPTA
Date:
Mon Sep 04 17:13:12 2017 +0000
Revision:
10:a998300647dd
Parent:
8:bba8a88ca7ea
Child:
11:dbb3dde00a9f
PC_communication;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 0:bdbd3d6fc5d5 1 #include "mbed.h"
umeume 2:1c5cdb2c3e0f 2
umeume 2:1c5cdb2c3e0f 3 Serial pc(USBTX,USBRX);
umeume 5:c5ccb1b07e8f 4
umeume 2:1c5cdb2c3e0f 5 int main()
umeume 2:1c5cdb2c3e0f 6 {
HEPTA 10:a998300647dd 7 pc.baud(9600);
HEPTA 10:a998300647dd 8 int i1 = 7;
HEPTA 10:a998300647dd 9 float i2 = 7.5;
HEPTA 10:a998300647dd 10 char i3 = 'H';
HEPTA 10:a998300647dd 11 pc.printf("Hello World!\r\n");
HEPTA 10:a998300647dd 12 pc.printf("i1 = %d\r\n",i1);
HEPTA 10:a998300647dd 13 pc.printf("i2 = %f\r\n",i2);
HEPTA 10:a998300647dd 14 pc.printf("i3 = %c\r\n",i3);
HEPTA 10:a998300647dd 15 pc.putc(i3);
HEPTA 10:a998300647dd 16 for(i1 = 0; i1 < 10; i1++) {
HEPTA 10:a998300647dd 17 pc.printf("i1 = %d\r\n",i1);
HEPTA 10:a998300647dd 18 pc.putc(pc.getc());
HEPTA 10:a998300647dd 19 }
umeume 2:1c5cdb2c3e0f 20 }