<commit_before>/*
 * All 5.0 V sensors example
 * 
 * This sketch shows you how to use all 5.0 V ROHM sensors simultaneously.
 * 
 * Before powering up your Arduino, make sure to select 5V on jumper J15 on the shield!
 * 
 * NOTE: When using BD7411G Hall sensor with Arduino UNO, be sure to disconnect the sensor from the shield before uploading the sketch!
 *       Since BD7411G's OUT pin is directly connected to Arduino D0 (serial RX), any attempt to upload with the sensor connected will lead to out_of_sync() error.
 */

// define all the sensors we will use
#define INCLUDE_BD7411G
#define INCLUDE_BD1020HFV

// include the library
#include <RohmMultiSensor.h>

//instantiate all the sensors' classes
BD7411G hall;
BD1020HFV temp;

void setup() {
  // begin serial communication
  Serial.begin(9600); 

  // begin the TWI (I2C) interface.
  // this function has to be called before any calls to .init()!
  Wire.begin();

  // initialize all the sensor with default values.
  hall.init();
  // temperature sensor (BD1020HFV) is connected to ANALOG_1 header on the shield
  temp.init(ANALOG_1);

  Serial.println("MF[-]\tt[deg C]");
}

void loop() {
  // measure all the sensor values
  bool magFieldDetected = hall.measure();
  float tempValue = temp.measure();

  // print the values to the serial port
  Serial.print(magFieldDetected);
  Serial.print('\t');
  Serial.println(tempValue);

  // wait 100 ms before the next measurement
  delay(100);
}
<commit_msg>Update all5V0Sensors.ino<commit_after>/*
 * All 5.0 V sensors example
 * 
 * This sketch shows you how to use all 5.0 V ROHM sensors simultaneously.
 * 
 * Before powering up your Arduino, make sure to select 5V on jumper J15 on the shield!
 * 
 * NOTE: When using BD7411G Hall sensor with Arduino UNO, be sure to disconnect the sensor from the shield before uploading the sketch!
 *       Since BD7411G's OUT pin is directly connected to Arduino D0 (serial RX), any attempt to upload with the sensor connected will lead to out_of_sync() error.
 */

// define all the sensors we will use
#define INCLUDE_ALL_5V0_SENSORS

// include the library
#include <RohmMultiSensor.h>

//instantiate all the sensors' classes
BD7411G hall;
BD1020HFV temp;

void setup() {
  // begin serial communication
  Serial.begin(9600); 

  // begin the TWI (I2C) interface.
  // this function has to be called before any calls to .init()!
  Wire.begin();

  // initialize all the sensor with default values.
  hall.init();
  // temperature sensor (BD1020HFV) is connected to ANALOG_1 header on the shield
  temp.init(ANALOG_1);

  Serial.println("MF[-]\tt[deg C]");
}

void loop() {
  // measure all the sensor values
  bool magFieldDetected = hall.measure();
  float tempValue = temp.measure();

  // print the values to the serial port
  Serial.print(magFieldDetected);
  Serial.print('\t');
  Serial.println(tempValue);

  // wait 100 ms before the next measurement
  delay(100);
}

{'fraction_non_alphanumeric': 0.09054325955734406, 'fraction_numerical': 0.031522468142186455, 'mean_word_length': 3.310693641618497, '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': '5550624', 'n_tokens_mistral': 1003, 'n_tokens_neox': 895, 'n_words': 365}