About 2,920,000 results
Open links in new tab
  1. Handling Timer Overflow Interrupts - Arduino Forum

    Nov 2, 2017 · I'm having a hard time wrapping my head around what I'm trying to accomplish.... I'm using Timer1 in Input Capture Mode, to time an external event. I clear the timer, set it up in Input Capture Mode, set the pre-scaler to ClkIO/1024, and enable Overflow interrupts, as the event I'm timing can take up to 10 seconds, which means the timer may overflow twice. I …

  2. Esp32 timer question - Programming - Arduino Forum

    Oct 22, 2023 · Hi, I have a problem understanding the timer example found in the ESP32 arduino core 2.0.14. The code doesn't say which timer is being used as far as I can see. Here's the code: /* Repeat timer example This example shows how to use hardware timer in ESP32. The timer calls onTimer function every second. The timer can be stopped with button attached to PIN 0 …

  3. ESP32 Timer Interrupt - Programming - Arduino Forum

    Jun 10, 2024 · I am using Esp32 Dev Module to develop the timer interrupt code .but when I am using timerBegin() function I am getting errors like that: timerBegin() function can accept only one argument.Please help me out this problem.For you reference I am posting my code. ===== #define LED 21 hw_timer_t *Timer0_Cfg = NULL; void IRAM_ATTR Timer0_ISR()

  4. Watchdog timer WDT - prevent esp32 from stucking

    Oct 4, 2024 · i have esp32 and using arduino ide (2.0.18 board version) im trying to add a code that prevent esp from blocking. so if it stuck for some reasons to restart it. i found following code but is not working #include "esp_task_wdt.h" #include <WiFi.h> #include <HTTPClient.h> // Define timeout in seconds (3minutes = 180seconds) #define WDT_TIMEOUT 180 void setup() …

  5. [Solved] Timer.h - Programming - Arduino Forum

    Mar 31, 2018 · you are probably right. I come back on post because of this: I thought that "timers" in general use the ...timers (hardware).

  6. Mega timers - Programming - Arduino Forum

    Aug 27, 2020 · The PWM pins are shown but I can't find which timer controls which PWM output. I need to change the PWM frequency of the PWMs I use if needed. I need a PWM frequency of about 31kHz and need to setup the appropriate timer control register for that. (I use 10 PWMs of the Mega and need to make sure the correct frequency gets to the correct PWM)

  7. Use of Timer 2 in Arduino UNO

    May 2, 2020 · Iam beginner with arduino and learning Interrupts , Stuck at a point while doing my project , I want to know how to use timer 2 for interrupt , i wrote a small peace of code , after every 10ms i want to monitor a sensor input .

  8. Using millis () for timing. A beginners guide - Arduino Forum

    Oct 2, 2017 · Part 1 It is not usually long before new Arduino users discover that although the delay() function is easy to use it has side effects, the main one of which is that its stops all activity on the Arduino until the delay is finished (not quite true, I know, but that is usually how the problem presents itself). When this occurs the new user is usually directed to the …

  9. Arduino millis Timer - Programming - Arduino Forum

    Mar 2, 2025 · Each timer runs separately without affecting others. How It Works: The checkTimer() function checks if the specified interval has passed without blocking the program. Each timer works independently by storing its own previousMillis value. This method is perfect for running multiple tasks at different intervals simultaneously.

  10. Hardware Timer ESP32 Dev Module - Programming - Arduino Forum

    Jul 16, 2024 · Continuing the discussion from Hardware Timer ESP32 Dev Module:. #include <Arduino.h> #include "esp32-hal-timer.h" hw_timer_t * timer = NULL; volatile int counter = 0; const int clockPin = 18; // GPIO pin for clock output #define TIMER_INTERVAL_MICROS 1 #define BIT_8_DELAY_MICROS 4.4 void IRAM_ATTR onTimer() { digitalWrite(clockPin, …

Refresh