Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- ChrisABailey
- Date:
- 2020-01-03
- Revision:
- 1:ce7379fdc895
- Parent:
- 0:89673a0f505b
- Child:
- 2:1193fb25edf8
File content as of revision 1:ce7379fdc895:
#define MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE 9600
#define MBED_CONF_PLATFORM_CTHUNK_COUNT_MAX 8
#define MBED_CONF_TARGET_STDIO_UART_RX PB_4
//#define MBED_CONF_TARGET_STDIO_UART_RX
#include "mbed.h"
#include "3ATIBoardIO.h"
Serial pc(USBTX, STDIO_UART_RX,9600);
//Serial rs232( PA_2,PB_4,9600);
//Serial rs232( A7,A2,9600);
//I2C i2c(I2C_SDA_PIN,I2C_SCL_PIN);
DigitalOut led1(LED1);
//PwmOut pwm(PWM_PIN);
DigitalOut led(D11);
//DigitalIn rsd(A7);
DigitalIn rsr(D12);
int main() {
led=1;
int i='a';
while(1) {
if (i++>'z')
{
i='a';
}
//int c = rs232.getc();
int a = pc.getc();
//led1=1;
//wait(0.5);
led1=!led1;
wait(0.2);
//rs232.putc(c);
pc.putc(a);
led=!led;
//rs232.putc(i);
//pc.putc(i);
//wait(0.5); // 100 ms
}
}