kopia lustrzana https://github.com/pimoroni/pimoroni-pico
Fixed namespace error with pmw examples.
rodzic
27b74e140b
commit
d08e790e9d
|
@ -2,17 +2,22 @@
|
||||||
#include "pico/stdlib.h"
|
#include "pico/stdlib.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
// Uncomment the below line to switch from the PMW3901 to the PAA5100
|
||||||
|
//#define USE_PAA5100
|
||||||
|
|
||||||
|
#ifndef USE_PAA5100
|
||||||
|
#include "breakout_pmw3901.hpp"
|
||||||
|
#else
|
||||||
|
#include "breakout_paa5100.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace pimoroni;
|
using namespace pimoroni;
|
||||||
|
|
||||||
// Pick *one* sensor type by uncommenting the relevant lines below:
|
#ifndef USE_PAA5100
|
||||||
|
typedef BreakoutPMW3901 FlowSensor;
|
||||||
// PMW3901
|
#else
|
||||||
#include "breakout_pmw3901.hpp"
|
typedef BreakoutPAA5100 FlowSensor;
|
||||||
typedef BreakoutPMW3901 FlowSensor;
|
#endif
|
||||||
|
|
||||||
// PAA5100
|
|
||||||
//include "breakout_paa5100.hpp"
|
|
||||||
//typedef BreakoutPAA5100 FlowSensor;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,22 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "pico/stdlib.h"
|
#include "pico/stdlib.h"
|
||||||
|
|
||||||
|
// Uncomment the below line to switch from the PMW3901 to the PAA5100
|
||||||
|
//#define USE_PAA5100
|
||||||
|
|
||||||
|
#ifndef USE_PAA5100
|
||||||
|
#include "breakout_pmw3901.hpp"
|
||||||
|
#else
|
||||||
|
#include "breakout_paa5100.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace pimoroni;
|
using namespace pimoroni;
|
||||||
|
|
||||||
// Pick *one* sensor type by uncommenting the relevant lines below:
|
#ifndef USE_PAA5100
|
||||||
|
typedef BreakoutPMW3901 FlowSensor;
|
||||||
// PMW3901
|
#else
|
||||||
#include "breakout_pmw3901.hpp"
|
typedef BreakoutPAA5100 FlowSensor;
|
||||||
typedef BreakoutPMW3901 FlowSensor;
|
#endif
|
||||||
|
|
||||||
// PAA5100
|
|
||||||
//include "breakout_paa5100.hpp"
|
|
||||||
//typedef BreakoutPAA5100 FlowSensor;
|
|
||||||
|
|
||||||
FlowSensor flo(BG_SPI_FRONT);
|
FlowSensor flo(BG_SPI_FRONT);
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue