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
  • 1
  • 4
  • 12
3
votes
1 answer

How to program Esp8266 remotly via wifi?

I hope it's not a sci-fi for arduino. But I saw that dual system with two MCU can program each other via radio connection. It has been done in experimental space cube projects. It is theoretically possible? I'm thinking about two arduino MCU first…
1
vote
2 answers

Triple-click reset option to erase existing program

My Adafruit Feather M0 has two reset options I know of: single click restarts existing program double-click listens for an upload for a few seconds, then restarts existing program Is there another option to have an existing program erased or…
Paul Jurczak
  • 209
  • 1
  • 8
1
vote
2 answers

help explain pulseIn function with arduino and Ultrasonic sensor

dears Engineers.. i got stuck with this issue couldn't understand.. please help with explanations. first i was upset of my ultrasonic sensor reading deviations, that is i examine my sensor indoor and at quite environment,, so what makes this noisy…
absi
  • 11
  • 2
1
vote
0 answers

Port manipulation: Coding for two chips

I am using Arduino Nano to test a code that will be ported on an ATTiny chip, which will need to perform operations at a frequency near clock maximum, calling for a very succinct coding. My goal: to streamline coding for two different chips in one…
1
vote
2 answers

Using millis() to create a timed sequence of events

I was hoping anyone could help me with my problem. I am trying to play a sequence of tones without using delay. So I am relying on millis(). However I have not been successful yet and after reading multiple tutorials about using millis(), I could…
Sushyoshi
  • 25
  • 4
0
votes
3 answers

Help a noob, no idea on Programming, only started 2 days ago Help please

As said no programming skills only started 2 days ago when Nano arrived. Heads in bits. This is how far i got. Any help much appreciated.. int EMagnetPin = 8; int solenoidPin = 9; int ReedPin = 13; void setup() { pinMode(EMagnetPin, OUTPUT); …
-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
-2
votes
1 answer

Using two leds with one push button

How can I make the code of this project where I will press one time a button, to turn on the first led (and turn off second led) and when other one press to turn on second led (and turn off the first led).