Add Button code
This commit is contained in:
parent
8d3687bafc
commit
8d1cb5372d
Binary file not shown.
|
@ -0,0 +1,57 @@
|
||||||
|
:100000000C9461000C9473000C9473000C947300B6
|
||||||
|
:100010000C9473000C9473000C9473000C94730094
|
||||||
|
:100020000C9473000C9473000C9473000C94730084
|
||||||
|
:100030000C9473000C9473000C9473000C94730074
|
||||||
|
:100040000C94C9000C9473000C9473000C9473000E
|
||||||
|
:100050000C9473000C9473000C9473000C94730054
|
||||||
|
:100060000C9473000C94730000000000240027001F
|
||||||
|
:100070002A000000000023002600290000000000E4
|
||||||
|
:10008000250028002B0004040404040404040202D4
|
||||||
|
:100090000202020203030303030301020408102007
|
||||||
|
:1000A0004080010204081020010204081020000012
|
||||||
|
:1000B0000008000201000003040700000000000027
|
||||||
|
:1000C000000011241FBECFEFD8E0DEBFCDBF21E07E
|
||||||
|
:1000D000A0E0B1E001C01D92A930B207E1F70E9493
|
||||||
|
:1000E00013010C94BC010C940000833081F028F4BF
|
||||||
|
:1000F000813099F08230A9F008958730A9F08830D6
|
||||||
|
:10010000C9F08430B1F4809180008F7D03C080916C
|
||||||
|
:1001100080008F7780938000089584B58F7784BDA9
|
||||||
|
:10012000089584B58F7DFBCF8091B0008F77809349
|
||||||
|
:10013000B00008958091B0008F7DF9CF1F93CF93C9
|
||||||
|
:10014000DF93E1EBF0E09491EDE9F0E0D491E9E8A0
|
||||||
|
:10015000F0E0C491CC23B9F0182F992319F0892F1E
|
||||||
|
:100160000E947500EC2FF0E0EE0FFF1FE458FF4FE8
|
||||||
|
:10017000A591B4918FB7F894EC91111108C0D09566
|
||||||
|
:10018000DE23DC938FBFDF91CF911F910895DE2B8B
|
||||||
|
:10019000F8CF1F920F920FB60F9211242F933F9317
|
||||||
|
:1001A0008F939F93AF93BF93809105019091060128
|
||||||
|
:1001B000A0910701B09108013091040123E0230FC1
|
||||||
|
:1001C0002D3758F50196A11DB11D20930401809390
|
||||||
|
:1001D000050190930601A0930701B0930801809157
|
||||||
|
:1001E000000190910101A0910201B09103010196DB
|
||||||
|
:1001F000A11DB11D8093000190930101A093020104
|
||||||
|
:10020000B0930301BF91AF919F918F913F912F9137
|
||||||
|
:100210000F900FBE0F901F90189526E8230F02969F
|
||||||
|
:10022000A11DB11DD2CF789484B5826084BD84B500
|
||||||
|
:10023000816084BD85B5826085BD85B5816085BDE1
|
||||||
|
:1002400080916E00816080936E0010928100809199
|
||||||
|
:100250008100826080938100809181008160809321
|
||||||
|
:100260008100809180008160809380008091B10046
|
||||||
|
:1002700084608093B1008091B00081608093B00071
|
||||||
|
:1002800080917A00846080937A0080917A00826005
|
||||||
|
:1002900080937A0080917A00816080937A008091C7
|
||||||
|
:1002A0007A00806880937A001092C100EDE9F0E056
|
||||||
|
:1002B0002491E9E8F0E08491882399F090E0880F98
|
||||||
|
:1002C000991FFC01E859FF4FA591B491FC01E45836
|
||||||
|
:1002D000FF4F859194918FB7F894EC91E22BEC93BA
|
||||||
|
:1002E0008FBFC2EAD0E0FE0124910EE810E0F801D1
|
||||||
|
:1002F00084918823C9F090E0880F991FFC01E85988
|
||||||
|
:10030000FF4FA591B491FC01E458FF4F45915491E2
|
||||||
|
:100310003FB7F8949C91822F809598239C93FA0183
|
||||||
|
:100320009081892380833FBF96EBE92E90E0F92EE0
|
||||||
|
:1003300020E0C22E20E0D22EF7018491FE01A4908D
|
||||||
|
:10034000F801B490BB2079F081110E947500EB2D6B
|
||||||
|
:10035000F0E0EE0FFF1FEE58FF4FA591B4918C9186
|
||||||
|
:10036000A82281E009F480E00E949E00C114D1041B
|
||||||
|
:0C03700019F30E940000E0CFF894FFCFCA
|
||||||
|
:00000001FF
|
|
@ -0,0 +1,19 @@
|
||||||
|
//Button
|
||||||
|
#define BUTTON 8
|
||||||
|
#define LED 3
|
||||||
|
bool botonEncendido = false;
|
||||||
|
|
||||||
|
void setup() {
|
||||||
|
pinMode(LED, OUTPUT);
|
||||||
|
pinMode(BUTTON, INPUT);
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop() {
|
||||||
|
botonEncendido = digitalRead(BUTTON);
|
||||||
|
|
||||||
|
if(botonEncendido){
|
||||||
|
digitalWrite(LED, HIGH);
|
||||||
|
} else {
|
||||||
|
digitalWrite(LED, LOW);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue