Grove Compatibility Matrix

Module Wio Arduino
Buzzer Y Y
LED Bar Y Y
LED RGB Backlight N Y
LED Socket Kit Y Y
Light Sensor Y Y
Sound Sensor Y Y
Temperature Sensor Y Y
Temperature & Humidity Sensor Y Y
Button Y Y
Touch Sensor Y Y
Rotary Angle Sensor Y Y
Relay Y Y
Ultrasonic Ranger Y Y
Gas Sensor Y Y
Advertisements

How to Detect Gas Leakage with a Grove Gas Sensor in Arduino

1) Connect the module to the A0 port.

2) Run the following code:

void setup() {
  Serial.begin(9600);
 
  Serial.println(analogRead(0));
}
 
void loop() {
}

How to Get Temperature from a Grove Temperature Sensor in Arduino

1) Connect the module to the A0 port.

2) Run the following code:

#include <math.h>

const int B = 4275; // for v1.1 module

void setup() {
  int v = analogRead(0);

  float r = (float)(1023 - v) * 10000 / v;
  float t = 1 / (log(r / 10000) / B + 1 / 298.15) - 273.15;

  Serial.begin(9600);

  Serial.println(t);
}

void loop() {
}