Revision 18e991a4

View differences:

firmware/demo/FeatherBase-BNO055_RGB_Haptics/FeatherBase-BNO055_RGB_Haptics.ino
53 53
// Uncomment to use BNO055 on address 0x29 instead of 0x28
54 54
//#define ADO 1
55 55

  
56
// use DRV2605 Haptics
56
// Which pin on the Arduino is connected to the WS2812 RGB LEDs?
57
// On ESP32, A3 is not output capable;
58
// quick fix is to hardware connect (e.g.) 21 to A3 and use 21
59
#define LED_PIN    A3
60
//#define LED_PIN 21
61

  
62
// use DRV2605 Haptics?
57 63
#define USE_DRV
58 64

  
59 65
#if defined(__MK20DX128__) || defined(__MK20DX256__)
......
69 75
#ifdef USE_DRV
70 76
#include <Adafruit_DRV2605.h>
71 77
Adafruit_DRV2605 drv;
72

  
73 78
#endif
74 79

  
75
// Which pin on the Arduino is connected to the NeoPixels?
76
// On a Trinket or Gemma we suggest changing this to 1:
77
#define LED_PIN    A1
78

  
79 80
// How many NeoPixels are attached to the Arduino?
80 81
#define LED_COUNT 2
81 82
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
......
431 432
  strip.setBrightness(100); // Set BRIGHTNESS to about 1/5 (max = 255)
432 433

  
433 434
#ifdef USE_DRV
435
  pinMode(A1, OUTPUT);
436
  digitalWrite(A1, HIGH);
437

  
434 438
  drv.selectLibrary(6);
435 439
  drv.useLRA();
436 440
  drv.setMode(DRV2605_MODE_REALTIME);
437
  pinMode(A3, OUTPUT);
438
  digitalWrite(A3, HIGH);
439 441
#endif
440 442

  
441 443
  delay(1000);

Also available in: Unified diff