Questions tagged [programming-sequence]
9 questions
4
votes
2 answers
Divide two integers resulting into a float
Suppose I want to divide two integer variables and put the result into a float.
In order to prevent integer division do I have to program like this:
int i = 6312;
int j = 258;
float f;
f = i;
f = i/j;
Or can I straightforward…
PimV
- 443
- 4
- 12
-1
votes
2 answers
how to apply a timer to an analogWrite command for Arduino
I have 2 sketches that control a fan using Arduino UNO, that I try to combine.
The 1st is a timer, that turns a pin ON and OFF for a determined period of time. The pin signal drives a MOSFET that in turn switches a small fan ON and OFF.
Since I…
kwhunter
- 23
- 10