Skip to content

Instantly share code, notes, and snippets.

@michalmonday
Created December 10, 2022 00:42
Show Gist options
  • Save michalmonday/4d879e165983aaade6c5618a6f1b65dd to your computer and use it in GitHub Desktop.
Save michalmonday/4d879e165983aaade6c5618a6f1b65dd to your computer and use it in GitHub Desktop.
#include "mbed.h"
Serial serial(USBTX, USBRX);
DigitalOut led(LED1);
//void onReceive() {
// char c = serial.getc();
// led = !led;
// serial.putc(c+1);
//}
int main(void) {
//serial.attach(&onReceive);
serial.puts("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
wait_ms(100);
serial.puts("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
while(1)
{
wait(1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment