GithubHelp home page GithubHelp logo

vanbassum / dallastemperature Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 57 KB

Uses ESP32 to read temperatures from DS18B20 and send to InfluxDb

License: MIT License

Dockerfile 1.19% CMake 0.54% C++ 71.13% C 27.14%

dallastemperature's Introduction

Supported Targets ESP32 ESP32-C2 ESP32-C3 ESP32-S2 ESP32-S3

Blink Example

(See the README.md file in the upper level 'examples' directory for more information about examples.)

This example demonstrates how to blink a LED using GPIO or using the led_strip component for the addressable LED, i.e. WS2812.

The led_strip is installed via component manager.

How to Use Example

Before project configuration and build, be sure to set the correct chip target using idf.py set-target <chip_name>.

Hardware Required

  • A development board with Espressif SoC (e.g., ESP32-DevKitC, ESP-WROVER-KIT, etc.)
  • A USB cable for Power supply and programming

Some development boards use an addressable LED instead of a regular one. These development boards include:

Board LED type Pin
ESP32-C3-DevKitC-1 Addressable GPIO8
ESP32-C3-DevKitM-1 Addressable GPIO8
ESP32-S2-DevKitM-1 Addressable GPIO18
ESP32-S2-Saola-1 Addressable GPIO18
ESP32-S3-DevKitC-1 Addressable GPIO48

See Development Boards for more information about it.

Configure the Project

Open the project configuration menu (idf.py menuconfig).

In the Example Configuration menu:

  • Select the LED type in the Blink LED type option.
    • Use GPIO for regular LED blink.
  • Set the GPIO number used for the signal in the Blink GPIO number option.
  • Set the blinking period in the Blink period in ms option.

Build and Flash

Run idf.py -p PORT flash monitor to build, flash and monitor the project.

(To exit the serial monitor, type Ctrl-].)

See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.

Example Output

As you run the example, you will see the LED blinking, according to the previously defined period. For the addressable LED, you can also change the LED color by setting the led_strip_set_pixel(led_strip, 0, 16, 16, 16); (LED Strip, Pixel Number, Red, Green, Blue) with values from 0 to 255 in the source file.

I (315) example: Example configured to blink addressable LED!
I (325) example: Turning the LED OFF!
I (1325) example: Turning the LED ON!
I (2325) example: Turning the LED OFF!
I (3325) example: Turning the LED ON!
I (4325) example: Turning the LED OFF!
I (5325) example: Turning the LED ON!
I (6325) example: Turning the LED OFF!
I (7325) example: Turning the LED ON!
I (8325) example: Turning the LED OFF!

Note: The color order could be different according to the LED model.

The pixel number indicates the pixel position in the LED strip. For a single LED, use 0.

Troubleshooting

  • If the LED isn't blinking, check the GPIO or the LED type selection in the Example Configuration menu.

For any technical queries, please open an issue on GitHub. We will get back to you soon.

dallastemperature's People

Contributors

vanbassum avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.