Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
//BlinkSimétrico No bloqueante: Un led que destella, //donde el tiempo de encendido es el mismo que el de apagado. #define PIN_LED 13 #define CONFIG_LED pinMode(PIN_LED, OUTPUT) #define AJUSTAR_LED(x) digitalWrite(PIN_LED, x) #define MS_ESPERA 50 void setup() { // put your setup code here, to run once: CONFIG_LED; } void loop() { BlinkSimetrico(); } void BlinkSimetrico(void) { static unsigned long millis_ant=0; static bool estado_led=0; if(millis() - millis_ant < MS_ESPERA) return; millis_ant=millis(); estado_led= !estado_led; AJUSTAR_LED(estado_led); }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)