Skip to content

Commit

Permalink
Enabling RMT breaks analogread.
Browse files Browse the repository at this point in the history
  • Loading branch information
marcmerlin committed Mar 28, 2017
1 parent 5e11b1d commit 305b9f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions IoTuz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ void IoTuz::begin()
// https://github.com/espressif/arduino-esp32/issues/286
irrecv.enableIRIn();

Serial.print("Analogread test before LEDs enabled, returns 1780 or so): ");
Serial.println(analogRead(JOYSTICK_X_PIN));
Serial.println(F("Turning on LEDs"));
#ifdef NEOPIXEL
// Tri-color APA106 LEDs Setup
Expand All @@ -383,6 +385,8 @@ void IoTuz::begin()
ws2812_setColors(NUMPIXELS, pixels);
Serial.println("After colors");
#endif
Serial.print("Analogread test after LEDs enabled, returns 3 if RMT is turned on): ");
Serial.println(analogRead(JOYSTICK_X_PIN));

// This is interesting to log in case the last setup hangs
Serial.println("IoTuz Setup done");
Expand Down
2 changes: 1 addition & 1 deletion IoTuz.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// MartyMacGyver/ESP32-Digital-RGB-LED-Drivers is not stable for me, so if you
// have crashes or problems, define this and RGB handling will switch to the adafruit
// Neopixel library. That library is not very good (LEDs can flicker) but it's stable.
#define NEOPIXEL
//#define NEOPIXEL

#ifndef IOTUZ_H
#define IOTUZ_H
Expand Down

0 comments on commit 305b9f7

Please sign in to comment.