Skip to main content

Questions tagged [timing]

This tag is for questions about timing code execution, or external events.

1 vote
1 answer
85 views

In many Arduino sketches, especially beginner ones, delay() is commonly used to pause between actions. However, I’ve seen more advanced projects use millis() instead to handle timing. From a ...
Firdous Ahmad Mala's user avatar
0 votes
2 answers
138 views

What are the practical differences between using delay() versus a while loop with millis() for timing in Arduino projects? I assumed both methods are blocking, but I'm not completely sure. Example ...
Luigi's user avatar
  • 181
2 votes
2 answers
730 views

With Arduino Uno Rev3, I am trying to maintain a delicate timing while handling data transmission. I want to send 6 bytes at a time, which takes around ~44 us when I time Serial.write(). The time it ...
gunakkoc's user avatar
  • 123
0 votes
1 answer
68 views

I'm having some trouble with software debouncing on Arduino UNO. There is a condition in my code where an unwanted debounce registers as a button push. I'm using an interrupt for my button press, ...
Boyfinn's user avatar
  • 245
-1 votes
2 answers
1k views

The op of pin 11 should be inverse of pin 3. I used digitalreadfast and digitalwritefast and used simple if else. But the delay is high as 10us. What should i do? I found this code in forum but its ...
Pranav Pillai's user avatar
0 votes
2 answers
97 views

I have a question regarding serial buffer readout. At program start, I send a serial command to a sensor that 1. activates him and 2. let him send data - that works. When I unplug the sensor, the ...
Gymknopf's user avatar
0 votes
2 answers
478 views

I'm working on a little midi hardware project and I'm using attachInterrupt() to assign a callback function to an interrupt pin. Nothing gets done in the loop function, so it looks like this: void ...
strudelkopf's user avatar
2 votes
0 answers
142 views

OK, I have a little hardware issue I need to fix in software for the time being. I say, "For the time being," because I already have the PC Boards printed, and I need to make do for this ...
Leslie Rhorer's user avatar
-1 votes
1 answer
642 views

i just experimented with the timing accuracy of my Arduino Uno R3 using this code: unsigned long beginTime; unsigned long endTime; void setup() { Serial.begin(9600); // open a serial port } void ...
Michael S's user avatar
  • 101
0 votes
3 answers
388 views

I have two Arduinos that communicate over serial. Each arduino runs a TDMA algorithm where each arduino is assigned one timeslot. The arduinos should transmit during their timeslot, which does work ...
bobby's user avatar
  • 3
1 vote
1 answer
139 views

Context I am working on a project which includes 13 cascaded STMicroelectronics LED1642GWs. These LED drivers are essentially 16bit shift registers, whereby the buffered serial data can be loaded to a ...
George Kerwood's user avatar
3 votes
1 answer
1k views

I am trying to create a program that runs 4 LEDs sequentially while also being able to do other things with different inputs and outputs. Because of this, I am using the millis function and not the ...
Myles's user avatar
  • 73
-1 votes
1 answer
47 views

In this question: Procedure for changing frequency of Nano or similar, @EdgarBonet gave a very nice method of generating timings that don't divide the system clock evenly. He also said that it would ...
Jim Mack's user avatar
  • 269
0 votes
1 answer
140 views

I am using the Arduino Nano every. Take this example where I am measuring two things A and B. Loop{// this loop runs once every second //Read A,B //Change something using analogueWrite which ...
fred's user avatar
  • 101
2 votes
2 answers
226 views

I have had to use Timer0 with phase correct PWM and a prescaler of 1. This results in a 32khz PWM frequency and obviously impacts millis, delay and micros. (Timer1 and Timer 2 are also in use so ...
Simm's user avatar
  • 51

15 30 50 per page
1
2 3 4 5