The Proto Shield

As I mentioned earlier, we’ll use the Proto Shield because it provides a secure and easy way to connect a project to Arduino. You can buy this from the Arduino Store. There are many other Proto Shields available. Any will work, but you may have to make changes to the layout to fit your particular shield. Some… Continue reading The Proto Shield

Assembling the Circuit

Finally, we’re done with the sketch and we’ve tested all the components! Are we ready to start soldering? Not quite: we’ve tested the various components separately, but not together. You might think that this step is unnecessary, but integration testing is vital. This step discovers unexpected interactions between components, whether hardware or software. For instance, two components… Continue reading Assembling the Circuit

Checking for Rain

What about checking for rain with the humidity sensor? You can do this at the same time you check the time, but it becomes a very long line. It’s OK to use another if() statement; long-time programmers might tell you this is less efficient, but your garden won’t care if the water comes on a split second… Continue reading Checking for Rain

Checking Whether It’s Time to Turn a Valve On or Off

Next, let’s look at the data from the RTC and figure out how we’ll use this to decide whether it’s time to turn something on or off. If you go back to the RTC example ds1307, you’ll see how the time is printed: Conveniently, this is already a number, so comparing with the hours and minutes… Continue reading Checking Whether It’s Time to Turn a Valve On or Off

Coding

Guess what? Writing code (coding) requires planning as well. You need to think a little about what you are trying to do before you start typing away. Similar to the way you tested the new electronics before doing the whole design, you’ll test each piece of code before going on. The less code there is,… Continue reading Coding

Testing the Temperature and Humidity Sensor

The DHT11 is a popular Temperature and Humidity Sensor. Like the RTC, it is inexpensive and easy to use with Arduino. According to the data sheet, the DHT11 is connected as shown in Figure 8-13. Note the pullup resistor on the data pin. Because we’re adding a component that needs one, let’s add another 10K ohm resistor… Continue reading Testing the Temperature and Humidity Sensor

Electronic Schematic Diagrams

Most electronic circuits are completely defined by two things: 1) which components are used and 2) how they are to be connected. By capturing only this information as clearly as possible, a schematic diagram is the clearest way to visualise and communicate an electronic circuit. A schematic diagram intentionally does not convey the size, shape,… Continue reading Electronic Schematic Diagrams