<commit_before>/*

inputs
========

Detects a button push and reports the state to the serial console.

Besd on sketches for Chapter 3 from the OSEPP "Arduino Companion" book,
*Arduino Basics*.

*/

int state = 0;
int pin = 13;

void setup()
{
  pinMode(pin, INPUT);
  Serial.begin(9600);
}

void loop()
{
  state = digitalRead(pin);
  Serial.print("The button state is ");
  Serial.println(state);
  delay(1000);
}

<commit_msg>Only print to console when the button is pressed.<commit_after>/*

inputs
========

Detects a button push and reports the state to the serial console.

Besd on sketches for Chapter 3 from the OSEPP "Arduino Companion" book,
*Arduino Basics*.

*/

int state = 0;
int pin = 13;

void setup()
{
  pinMode(pin, INPUT);
  Serial.begin(9600);
}

void loop()
{
  state = digitalRead(pin);
  if (state)
    Serial.println("The button was pressed.");
  delay(300);
}


{'fraction_non_alphanumeric': 0.13288288288288289, 'fraction_numerical': 0.0259009009009009, 'mean_word_length': 3.8315217391304346, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2082041', 'n_tokens_mistral': 332, 'n_tokens_neox': 303, 'n_words': 107}