Skip to content

Commit

Permalink
esp compat
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewg42 committed Dec 8, 2017
1 parent b2b7740 commit fc2ec75
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
11 changes: 9 additions & 2 deletions examples/DiscretePot/DiscretePot.ino
Expand Up @@ -13,10 +13,15 @@ DiscretePot PotReversed(AnalogPin);
void setup()
{
Serial.begin(115200);
Serial.println("\n\nsetup() start");

// Show we can handle Millis wrap
addMillisOffset(0xFFFFF000);

Pot.begin(0, 10);
PotReversed.begin(0, 10, true);
delay(300);
Serial.println("setup() complete");
Serial.println("setup() end");
}

void loop()
Expand All @@ -25,7 +30,9 @@ void loop()
PotReversed.update();

if (DoEvery(OutputMs, LastDb)) {
Serial.print("analog value=");
Serial.print("Millis=0x");
Serial.print(Millis());
Serial.print(" analog value=");
Serial.print(analogRead(AnalogPin));
Serial.print(" Pot.value()=");
Serial.print(Pot.value());
Expand Down
26 changes: 26 additions & 0 deletions examples/DiscretePot/Makefile.esp
@@ -0,0 +1,26 @@
# Compile options
BUILD_EXTRA_FLAGS += -DDEBUG
#BUILD_EXTRA_FLAGS += -DMUTILA_DEBUG
#BUILD_EXTRA_FLAGS += -DDEBUG_OUTPUT=Serial

# Supported speeds: 921600 460800 230400 115200 57600 9600
UPLOAD_SPEED = 921600

# Set for your hardware
# For NodeMCU 0.9 (ESP-12 Module) (e.g. NodeMCU Amica used in CheeseBoard: Cheddar)
BOARD = nodemcu

# For NodeMCU 1.0 (ESP-12E Module)
#BOARD = nodemcuv2

# For Node32-S (ESP32):
#CHIP = esp32
#BOARD = node32s

# For Wemos Lolin 32
#UPLOAD_SPEED=115200
#CHIP = esp32
#BOARD = lolin32

include ../esp.mk

0 comments on commit fc2ec75

Please sign in to comment.