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:
- 0:89673a0f505b
- Child:
- 1:ce7379fdc895
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Jan 03 19:06:51 2020 +0000
@@ -0,0 +1,43 @@
+#define MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE 9600
+#define MBED_CONF_PLATFORM_CTHUNK_COUNT_MAX 8
+
+
+#include "mbed.h"
+#include "3ATIBoardIO.h"
+
+
+//Serial pc(USBTX, USBRX,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
+
+ }
+}