Monday, April 20, 2020

Flashing led without delay

   I found another solution to made flashing led without delay than example from arduino IDE
   My solution is to use also millis() function but in other style. Millis() function count time from power up the Arduino (microcontroller)
   I use another variable, to made time from power up in seconds.After that I use rest function (%), for odd number led is on, for even number led is off. For example: 7%2=1 => led on, 8%2=0 => led off.
  You can see a simple mobvie with this style for control a led:
   I wrote 2 simple sketches: blink_wo_delay.ino and blink_wo_delay2.ino with same effects but little changes as commands.
  

2 comments:

  1. I usually DIY amps. It is very good for me, with a low cost and good effect.
    I design a PCB board and send it to
    http://www.nextpcb.com/?code=James
    Only $7 I got my PCB assembled amps board for 5 pcs.

    ReplyDelete
  2. Corsair Hydro 90° Rotary Adapter in UAE, X Series Rotary Adapter in UAE, Twin Pack Rotary Adapter in UAE
    https://gccgamers.com/corsair-90.html
    Corsair 90° Adapter in UAE, Safe Shopping Multiple Payment Options Express Delivery GCC Gamers Moneyback Guarantee.
    1634960172497-11

    ReplyDelete