Questions tagged [coding-standards]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
28
votes
3answers
50k views

Is it better to use #define or const int for constants?

Arduino is an odd hybrid, where some C++ functionality is used in the embedded world—traditionally a C environment. Indeed, a lot of Arduino code is very C like though. C has traditionally used #...
25
votes
8answers
14k views

Are global variables evil in Arduino?

I'm relatively new at programming and many of the coding best practices I'm reading effectively state that there are very few good reasons to use a global variable (or that the best code has no ...
1
vote
0answers
132 views

Encoding clock signal into linear block codes

In the VirtualWire library, it is possible to encode the clock signal as the library is doing with 4b/6b coding. This is possible because VirtualWire uses convolutinal coding, where the information is ...
0
votes
1answer
71 views

when i finished coding my 3 dc motors, all these errors accrued one said stray '/302' in the program [closed]

/* #include <SmartInventor.h> */ void setup() { SmartInventor.DCMotor(); } void loop() { // M1, M2, M3 // CW, CCW, STOP // 0-100 // 0-360 SmartInventor.DCMotor(M1, CW, 10, 45°);...