You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learn/08.contributions/00.arduino-writing-style-guide/arduino-writing-style-guide.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,14 +53,14 @@ Put your `setup()` and your `loop()` at the beginning of the program. They help
53
53
Use verbose if statements. For simplicity to the beginning reader, use the block format for everything, i.e. avoid this:
54
54
55
55
```
56
-
if (somethingIsTrue) doSomething;
56
+
if (distance > 10) moveCloser();
57
57
```
58
58
59
59
Instead, use this:
60
60
61
61
```
62
-
if (somethingIsTrue == TRUE) {
63
-
doSomething;
62
+
if (distance > 10) {
63
+
moveCloser();
64
64
}
65
65
```
66
66
@@ -136,4 +136,4 @@ Here's a good title block:
136
136
137
137
For digital input switches, the default is to use a pulldown resistor on the switch rather than a pullup. That way, the logic of a switch's interaction makes sense to the non-engineer.
138
138
139
-
Keep your circuits simple. For example, bypass capacitors are handy, but most simple inputs will work without them. If a component is incidental, explain it later.
139
+
Keep your circuits simple. For example, bypass capacitors are handy, but most simple inputs will work without them. If a component is incidental, explain it later.
0 commit comments