mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
Merge remote-tracking branch 'arduino/ide-1.5.x' into ide-1.5.x-discovery
This commit is contained in:
@ -19,16 +19,18 @@
|
||||
by David A. Mellis
|
||||
modified 30 Aug 2011
|
||||
by Limor Fried
|
||||
modified 28 Dec 2012
|
||||
by Mike Walters
|
||||
|
||||
This example code is in the public domain.
|
||||
This example code is in the public domain.
|
||||
|
||||
http://www.arduino.cc/en/Tutorial/Debounce
|
||||
*/
|
||||
|
||||
// constants won't change. They're used here to
|
||||
// set pin numbers:
|
||||
const int buttonPin = 2; // the number of the pushbutton pin
|
||||
const int ledPin = 13; // the number of the LED pin
|
||||
const int buttonPin = 2; // the number of the pushbutton pin
|
||||
const int ledPin = 13; // the number of the LED pin
|
||||
|
||||
// Variables will change:
|
||||
int ledState = HIGH; // the current state of the output pin
|
||||
@ -43,6 +45,9 @@ long debounceDelay = 50; // the debounce time; increase if the output flicker
|
||||
void setup() {
|
||||
pinMode(buttonPin, INPUT);
|
||||
pinMode(ledPin, OUTPUT);
|
||||
|
||||
// set initial LED state
|
||||
digitalWrite(ledPin, ledState);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
@ -62,11 +67,20 @@ void loop() {
|
||||
if ((millis() - lastDebounceTime) > debounceDelay) {
|
||||
// whatever the reading is at, it's been there for longer
|
||||
// than the debounce delay, so take it as the actual current state:
|
||||
buttonState = reading;
|
||||
|
||||
// if the button state has changed:
|
||||
if (reading != buttonState) {
|
||||
buttonState = reading;
|
||||
|
||||
// only toggle the LED if the new button state is HIGH
|
||||
if (buttonState == HIGH) {
|
||||
ledState = !ledState;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// set the LED using the state of the button:
|
||||
digitalWrite(ledPin, buttonState);
|
||||
// set the LED:
|
||||
digitalWrite(ledPin, ledState);
|
||||
|
||||
// save the reading. Next time through the loop,
|
||||
// it'll be the lastButtonState:
|
||||
|
@ -19,7 +19,7 @@
|
||||
http://www.arduino.cc/en/Tutorial/KeyboardButton
|
||||
*/
|
||||
|
||||
const int buttonPin = 2; // input pin for pushbutton
|
||||
const int buttonPin = 4; // input pin for pushbutton
|
||||
int previousButtonState = HIGH; // for checking the state of a pushButton
|
||||
int counter = 0; // button push counter
|
||||
|
||||
|
BIN
build/shared/lib/arduino_icon.ico
Executable file
BIN
build/shared/lib/arduino_icon.ico
Executable file
Binary file not shown.
After Width: | Height: | Size: 359 KiB |
@ -184,6 +184,8 @@ parseInt KEYWORD2
|
||||
parseFloat KEYWORD2
|
||||
readBytes KEYWORD2
|
||||
readBytesUntil KEYWORD2
|
||||
readString KEYWORD2
|
||||
readStringUntil KEYWORD2
|
||||
|
||||
# USB-related keywords
|
||||
|
||||
|
@ -98,22 +98,32 @@ ARDUINO 1.5 BETA - 2012.10.22
|
||||
* For more info refer to this press release:
|
||||
http://arduino.cc/blog/2012/10/22/arduino-1-5-support-for-the-due-and-other-processors-easier-library-installation-simplified-board-menu-etc/
|
||||
|
||||
ARDUINO 1.0.5 - 2013.03.29
|
||||
ARDUINO 1.0.5 - 2013.05.15
|
||||
|
||||
[core]
|
||||
|
||||
* [avr] malloc bug: backported avr-libc 1.8.0 implementation
|
||||
* [avr] removed deprecated interrupt handlers causing compiler issues
|
||||
with newer avr-gcc.
|
||||
* [avr] added c_str() method to String
|
||||
* [avr] Stream "_timeout" field and related methods are now protected
|
||||
|
||||
[libraries]
|
||||
|
||||
* Upgrades to WiFi library
|
||||
* Fixed a bunch of examples
|
||||
|
||||
[firmwares]
|
||||
|
||||
* Upgrades to WiFi firmwares
|
||||
|
||||
[ide]
|
||||
|
||||
* Backport from 1.5: install Library from .zip file or folder
|
||||
* Added button "Copy error to clipboard" (Paul Stoffregen)
|
||||
* Updated windows drivers
|
||||
* Added Windows installer
|
||||
|
||||
ARDUINO 1.0.4 - 2013.03.11
|
||||
|
||||
[core]
|
||||
|
Reference in New Issue
Block a user