diff options
Diffstat (limited to 'examples/BlinkWithoutDelay/build-cli')
27 files changed, 152 insertions, 0 deletions
diff --git a/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.cpp b/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.cpp new file mode 100644 index 0000000..c8f34b6 --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.cpp @@ -0,0 +1,66 @@ +#include <Arduino.h> +/* Blink without Delay + + Turns on and off a light emitting diode(LED) connected to a digital + pin, without using the delay() function. This means that other code + can run at the same time without being interrupted by the LED code. + + The circuit: + * LED attached from pin 13 to ground. + * Note: on most Arduinos, there is already an LED on the board + that's attached to pin 13, so no hardware is needed for this example. + + + created 2005 + by David A. Mellis + modified 8 Feb 2010 + by Paul Stoffregen + + This example code is in the public domain. + + + http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay + */ + +// constants won't change. Used here to +// set pin numbers: +const int ledPin = 13; // the number of the LED pin + +// Variables will change: +int ledState = LOW; // ledState used to set the LED +long previousMillis = 0; // will store last time LED was updated + +// the follow variables is a long because the time, measured in miliseconds, +// will quickly become a bigger number than can be stored in an int. +long interval = 1000; // interval at which to blink (milliseconds) + +void setup() { + // set the digital pin as output: + pinMode(ledPin, OUTPUT); +} + +void loop() +{ + // here is where you'd put code that needs to be running all the time. + + // check to see if it's time to blink the LED; that is, if the + // difference between the current time and last time you blinked + // the LED is bigger than the interval at which you want to + // blink the LED. + unsigned long currentMillis = millis(); + + if(currentMillis - previousMillis > interval) { + // save the last time you blinked the LED + previousMillis = currentMillis; + + // if the LED is off turn it on and vice-versa: + if (ledState == LOW) + ledState = HIGH; + else + ledState = LOW; + + // set the LED with the ledState of the variable: + digitalWrite(ledPin, ledState); + } +} + diff --git a/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.d b/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.d new file mode 100644 index 0000000..b0056e7 --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.d @@ -0,0 +1,11 @@ +build-cli/BlinkWithoutDelay.o: build-cli/BlinkWithoutDelay.cpp \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/binary.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WCharacter.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WString.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Printable.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/new.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard/pins_arduino.h diff --git a/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.elf b/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.elf Binary files differnew file mode 100755 index 0000000..0a28fac --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.elf diff --git a/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.hex b/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.hex new file mode 100644 index 0000000..80ecfc7 --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.hex @@ -0,0 +1,64 @@ +:100000000C9461000C947E000C947E000C947E0095
+:100010000C947E000C947E000C947E000C947E0068
+:100020000C947E000C947E000C947E000C947E0058
+:100030000C947E000C947E000C947E000C947E0048
+:100040000C94CE000C947E000C947E000C947E00E8
+:100050000C947E000C947E000C947E000C947E0028
+:100060000C947E000C947E00000000002400270009
+:100070002A0000000000250028002B0000000000DE
+:1000800023002600290004040404040404040202DA
+:100090000202020203030303030301020408102007
+:1000A0004080010204081020010204081020000012
+:1000B0000007000201000003040600000000000029
+:1000C000000011241FBECFEFD8E0DEBFCDBF11E08E
+:1000D000A0E0B1E0E4EDF3E002C005900D92A430A1
+:1000E000B107D9F711E0A4E0B1E001C01D92A3313E
+:1000F000B107E1F70E94D9010C9480000C94000034
+:10010000F8940C94E801EF92FF920F931F930E94D2
+:1001100016017B018C018091060190910701A0914D
+:100120000801B0910901A8019701281B390B4A0B5E
+:100130005B0B8091000190910101A0910201B091AF
+:10014000030182179307A407B507F0F4E0920601B4
+:10015000F0920701009308011093090180910401B6
+:1001600090910501892B39F481E090E0909305018D
+:100170008093040104C010920501109204018DE0E7
+:10018000609104010E9485011F910F91FF90EF90F3
+:1001900008958DE061E00E945F0108951F920F9223
+:1001A0000FB60F9211242F933F938F939F93AF938A
+:1001B000BF9380910E0190910F01A0911001B09119
+:1001C0001101309112010196A11DB11D232F2D5F48
+:1001D0002D3720F02D570196A11DB11D209312013E
+:1001E00080930E0190930F01A0931001B093110121
+:1001F00080910A0190910B01A0910C01B0910D0129
+:100200000196A11DB11D80930A0190930B01A0934B
+:100210000C01B0930D01BF91AF919F918F913F91D0
+:100220002F910F900FBE0F901F9018958FB7F894D5
+:1002300020910E0130910F01409110015091110158
+:100240008FBFB901CA010895789484B5826084BDD6
+:1002500084B5816084BD85B5826085BD85B58160CA
+:1002600085BDEEE6F0E0808181608083E1E8F0E02A
+:100270001082808182608083808181608083E0E859
+:10028000F0E0808181608083E1EBF0E08081846038
+:100290008083E0EBF0E0808181608083EAE7F0E03A
+:1002A000808184608083808182608083808181609E
+:1002B00080838081806880831092C1000895482FD8
+:1002C00050E0CA0186569F4FFC0124914A575F4F68
+:1002D000FA0184918823C1F0E82FF0E0EE0FFF1FB0
+:1002E000E859FF4FA591B491662341F49FB7F89464
+:1002F0008C91209582238C939FBF08959FB7F8948B
+:100300008C91822B8C939FBF0895482F50E0CA0197
+:1003100082559F4FFC012491CA0186569F4FFC01D4
+:1003200094914A575F4FFA013491332309F440C046
+:10033000222351F1233071F0243028F42130A1F030
+:10034000223011F514C02630B1F02730C1F024302E
+:10035000D9F404C0809180008F7703C08091800021
+:100360008F7D8093800010C084B58F7702C084B5E4
+:100370008F7D84BD09C08091B0008F7703C08091CC
+:10038000B0008F7D8093B000E32FF0E0EE0FFF1FF1
+:10039000EE58FF4FA591B4912FB7F894662321F43E
+:1003A0008C919095892302C08C91892B8C932FBFBF
+:1003B0000895CF93DF930E9424010E94C900C0E0FA
+:1003C000D0E00E9483002097E1F30E940000F9CF63
+:0403D000F894FFCFCF
+:0403D400E80300003A
+:00000001FF
diff --git a/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.o b/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.o Binary files differnew file mode 100644 index 0000000..6d42b87 --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.o diff --git a/examples/BlinkWithoutDelay/build-cli/CDC.o b/examples/BlinkWithoutDelay/build-cli/CDC.o Binary files differnew file mode 100644 index 0000000..824599f --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/CDC.o diff --git a/examples/BlinkWithoutDelay/build-cli/HID.o b/examples/BlinkWithoutDelay/build-cli/HID.o Binary files differnew file mode 100644 index 0000000..0774dd5 --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/HID.o diff --git a/examples/BlinkWithoutDelay/build-cli/HardwareSerial.o b/examples/BlinkWithoutDelay/build-cli/HardwareSerial.o Binary files differnew file mode 100644 index 0000000..e904ad8 --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/HardwareSerial.o diff --git a/examples/BlinkWithoutDelay/build-cli/IPAddress.o b/examples/BlinkWithoutDelay/build-cli/IPAddress.o Binary files differnew file mode 100644 index 0000000..1128ca7 --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/IPAddress.o diff --git a/examples/BlinkWithoutDelay/build-cli/Print.o b/examples/BlinkWithoutDelay/build-cli/Print.o Binary files differnew file mode 100644 index 0000000..a48b528 --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/Print.o diff --git a/examples/BlinkWithoutDelay/build-cli/Stream.o b/examples/BlinkWithoutDelay/build-cli/Stream.o Binary files differnew file mode 100644 index 0000000..9498c6f --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/Stream.o diff --git a/examples/BlinkWithoutDelay/build-cli/Tone.o b/examples/BlinkWithoutDelay/build-cli/Tone.o Binary files differnew file mode 100644 index 0000000..554ecb8 --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/Tone.o diff --git a/examples/BlinkWithoutDelay/build-cli/USBCore.o b/examples/BlinkWithoutDelay/build-cli/USBCore.o Binary files differnew file mode 100644 index 0000000..ed7cf51 --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/USBCore.o diff --git a/examples/BlinkWithoutDelay/build-cli/WInterrupts.o b/examples/BlinkWithoutDelay/build-cli/WInterrupts.o Binary files differnew file mode 100644 index 0000000..ce3ad36 --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/WInterrupts.o diff --git a/examples/BlinkWithoutDelay/build-cli/WMath.o b/examples/BlinkWithoutDelay/build-cli/WMath.o Binary files differnew file mode 100644 index 0000000..ff1923b --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/WMath.o diff --git a/examples/BlinkWithoutDelay/build-cli/WString.o b/examples/BlinkWithoutDelay/build-cli/WString.o Binary files differnew file mode 100644 index 0000000..b8dc5b8 --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/WString.o diff --git a/examples/BlinkWithoutDelay/build-cli/a.out.elf b/examples/BlinkWithoutDelay/build-cli/a.out.elf Binary files differnew file mode 100755 index 0000000..0a28fac --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/a.out.elf diff --git a/examples/BlinkWithoutDelay/build-cli/depends.mk b/examples/BlinkWithoutDelay/build-cli/depends.mk new file mode 100644 index 0000000..b0056e7 --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/depends.mk @@ -0,0 +1,11 @@ +build-cli/BlinkWithoutDelay.o: build-cli/BlinkWithoutDelay.cpp \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/binary.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WCharacter.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WString.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Printable.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/new.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard/pins_arduino.h diff --git a/examples/BlinkWithoutDelay/build-cli/libcore.a b/examples/BlinkWithoutDelay/build-cli/libcore.a Binary files differnew file mode 100644 index 0000000..7decf6b --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/libcore.a diff --git a/examples/BlinkWithoutDelay/build-cli/libs/EEPROM/EEPROM.o b/examples/BlinkWithoutDelay/build-cli/libs/EEPROM/EEPROM.o Binary files differnew file mode 100644 index 0000000..cc98581 --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/libs/EEPROM/EEPROM.o diff --git a/examples/BlinkWithoutDelay/build-cli/main.o b/examples/BlinkWithoutDelay/build-cli/main.o Binary files differnew file mode 100644 index 0000000..651e629 --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/main.o diff --git a/examples/BlinkWithoutDelay/build-cli/new.o b/examples/BlinkWithoutDelay/build-cli/new.o Binary files differnew file mode 100644 index 0000000..a42daf2 --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/new.o diff --git a/examples/BlinkWithoutDelay/build-cli/wiring.o b/examples/BlinkWithoutDelay/build-cli/wiring.o Binary files differnew file mode 100644 index 0000000..965331b --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/wiring.o diff --git a/examples/BlinkWithoutDelay/build-cli/wiring_analog.o b/examples/BlinkWithoutDelay/build-cli/wiring_analog.o Binary files differnew file mode 100644 index 0000000..45c4457 --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/wiring_analog.o diff --git a/examples/BlinkWithoutDelay/build-cli/wiring_digital.o b/examples/BlinkWithoutDelay/build-cli/wiring_digital.o Binary files differnew file mode 100644 index 0000000..474a1cc --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/wiring_digital.o diff --git a/examples/BlinkWithoutDelay/build-cli/wiring_pulse.o b/examples/BlinkWithoutDelay/build-cli/wiring_pulse.o Binary files differnew file mode 100644 index 0000000..6c131da --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/wiring_pulse.o diff --git a/examples/BlinkWithoutDelay/build-cli/wiring_shift.o b/examples/BlinkWithoutDelay/build-cli/wiring_shift.o Binary files differnew file mode 100644 index 0000000..7101968 --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/wiring_shift.o |
