Error compiling 'D4' was not declared in this scope
When i try to compile with pin D4 as the DHT pin, it doesn't compile and complains:
Using library Wire at version 1.0 in folder: /Users/dyim/Library/Arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/Wire Using library Adafruit_LiquidCrystal at version 1.0.0 in folder: /Users/dyim/Documents/Arduino/libraries/Adafruit_LiquidCrystal Using library DHT_sensor_library at version 1.2.3 in folder: /Users/dyim/Documents/Arduino/libraries/DHT_sensor_library exit status 1 'D4' was not declared in this scope
D4 is a constant, defined here: https://github.com/esp8266/Arduino/blob/master/variants/d1_mini/pins_arduino.h
The ESP8266 GPIO pins do not always line up with development board pin names. D4 == GPIO2
Try replacing D4 with 2
Thanks everything is working now.
From: Mike Causer [email protected] Reply-To: wemos/D1_mini_Examples [email protected] Date: Friday, July 8, 2016 at 11:39 PM To: wemos/D1_mini_Examples [email protected] Cc: David Yim [email protected], Author [email protected] Subject: Re: [wemos/D1_mini_Examples] Error compiling 'D4' was not declared in this scope (#21)
D4 is a constant, defined here: https://github.com/esp8266/Arduino/blob/master/variants/d1_mini/pins_arduino.h
The ESP8266 GPIO pins do not always line up with development board pin names. D4 == GPIO2
Try replacing D4 with 2
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/wemos/D1_mini_Examples/issues/21#issuecomment-231514815, or mute the threadhttps://github.com/notifications/unsubscribe/ADN3DPPivQORKMO9KsvT7gWOR54caApfks5qTyXugaJpZM4JIiW1.