Skip to content

Commit

Permalink
Add sample compilation rules
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisxhe committed Sep 25, 2023
1 parent d87219d commit e94feac
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
12 changes: 12 additions & 0 deletions examples/QMC6310_CompassExample/QMC6310_CompassExample.ino
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#include <Wire.h>
#include <SPI.h>
#include <Arduino.h>

#ifndef ARDUINO_ARCH_RP2040
#include "SensorQMC6310.hpp"
#include "SH1106Wire.h" //Oled display from https://github.com/ThingPulse/esp8266-oled-ssd1306

Expand Down Expand Up @@ -219,4 +221,14 @@ void loop()

delay(100);
}
#else
void setup()
{
Serial.begin(115200);
}

void loop()
{
Serial.println("display lib not support RP2040"); delay(1000);
}
#endif
11 changes: 11 additions & 0 deletions examples/QMI8658_BlockExample/QMI8658_BlockExample.ino
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <Arduino.h>
#include <Wire.h>
#include <SPI.h>
#ifndef ARDUINO_ARCH_RP2040
#include "SensorQMI8658.hpp"
#include <MadgwickAHRS.h> //MadgwickAHRS from https://github.com/arduino-libraries/MadgwickAHRS
#include "SH1106Wire.h" //Oled display from https://github.com/ThingPulse/esp8266-oled-ssd1306
Expand Down Expand Up @@ -246,6 +247,16 @@ void loop()
microsPrevious = microsPrevious + microsPerReading;
}
}
#else
void setup()
{
Serial.begin(115200);
}

void loop()
{
Serial.println("display lib not support RP2040"); delay(1000);
}
#endif


Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <Arduino.h>
#include <Wire.h>
#include <SPI.h>
#ifndef ARDUINO_ARCH_RP2040
#include "SensorQMI8658.hpp"
#include <MadgwickAHRS.h> //MadgwickAHRS from https://github.com/arduino-libraries/MadgwickAHRS
#include "SH1106Wire.h" //Oled display from https://github.com/ThingPulse/esp8266-oled-ssd1306
Expand Down Expand Up @@ -255,6 +256,17 @@ void loop()
microsPrevious = microsPrevious + microsPerReading;
}
}
#else
void setup()
{
Serial.begin(115200);
}

void loop()
{
Serial.println("display lib not support RP2040");
delay(1000);
}
#endif


0 comments on commit e94feac

Please sign in to comment.