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:
- davidahuertas
- Date:
- 2022-05-06
- Revision:
- 0:39813a382bfb
File content as of revision 0:39813a382bfb:
#include "mbed.h"
#include "rtos.h"
DigitalOut led1(LED1);
DigitalOut led2(LED2);
DigitalIn pb1(A0);
DigitalIn pb2(D0);
Thread thread1;
Thread thread2;
void led1_thread1() {
while (true) {
led1 = pb1;
}
}
void led2_thread2() {
while (true) {
led2 = pb2;
}
}
int main() {
thread1.start(led1_thread1);
thread2.start(led2_thread2);
while (true) {
}
}