<commit_before>/*
  Conditionals - while statement
 
 This example demonstrates the use of  while() statements.
 
 While the pushbutton is pressed, the sketch runs the calibration routine.
 The  sensor readings during the while loop define the minimum and maximum 
 of expected values from the photo resistor.
 
 This is a variation on the calibrate example.
 
 The circuit:
 * photo resistor connected from +5V to analog in pin 0
 * 10K resistor connected from ground to analog in pin 0
 * LED connected from digital pin 9 to ground through 220 ohm resistor
 * pushbutton attached from pin 2 to +5V
 * 10K resistor attached from pin 2 to ground
 
 created 17 Jan 2009
 modified 25 Jun 2009
 by <NAME>
 
 */


// These constants won't change:
const int sensorPin = 2;     // pin that the sensor is attached to
const int ledPin = 9;        // pin that the LED is attached to
const int indicatorLedPin = 13;  // pin that the built-in LED is attached to
const int buttonPin = 2;      // pin that the button is attached to


// These variables will change:
int sensorMin = 1023;  // minimum sensor value
int sensorMax = 0;     // maximum sensor value
int sensorValue = 0;         // the sensor value


void setup() {
  // set the LED pins as outputs and the switch pin as input:
  pinMode(indicatorLedPin, OUTPUT);
  pinMode (ledPin, OUTPUT);
  pinMode (buttonPin, INPUT);
}

void loop() {
  // while the button is pressed, take calibration readings:
  while (digitalRead(buttonPin) == HIGH) {
    calibrate(); 
  }<commit_msg>Added new examples for 0016 update - tigoe<commit_after>/*
  Conditionals - while statement
 
 This example demonstrates the use of  while() statements.
 
 While the pushbutton is pressed, the sketch runs the calibration routine.
 The  sensor readings during the while loop define the minimum and maximum 
 of expected values from the photo resistor.
 
 This is a variation on the calibrate example.
 
 The circuit:
 * photo resistor connected from +5V to analog in pin 0
 * 10K resistor connected from ground to analog in pin 0
 * LED connected from digital pin 9 to ground through 220 ohm resistor
 * pushbutton attached from pin 2 to +5V
 * 10K resistor attached from pin 2 to ground
 
 created 17 Jan 2009
 modified 25 Jun 2009
 by <NAME>
 
 http://arduino.cc/en/Tutorial/WhileLoop
 
 */


// These constants won't change:
const int sensorPin = 2;     // pin that the sensor is attached to
const int ledPin = 9;        // pin that the LED is attached to
const int indicatorLedPin = 13;  // pin that the built-in LED is attached to
const int buttonPin = 2;      // pin that the button is attached to


// These variables will change:
int sensorMin = 1023;  // minimum sensor value
int sensorMax = 0;     // maximum sensor value
int sensorValue = 0;         // the sensor value


void setup() {
  // set the LED pins as outputs and the switch pin as input:
  pinMode(indicatorLedPin, OUTPUT);
  pinMode (ledPin, OUTPUT);
  pinMode (buttonPin, INPUT);
}

void loop() {
  // while the button is pressed, take calibration readings:
  while (digitalRead(buttonPin) == HIGH) {
    calibrate(); 
  }
{'fraction_non_alphanumeric': 0.0654265554842848, 'fraction_numerical': 0.025016035920461834, 'mean_word_length': 3.175368139223561, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5221787', 'n_tokens_mistral': 949, 'n_tokens_neox': 811, 'n_words': 439}