Skip to main content

Project 1: Building an LED Power Meter

  • Chapter
  • First Online:
Windows 10 for the Internet of Things
  • 1987 Accesses

Abstract

You’ve seen a lot of examples of powering LEDs—turning them on and off from our IoT device. There are a lot of interesting things you can do with LEDs. For example, have you wondered how a power meter works? If you have used high end audio equipment, such as a studio sound board, you may have seen a power meter that has several segments ranging from green to yellow to red where green means the level is low, yellow is medium, and red is high. You can duplicate this behavior with a set of LEDs and your IoT device. Yes, you’re going to build a fancy LED power meter!

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    And here’s another one!

  2. 2.

    For more information about SPI, see https://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus .

  3. 3.

    There are other ways to do this, but this uses a technique we’ve seen previously.

  4. 4.

    You don’t have to name it InitGPIO(), but that is the common theme. Actually, any reasonable name is fine; but if you are going to share your code, InitGPIO() is a good name.

  5. 5.

    For mode explanations, see http://www.byteparadigm.com/applications/introduction-to-i2c-and-spi-protocols/ .

  6. 6.

    https://en.wikipedia.org/wiki/Endianness

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Charles Bell

About this chapter

Cite this chapter

Bell, C. (2016). Project 1: Building an LED Power Meter. In: Windows 10 for the Internet of Things. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-2108-2_10

Download citation

Publish with us

Policies and ethics