We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7ca7a1 commit 334944dCopy full SHA for 334944d
APIs_Drivers/BusInOut_ex_1/main.cpp
@@ -4,17 +4,18 @@
4
*/
5
6
#include "mbed.h"
7
-
+
8
BusInOut pins(D0, D1, D2); // Change these pins to buttons on your board.
9
10
-int main() {
11
- while(1) {
+int main()
+{
12
+ while (1) {
13
pins.output();
14
pins = 0x3;
15
ThisThread::sleep_for(1000);
16
pins.input();
17
- if(pins == 0x6) {
18
+ if (pins == 0x6) {
19
printf("Hello!\n");
20
}
21
0 commit comments