When dealing with microcontrollers and electronics, a bug can have different origins and it is important to immediately narrow the search. The first thing to do is to identify if a bug origin is:
- Hardware (broken component, bad electrical wiring…)
- Software (programming mistake, no more SRAM…)
For example, if you have a LED connected on a pin which does not turn on while it should, use the Command Panel of this pin to check the state of the output:
- If the output is active => Hardware bug (broken LED, bad electrical wiring, bad electrical contact, cut wire)
- If the output is not active => Software bug
Refer to this example : Watching variables and values.