/*
By: Andrew Tuline
Date: Oct 2021
Blinking an Arduino with the shortest code. These sketches:
- Support PWM
- Don't use delay()
*/
// This 82 column sketch blinks on any platform.
//void setup(){pinMode(13,OUTPUT);}void loop(){digitalWrite(13,millis()/20%100>80);}
// This 77 column sketch blinks on Nano/UNO only.
void setup(){DDRB=32;}void loop(){digitalWrite(13,millis()/20%100>80);}
// Shortest found at 51 and 52 columns as found at:
// https://wokwi.com/arduino/projects/312361636746756674?fbclid=IwAR3ZSA0P6aGSux_aHNv9XWo6EoBD7IkLDktk7nj8llGJUCAK1xfwr26byMk
// DDRB=32 sets pin 13 as output
// PINB=32 toggles pin 13
//
// void setup(){}void loop(){delay(9*(DDRB=PINB=99));} // The winner!!
// void setup(){}void loop(){DDRB=PINB=32;delay(1000);}