# An initial blink issue

**URL:** <https://forum.arduino.cc/t/an-initial-blink-issue/1005098>\
**Category:** General Guidance\
**Created:** [June 21, 2022, 10:48am UTC](https://forum.arduino.cc/t/an-initial-blink-issue/1005098 "2022-06-21T10:48:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![GreyOwl](https://avatars.discourse-cdn.com/v4/letter/g/3d9bf3/32.png) [@GreyOwl](https://forum.arduino.cc/u/GreyOwl)\
**Post date:** [June 21, 2022, 10:48am UTC](https://forum.arduino.cc/t/an-initial-blink-issue/1005098/1 "2022-06-21T10:48:04Z")

</div>

I am trying to set a UK style level crossing light blinking system and have so far got the two red lights blinking correctly. A third and 4th yellow light need to blink together just once before the 4 red lights start. The red lights start when one sensor is triggered and stops when the second is activated I have been working on this for days perhaps someone can help. Thank you.

the code so far is

int sensor1 = 5; // IR sensor==Pin goes LOW when train detected  
int sensor2 = 6; // IR sensor==Pin goes LOW when train detected  
int led1 = 10; // Led 1 pin alternating flasher  
int led2 = 11; // Led 2 pin alternating flasher  
int led3 = 12; // Led 3 pin alternating flasher  
int led4 = 13; // Led 4 pin alternating flasher  
int ledy1 = 8;  
int ledy2 = 9;  
int entering\_sensor = 5; // which sensor was triggered first  
int leaving\_sensor = 6; // which sensor shows train leaving  
int sequence\_started = 0; // this says if the crossing is active  
int flash\_state = 0; // variable for function flash\_leds()  
long flash\_time = 0; // variable for function flash\_leds()  
long flash\_interval = 900; // time in milliseconds between alternating flashes  
int sensor\_count = 0; // declare variable for while statement  
void setup() {  
pinMode(sensor1, INPUT); // sensor1 is an INPUT  
pinMode(sensor2, INPUT); // sensor2 is an INPUT  
pinMode(led1, OUTPUT); // led1 on pin 10 is an OUTPUT  
pinMode(led2, OUTPUT); // led2 on pin 11 is an OUTPUT  
pinMode(led3, OUTPUT); // led3 on pin 14 is an OUTPUT  
pinMode(led4, OUTPUT); // led4 on pin 15 is an OUTPUT  
pinMode(ledy1, OUTPUT);  
pinMode (ledy2, OUTPUT);  
digitalWrite(led1, LOW); // Start with flashers off  
digitalWrite(led2, LOW); // Start with flashers off  
digitalWrite(led3, LOW); // Start with flashers off  
digitalWrite(led4, LOW); // Start with flashers off  
digitalWrite(ledy1, LOW);  
digitalWrite (ledy2,LOW);  
flash\_time = millis(); // for function flash\_leds()  
}  
void loop() {  
// The two if statements defines which sensor is which and  
// changes sequesnc\_started from FALSE to TRUE then starts  
// the leds flashing

if ((digitalRead (sensor1) == LOW) && (sequence\_started == 0)) {  
sequence\_started = 1;  
leaving\_sensor = sensor2;  
flash\_leds ();  
}  
if ((digitalRead (sensor2) == LOW) && (sequence\_started == 0)) {  
sequence\_started = 1;  
leaving\_sensor = sensor1;  
flash\_leds();  
}  
// First if== sequence started and continue flashing leds  
// Next if== train is leaving the crossing  
if (sequence\_started) flash\_leds();  
if ((digitalRead(leaving\_sensor) == LOW) && (sequence\_started == 1)) {  
// as long as the leaving sensor is active the train is still in the crossing  
// while checks if train is gone yet  
while (sequence\_started == 1) {  
sensor\_count = 0;  
for (int i = 1; i \< 40; i++) {  
if (digitalRead(leaving\_sensor) == LOW) sensor\_count++;  
delay (30);  
flash\_leds();  
}  
if (sensor\_count == 0) sequence\_started = 0;  
flash\_leds();  
}  
// At this point train is no longer over the leaving sensor  
digitalWrite(led1, LOW); // Turn OFF led  
digitalWrite(led2, LOW); // Turn OFF led  
digitalWrite(led3, LOW); // Turn OFF led  
digitalWrite(led4, LOW); // Turn OFF led  
}  
}  
void flash\_leds() {  
if (flash\_time \> millis()) return;  
flash\_state = ~flash\_state;  
digitalWrite(led1, flash\_state);  
digitalWrite(led2, ~flash\_state);  
digitalWrite(led3, flash\_state);  
digitalWrite(led4, ~flash\_state);  
flash\_time = millis() + flash\_interval;  
}

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [June 21, 2022, 10:51am UTC](https://forum.arduino.cc/t/an-initial-blink-issue/1005098/2 "2022-06-21T10:51:11Z")

</div>

Please post code using code tags, after formatting the code in a standard way using ctrl-T or Auto Format in the IDE.

> A third and 4th yellow light need to blink together just once before the 4 red lights start.

Sorry, this is not completely clear. First if they blink together, why are they not driven from the same I/O pin? Second, do the yellow lights blink in **every** blink cycle, or do they only flash once, before the red lights blink alone for the rest of the activation?

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [June 21, 2022, 10:59am UTC](https://forum.arduino.cc/t/an-initial-blink-issue/1005098/3 "2022-06-21T10:59:16Z")

</div>

> [@GreyOwl](#):
>
> flash\_time = millis() + flash\_interval;

Any instance of future time stamp is a huge red flag that you will experience millis() overflow. In this instance, it will only mean an irregular flash every few days, but it's a bad habit to get into.

millis() timing should always be done by capturing its value in past time stamps, and subtracting it from those values to calculate elapsed time.

---

<div class="post-metadata">

**Author:** ![GreyOwl](https://avatars.discourse-cdn.com/v4/letter/g/3d9bf3/32.png) [@GreyOwl](https://forum.arduino.cc/u/GreyOwl)\
**Post date:** [June 21, 2022, 11:00am UTC](https://forum.arduino.cc/t/an-initial-blink-issue/1005098/4 "2022-06-21T11:00:30Z")

</div>

Sorry if it wasn't in the right format I am a newby here it is again after I have auto formatted it. Yes I hadn't thought I could use the same pin. The yellow blink should only be at the beggining of the cycle after that not required to blink again.

Thanks for looking at this for me

int sensor1 = 5; // IR sensor==Pin goes LOW when train detected  
int sensor2 = 6; // IR sensor==Pin goes LOW when train detected  
int led1 = 10; // Led 1 pin alternating flasher  
int led2 = 11; // Led 2 pin alternating flasher  
int led3 = 12; // Led 3 pin alternating flasher  
int led4 = 13; // Led 4 pin alternating flasher  
int ledy1 = 8;  
int ledy2 = 9;  
int entering\_sensor = 5; // which sensor was triggered first  
int leaving\_sensor = 6; // which sensor shows train leaving  
int sequence\_started = 0; // this says if the crossing is active  
int flash\_state = 0; // variable for function flash\_leds()  
long flash\_time = 0; // variable for function flash\_leds()  
long flash\_interval = 900; // time in milliseconds between alternating flashes  
int sensor\_count = 0; // declare variable for while statement  
void setup() {  
pinMode(sensor1, INPUT); // sensor1 is an INPUT  
pinMode(sensor2, INPUT); // sensor2 is an INPUT  
pinMode(led1, OUTPUT); // led1 on pin 10 is an OUTPUT  
pinMode(led2, OUTPUT); // led2 on pin 11 is an OUTPUT  
pinMode(led3, OUTPUT); // led3 on pin 14 is an OUTPUT  
pinMode(led4, OUTPUT); // led4 on pin 15 is an OUTPUT  
pinMode(ledy1, OUTPUT);  
pinMode (ledy2, OUTPUT);  
digitalWrite(led1, LOW); // Start with flashers off  
digitalWrite(led2, LOW); // Start with flashers off  
digitalWrite(led3, LOW); // Start with flashers off  
digitalWrite(led4, LOW); // Start with flashers off  
digitalWrite(ledy1, LOW);  
digitalWrite (ledy2, LOW);  
flash\_time = millis(); // for function flash\_leds()  
}  
void loop() {  
// The two if statements defines which sensor is which and  
// changes sequesnc\_started from FALSE to TRUE then starts  
// the leds flashing

if ((digitalRead (sensor1) == LOW) && (sequence\_started == 0)) {  
sequence\_started = 1;  
leaving\_sensor = sensor2;  
flash\_leds ();  
}  
if ((digitalRead (sensor2) == LOW) && (sequence\_started == 0)) {  
sequence\_started = 1;  
leaving\_sensor = sensor1;  
flash\_leds();  
}  
// First if== sequence started and continue flashing leds  
// Next if== train is leaving the crossing  
if (sequence\_started) flash\_leds();  
if ((digitalRead(leaving\_sensor) == LOW) && (sequence\_started == 1)) {  
// as long as the leaving sensor is active the train is still in the crossing  
// while checks if train is gone yet  
while (sequence\_started == 1) {  
sensor\_count = 0;  
for (int i = 1; i \< 40; i++) {  
if (digitalRead(leaving\_sensor) == LOW) sensor\_count++;  
delay (30);  
flash\_leds();  
}  
if (sensor\_count == 0) sequence\_started = 0;  
flash\_leds();  
}  
// At this point train is no longer over the leaving sensor  
digitalWrite(led1, LOW); // Turn OFF led  
digitalWrite(led2, LOW); // Turn OFF led  
digitalWrite(led3, LOW); // Turn OFF led  
digitalWrite(led4, LOW); // Turn OFF led  
}  
}  
void flash\_leds() {  
if (flash\_time \> millis()) return;  
flash\_state = ~flash\_state;  
digitalWrite(led1, flash\_state);  
digitalWrite(led2, ~flash\_state);  
digitalWrite(led3, flash\_state);  
digitalWrite(led4, ~flash\_state);  
flash\_time = millis() + flash\_interval;  
}

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [June 21, 2022, 11:03am UTC](https://forum.arduino.cc/t/an-initial-blink-issue/1005098/5 "2022-06-21T11:03:12Z")

</div>

Please, it's isn't formatted and there are no code tags.

---

<div class="post-metadata">

**Author:** ![GreyOwl](https://avatars.discourse-cdn.com/v4/letter/g/3d9bf3/32.png) [@GreyOwl](https://forum.arduino.cc/u/GreyOwl)\
**Post date:** [June 21, 2022, 11:06am UTC](https://forum.arduino.cc/t/an-initial-blink-issue/1005098/6 "2022-06-21T11:06:15Z")

</div>

sorry don't understand what are code tags and I autoformatted please forgive my ignorance

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [June 21, 2022, 11:07am UTC](https://forum.arduino.cc/t/an-initial-blink-issue/1005098/7 "2022-06-21T11:07:04Z")

</div>

You should read the forum guidelines.  
 ![before_adding_code_tags](https://europe1.discourse-cdn.com/arduino/original/4X/e/e/e/eee9763018f7c48964ae946f087b04ea56aa74c4.png)  
then paste

After you do that, please try to answer the questions I asked...

---

<div class="post-metadata">

**Author:** ![octopirate](https://avatars.discourse-cdn.com/v4/letter/o/cdc98d/32.png) [@octopirate](https://forum.arduino.cc/u/octopirate)\
**Post date:** [June 21, 2022, 11:09am UTC](https://forum.arduino.cc/t/an-initial-blink-issue/1005098/8 "2022-06-21T11:09:25Z")

</div>

Here it is as a public service 😉

```cpp
int sensor1 = 5; // IR sensor==Pin goes LOW when train detected
int sensor2 = 6; // IR sensor==Pin goes LOW when train detected
int led1 = 10; // Led 1 pin alternating flasher
int led2 = 11; // Led 2 pin alternating flasher
int led3 = 12; // Led 3 pin alternating flasher
int led4 = 13; // Led 4 pin alternating flasher
int ledy1 = 8;
int ledy2 = 9;
int entering_sensor = 5; // which sensor was triggered first
int leaving_sensor = 6; // which sensor shows train leaving
int sequence_started = 0; // this says if the crossing is active
int flash_state = 0; // variable for function flash_leds()
long flash_time = 0; // variable for function flash_leds()
long flash_interval = 900; // time in milliseconds between alternating flashes
int sensor_count = 0; // declare variable for while statement
void setup() {
  pinMode(sensor1, INPUT); // sensor1 is an INPUT
  pinMode(sensor2, INPUT); // sensor2 is an INPUT
  pinMode(led1, OUTPUT); // led1 on pin 10 is an OUTPUT
  pinMode(led2, OUTPUT); // led2 on pin 11 is an OUTPUT
  pinMode(led3, OUTPUT); // led3 on pin 14 is an OUTPUT
  pinMode(led4, OUTPUT); // led4 on pin 15 is an OUTPUT
  pinMode(ledy1, OUTPUT);
  pinMode (ledy2, OUTPUT);
  digitalWrite(led1, LOW); // Start with flashers off
  digitalWrite(led2, LOW); // Start with flashers off
  digitalWrite(led3, LOW); // Start with flashers off
  digitalWrite(led4, LOW); // Start with flashers off
  digitalWrite(ledy1, LOW);
  digitalWrite (ledy2, LOW);
  flash_time = millis(); // for function flash_leds()
}
void loop() {
  // The two if statements defines which sensor is which and
  // changes sequesnc_started from FALSE to TRUE then starts
  // the leds flashing

  if ((digitalRead (sensor1) == LOW) && (sequence_started == 0)) {
    sequence_started = 1;
    leaving_sensor = sensor2;
    flash_leds ();
  }
  if ((digitalRead (sensor2) == LOW) && (sequence_started == 0)) {
    sequence_started = 1;
    leaving_sensor = sensor1;
    flash_leds();
  }
  // First if== sequence started and continue flashing leds
  // Next if== train is leaving the crossing
  if (sequence_started) flash_leds();
  if ((digitalRead(leaving_sensor) == LOW) && (sequence_started == 1)) {
    // as long as the leaving sensor is active the train is still in the crossing
    // while checks if train is gone yet
    while (sequence_started == 1) {
      sensor_count = 0;
      for (int i = 1; i < 40; i++) {
        if (digitalRead(leaving_sensor) == LOW) sensor_count++;
        delay (30);
        flash_leds();
      }
      if (sensor_count == 0) sequence_started = 0;
      flash_leds();
    }
    // At this point train is no longer over the leaving sensor
    digitalWrite(led1, LOW); // Turn OFF led
    digitalWrite(led2, LOW); // Turn OFF led
    digitalWrite(led3, LOW); // Turn OFF led
    digitalWrite(led4, LOW); // Turn OFF led
  }
}
void flash_leds() {
  if (flash_time > millis()) return;
  flash_state = ~flash_state;
  digitalWrite(led1, flash_state);
  digitalWrite(led2, ~flash_state);
  digitalWrite(led3, flash_state);
  digitalWrite(led4, ~flash_state);
  flash_time = millis() + flash_interval;
}
```

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [June 21, 2022, 11:11am UTC](https://forum.arduino.cc/t/an-initial-blink-issue/1005098/9 "2022-06-21T11:11:58Z")

</div>

It's not helpful that you have given the LEDs anonymous names "led1, led2..." . I can't tell which are red and which are yellow, and if they belong in pairs. Edit, I see the variables now, "ledy" but I don't see where they are used...

There is no code size penalty for variable names in C, that could be "ledYellow1" for example and be a lot more readable.

I think the real problem will be unravelling and re-writing your timing. You have combined incorrect millis() use with delay() calls, and you might have some blocking going on, it's not immediately obvious, which is itself another issue.

---

<div class="post-metadata">

**Author:** ![GreyOwl](https://avatars.discourse-cdn.com/v4/letter/g/3d9bf3/32.png) [@GreyOwl](https://forum.arduino.cc/u/GreyOwl)\
**Post date:** [June 21, 2022, 11:24am UTC](https://forum.arduino.cc/t/an-initial-blink-issue/1005098/10 "2022-06-21T11:24:28Z")

</div>

Ok thanks I will try to replay all delays with Millis deal with this, will also rename leds as suggested. I will deal with one issue at a time to try to sort this out.

Thanks for this guidance and will try to format my code better next time

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [June 21, 2022, 11:26am UTC](https://forum.arduino.cc/t/an-initial-blink-issue/1005098/11 "2022-06-21T11:26:38Z")

</div>

I didn't want to "muddy the water" but you should (or might end up having to) use a state machine for this.

---

<div class="post-metadata">

**Author:** ![octopirate](https://avatars.discourse-cdn.com/v4/letter/o/cdc98d/32.png) [@octopirate](https://forum.arduino.cc/u/octopirate)\
**Post date:** [June 21, 2022, 11:27am UTC](https://forum.arduino.cc/t/an-initial-blink-issue/1005098/12 "2022-06-21T11:27:19Z")

</div>

> [@GreyOwl](#):
>
> try to format my code better next time

In the ide just go:

1. control-T to format the indents nicely, then
2. control-shift-C to copy for forum

And then in the post:

1. control-V to paste

---

<div class="post-metadata">

**Author:** ![GreyOwl](https://avatars.discourse-cdn.com/v4/letter/g/3d9bf3/32.png) [@GreyOwl](https://forum.arduino.cc/u/GreyOwl)\
**Post date:** [June 21, 2022, 11:29am UTC](https://forum.arduino.cc/t/an-initial-blink-issue/1005098/13 "2022-06-21T11:29:53Z")

</div>

Thanks really helpful I have copied your advice to my notes

---

<div class="post-metadata">

**Author:** ![octopirate](https://avatars.discourse-cdn.com/v4/letter/o/cdc98d/32.png) [@octopirate](https://forum.arduino.cc/u/octopirate)\
**Post date:** [June 21, 2022, 11:32am UTC](https://forum.arduino.cc/t/an-initial-blink-issue/1005098/14 "2022-06-21T11:32:50Z")

</div>

> [@anon57585045](#):
>
> I didn't want to "muddy the water" but you should (or might end up having to) use a state machine for this.

Yeah I was going to say that in OP's initial approach on the subject [**here**](https://forum.arduino.cc/t/2-linked-ir-detection-sensors/1002049).

I was going to code it for that thread just for fun, but can't find any decent sensors and mimicing it with buttons is a pitb. So might go to brick and mortar local shop and get 2 sensors and do this.

edit @GreyOwl here is a generic state diagram which might get you thinking. The states are, well, states 😉 which in your case might be "crossing open" and "crossing closed" and the events are things that cause states to change, like "train arrived" or "pedestrian button pressed" and so on.

![image](https://europe1.discourse-cdn.com/arduino/original/4X/0/9/9/099be659a9bd36019388fe1f1bfd88bacedaed26.png)

I find it very difficult to write code without first having created such a diagram, however rough it may be to start with.

more edit...

> [@octopirate](#):
>
> So might go to brick and mortar local shop and get 2 sensors and do this.

Well they have stock and are picking for me, so will swing by and get some sensors. Then tomorrow's play exercise will be to code this up.

---

<div class="post-metadata">

**Author:** ![PaulRB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paulrb/32/216330_2.png) [@PaulRB](https://forum.arduino.cc/u/PaulRB)\
**Post date:** [June 21, 2022, 11:46am UTC](https://forum.arduino.cc/t/an-initial-blink-issue/1005098/15 "2022-06-21T11:46:29Z")

</div>

> [@GreyOwl](#):
>
> will try to format my code better next time

Please edit your posts #1 & #4 and put the code tags in those.

---

<div class="post-metadata">

**Author:** ![Paul\_B](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_b/32/216376_2.png) [@Paul\_B](https://forum.arduino.cc/u/Paul_B)\
**Post date:** [June 21, 2022, 12:25pm UTC](https://forum.arduino.cc/t/an-initial-blink-issue/1005098/16 "2022-06-21T12:25:56Z")

</div>

> [@PaulRB](#):
>
> Please edit your posts #1 & #4 and put the code tags in those.

But other than formatting using "Auto Format" - Ctrl-T - do not **change** the actual code.

[How to post code](https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum/679966#posting-code)

---

<div class="post-metadata">

**Author:** ![octopirate](https://avatars.discourse-cdn.com/v4/letter/o/cdc98d/32.png) [@octopirate](https://forum.arduino.cc/u/octopirate)\
**Post date:** [June 21, 2022, 12:31pm UTC](https://forum.arduino.cc/t/an-initial-blink-issue/1005098/17 "2022-06-21T12:31:44Z")

</div>

> [@PaulRB](#):
>
> Please edit your posts #1 & #4 and put the code tags in those.

The formatted and tagged code in my #8 is the code from OP's #4 which in turn is an unsuccessful attempt to better display the code in #1.

---

<div class="post-metadata">

**Author:** ![Paul\_B](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_b/32/216376_2.png) [@Paul\_B](https://forum.arduino.cc/u/Paul_B)\
**Post date:** [June 21, 2022, 12:54pm UTC](https://forum.arduino.cc/t/an-initial-blink-issue/1005098/18 "2022-06-21T12:54:00Z")

</div>

To some extent, the OP **is** better served by correcting his own posts at least in part because coming anew to the thread, seeing that glob of poorly readable stuff is extremely off-putting and may discourage helpers.

Perhaps it seems so to me as I **expect** it to be formatted according to convention in order to read it. But then most people who are in a position to help, have the same expectation, if you are less critical of details, neither do you have the experience to do so! 🤔

Now just as with text, the lack of paragraphs is a problem and that is a **serious** matter. Multiple blank lines would also severely impair readability and this sometimes happens. There should be a _single_ blank line between each function definition and **maybe** between distinct functional sections within a function.

Finally, there is inappropriate commenting such as:

> [@GreyOwl](#):
>
> pinMode(led1, OUTPUT); // led1 on pin 10 is an OUTPUT

should be simply

> pinMode(led1, OUTPUT); // led1 on pin 10

> [@GreyOwl](#):
>
> int led1 = 10; // Led 1 pin alternating flasher

should be simply

> #define led1 = 10; // alternating flasher

> [@GreyOwl](#):
>
> digitalWrite(led1, LOW); // Start with flashers off  
> digitalWrite(led2, LOW); // Start with flashers off  
> digitalWrite(led3, LOW); // Start with flashers off  
> digitalWrite(led4, LOW); // Start with flashers off

Same comment on every line just muddies the description. All this is distracting.

Does it matter? 🤨 Yes.

---

<div class="post-metadata">

**Author:** ![PaulRB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paulrb/32/216330_2.png) [@PaulRB](https://forum.arduino.cc/u/PaulRB)\
**Post date:** [June 21, 2022, 1:23pm UTC](https://forum.arduino.cc/t/an-initial-blink-issue/1005098/19 "2022-06-21T13:23:04Z")

</div>

(apologies for continuing the "off topic" discussion on coding style and comments...)

Well written code with good structure and carefully chosen variable and function names should mean that the coder rarely needs to add comments to describe _what_ is going on. Ideally, the _what_ should be clear from simply reading the code. The coder can add value to the code when adding comments by using the comments to describe the _why_ rather than the _what_. This gives some context to the reader so they understand why the _what_ needs to be done 😀

---

<div class="post-metadata">

**Author:** ![paulpaulson](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paulpaulson/32/363643_2.png) [@paulpaulson](https://forum.arduino.cc/u/paulpaulson)\
**Post date:** [June 21, 2022, 1:32pm UTC](https://forum.arduino.cc/t/an-initial-blink-issue/1005098/20 "2022-06-21T13:32:11Z")

</div>

Or to summarise briefly:

A good sketch is a good sketch if it can be read without additional comments like a good cooking recipe.

[Next page](https://forum.arduino.cc/t/an-initial-blink-issue/1005098.md?page=2)
