adafruit / Adafruit_APDS9960

Arduino drivers for APDS9960 gesture sensor
Other
37 stars 45 forks source link

Tweak memory alloc and cleanup #34

Closed caternuson closed 3 years ago

caternuson commented 3 years ago

Tested on Qt PY:

#include "Adafruit_APDS9960.h"

Adafruit_APDS9960 apds;

void setup() {
  Serial.begin(9600);
  while(!Serial);

  Serial.println("APDS9960 multi begin() test.");
}

void loop() {
  if(!apds.begin()){
    Serial.println("Failed to initialize device! Please check your wiring.");
  }

  apds.enableProximity(true);

  delay(500);

  Serial.println(apds.readProximity());

  delay(500);
}

Screenshot from 2021-08-24 16-44-00