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.
Diff: main.cpp
- Revision:
- 2:1193fb25edf8
- Parent:
- 1:ce7379fdc895
- Child:
- 3:a221a67f0ab5
--- a/main.cpp Fri Jan 03 21:34:25 2020 +0000
+++ b/main.cpp Tue Jan 07 11:13:23 2020 -0500
@@ -5,19 +5,20 @@
#include "mbed.h"
+#include <ctype.h>
#include "3ATIBoardIO.h"
-Serial pc(USBTX, STDIO_UART_RX,9600);
-//Serial rs232( PA_2,PB_4,9600);
+//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);
+//DigitalOut led1(LED1);
//PwmOut pwm(PWM_PIN);
-DigitalOut led(D11);
+DigitalOut led(LED1);
//DigitalIn rsd(A7);
-DigitalIn rsr(D12);
+//DigitalIn rsr(D12);
int main() {
led=1;
@@ -27,17 +28,17 @@
{
i='a';
}
- //int c = rs232.getc();
- int a = pc.getc();
+ int c = rs232.getc();
+ //int a = pc.getc();
//led1=1;
//wait(0.5);
- led1=!led1;
+ led=!led;
wait(0.2);
- //rs232.putc(c);
- pc.putc(a);
- led=!led;
-
- //rs232.putc(i);
+ rs232.putc(toupper(c));
+ //pc.putc(a);
+ //led=!led;
+
+ //rs232.putc(i);
//pc.putc(i);
//wait(0.5); // 100 ms