Hi,
I try to interface multichannel gas sensor using Wio GPS/GSM Tracker (based on ATSAM21D). I setup a very basic source code copied from example
and make some modification on serial channel (from Serial to SerialUSB). However, it looks like the Wio GPS Tracker failed to operate. No output from serial monitor. Here is my source code.
[code]
#include <Wire.h>
#include “MutichannelGasSensor.h”
#define SENSOR_ADDR 0X04
void setup() {
// put your setup code here, to run once:
SerialUSB.begin(115200);
SerialUSB.println(“Setup”);
gas.begin(SENSOR_ADDR);
}
void loop() {
// put your main code here, to run repeatedly:
float R0_NH3, R0_CO, R0_NO2;
float Rs_NH3, Rs_CO, Rs_NO2;
float ratio_NH3, ratio_CO, ratio_NO2;
R0_NH3 = gas.getR0(0);
R0_CO = gas.getR0(1);
R0_NO2 = gas.getR0(2);
Rs_NH3 = gas.getRs(0);
Rs_CO = gas.getRs(1);
Rs_NO2 = gas.getRs(2);
ratio_NH3 = Rs_NH3/R0_NH3;
ratio_CO = Rs_CO/R0_CO;
ratio_NO2 = Rs_NH3/R0_NO2;
SerialUSB.println("R0:");
SerialUSB.print(R0_NH3);
SerialUSB.print('\t');
SerialUSB.print(R0_CO);
SerialUSB.print('\t');
SerialUSB.println(R0_NO2);
SerialUSB.println("Rs:");
SerialUSB.print(Rs_NH3);
SerialUSB.print('\t');
SerialUSB.print(Rs_CO);
SerialUSB.print('\t');
SerialUSB.println(Rs_NO2);
SerialUSB.println("ratio:");
SerialUSB.print(ratio_NH3);
SerialUSB.print('\t');
SerialUSB.print(ratio_CO);
SerialUSB.print('\t');
SerialUSB.println(ratio_NO2);
SerialUSB.println("------------------------");
delay(1000);
}
[/code]