651.288.7000 info@intertech.com

sensorsAlmost there!  All month, Intertech has been giving away the class material’s to the Complete Raspberry Pi training class and today I present you with Lab 9 of 10.

These last two labs are pretty cool!  In these last two labs, you hook up your Pi to some sensors to create a home weather kit.

In particular, in Lab 9, you attach a photo cell sensor (shown in the picture here) to your Pi via breadboard.  A photocell
is basically a resistor that changes its resistive value (in ohms Ω) depending
on how much light is shining onto the squiggly face. They are low cost and easy
to get in many sizes and specifications.  However, they are a bit inaccurate so they can be used to give you a relative idea of how much light your Raspberry Pi is in.


So, Lab 9, you again use the Pi4J library (used in the last labs), to:

  • Connect a photo cell sensor to the breadboard.
  • Explore a program to get input from a photo cell sensor connected by GPIO to the Pi.
  • Compile and execute the Java program to read the light level coming from the photo cell sensor.

Find Lab 9 here:  http://www.intertech.com/downloads/CompleteRaspberryPi/CRPi-ch09-LightSensor.docx.

Again, if you haven’t been following along and need to see the other labs, you can find them at the links below.

Like What You've Read?

Subscribe to the Blog.

Every Friday we send that week's content from our Developers via email. Try it out!

Some ad blockers can block the form below.

You have Successfully Subscribed!

Pin It on Pinterest

Share This