Often times in sensor building, your sensor may not work perfectly the first time. It is common for people to encounter problems that they need to troubleshoot. The most common errors arise from incorrect or loose wire connections or misspelled code commands.
If you find your sensor does not work, double and triple check all of your connections. Make sure you haven’t switched the position of wires or that you have plugged wires into breadboard positions that are actually connected to the rest of your circuit.
Also, it is important to type your code EXACTLY as it is written in the instructions including capital letters and underscores in the correct places. The microcontroller does what you typed, not what you meant to type. It can be frustrating and difficult to catch when you miss one small thing like a single incorrect character or letter. But don’t worry, this happens to everyone, even the most advanced programmers!