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:b8bb575bfde8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Tue Dec 17 12:34:59 2019 +0000
@@ -0,0 +1,39 @@
+#include "mbed.h"
+#include "rtos.h"
+
+Thread calisma1,calisma2;
+
+DigitalOut kart_ledi(PA_5);
+DigitalOut led(PA_14);
+DigitalOut bzr(PB_7);
+
+void thread_led()
+{
+ while(1)
+ {
+ led=!led;
+ wait(1);
+
+ }
+ }
+ void thread_bzr()
+{
+ while(1)
+ {
+ bzr=!bzr;
+ printf("Buzzer %x",bzr);
+ wait_ms(500);
+
+ }
+ }
+
+int main()
+{
+calisma1.start(thread_led);
+calisma2.start(thread_bzr);
+ while(true) {
+kart_ledi=!kart_ledi;
+wait_ms(100);
+ }
+ return 0;
+}
\ No newline at end of file