Arduino millis examples with LEDs | AddOhms Live #5

preview_player
Показать описание
Jump to 02:38 for start of video.

It's time to take your Arduino code to the next step. It's time to learn how to ditch delay() and use millis() instead. You don't need to reset millis(), instead, learn how to use a single line of code.

Streamed on Sunday, January 28.

For a primer, check out these Bald Engineer tutorials on Arduino millis():

How to Fake Multitasking:

The proper way reset millis, aka don't!:

A bunch of millis examples:
Рекомендации по теме
Комментарии
Автор

uhhh, you save my life, this "multithread" imitation saves me from a lot of thinking

marianpelmus
Автор

I have built a Temp/Smoke unit with a Mega 2560, Max6675, TM1637 Display, MQ_2 Smoke Det and a LCD IC2, the outputs which I have set to pins 10, 12 and 13 an ouput goes low to high to activate a CD4002 pin 8 is the 4th input to the CD4002 the rest of the logic turns a relay off cutting power and this then latches so cannot come back on...what i would to do is on switch on the output pin 8 is high so that a false trigger is avoided so I wanted to put a millis statement in to keep pin 8 high for 2 seconds can you advise how I can do this...Many Thanks

johnmarshall
Автор

You mentioned a video where you discuss DEFINE vs CONST. Could you please provide a link to that video?

MichaelHagberg
Автор

+AddOhms Appreciate your efforts and educational videos. During this live stream you were asked who your favorite was, Edison or Tesla? At 14:45 you referred us to your #17 Linear Voltage Regulator video for the answer, I reviewed this video but did not find your answer. Did I miss something?

ReasonForemost
Автор

What do you think of the ESP32 boards? It's an Arduino killer I think. It's a WIFI&BLE enabled board with good amount of pins for under $10 and WAY faster than an AVR chip. I've been playing with the ESP8266 but waiting on an ESP32 now.

professorm