diff --git a/Week 3/Relay-Motor/Relay-Motor.arduino.avr.uno.elf b/Week 3/Relay-Motor/Relay-Motor.arduino.avr.uno.elf new file mode 100755 index 0000000..939bc58 Binary files /dev/null and b/Week 3/Relay-Motor/Relay-Motor.arduino.avr.uno.elf differ diff --git a/Week 3/Relay-Motor/Relay-Motor.arduino.avr.uno.hex b/Week 3/Relay-Motor/Relay-Motor.arduino.avr.uno.hex new file mode 100644 index 0000000..73bfe5e --- /dev/null +++ b/Week 3/Relay-Motor/Relay-Motor.arduino.avr.uno.hex @@ -0,0 +1,171 @@ +:100000000C945D000C9485000C9485000C94850084 +:100010000C9485000C9485000C9485000C9485004C +:100020000C9485000C9485000C9485000C9485003C +:100030000C9485000C9485000C9485000C9485002C +:100040000C94D9020C9485000C94A7020C948102A4 +:100050000C9485000C9485000C9485000C9485000C +:100060000C9485000C9485000000000024002700FB +:100070002A0000000000250028002B0004040404CE +:100080000404040402020202020203030303030342 +:10009000010204081020408001020408102001021F +:1000A00004081020000000080002010000030407FB +:1000B0000000000000000000A80411241FBECFEFC4 +:1000C000D8E0DEBFCDBF11E0A0E0B1E0E0E7FAE0AC +:1000D00002C005900D92AC32B107D9F721E0ACE235 +:1000E000B1E001C01D92A83DB207E1F710E0CDE5F7 +:1000F000D0E004C02197FE010E943005CC35D10725 +:10010000C9F70E9423030C9436050C940000EDEA15 +:10011000F0E02491E9E9F0E09491E5E8F0E0E49181 +:10012000EE23C9F0222339F0233001F1A8F4213065 +:1001300019F1223029F1F0E0EE0FFF1FEE58FF4FCA +:10014000A591B4912FB7F894EC91811126C09095A8 +:100150009E239C932FBF08952730A9F02830C9F023 +:10016000243049F7209180002F7D03C0209180002A +:100170002F7720938000DFCF24B52F7724BDDBCFEE +:1001800024B52F7DFBCF2091B0002F772093B000B6 +:10019000D2CF2091B0002F7DF9CF9E2BDACFAF9236 +:1001A000BF92CF92DF92EF92FF920F931F93CF9364 +:1001B000DF936C017B018B01040F151FEB015E01C6 +:1001C000AE18BF08C017D10759F06991D601ED915B +:1001D000FC910190F081E02DC6010995892B79F7FA +:1001E000C501DF91CF911F910F91FF90EF90DF90AC +:1001F000CF90BF90AF900895FC01538D448D252F73 +:1002000030E0842F90E0821B930B541710F0CF96B0 +:10021000089501970895FC01918D828D981761F0E2 +:10022000A28DAE0FBF2FB11D5D968C91928D9F5FF9 +:100230009F73928F90E008958FEF9FEF0895FC01D8 +:10024000918D828D981731F0828DE80FF11D858D8B +:1002500090E008958FEF9FEF0895FC01918D228D1E +:10026000892F90E0805C9F4F821B91098F739927A3 +:1002700008958BE391E00E942D0121E0892B09F480 +:1002800020E0822F089580E090E0892B29F00E94E1 +:10029000390181110C9400000895FC01A48DA80F70 +:1002A000B92FB11DA35ABF4F2C91848D90E00196B8 +:1002B0008F739927848FA689B7892C93A089B189D8 +:1002C0008C91837080648C93938D848D981306C079 +:1002D0000288F389E02D80818F7D80830895EF92DD +:1002E000FF920F931F93CF93DF93EC0181E0888FF0 +:1002F0009B8D8C8D98131AC0E889F989808185FFC0 +:1003000015C09FB7F894EE89FF896083E889F98961 +:1003100080818370806480839FBF81E090E0DF9163 +:10032000CF911F910F91FF90EF900895F62E0B8DB6 +:1003300010E00F5F1F4F0F731127E02E8C8D8E1171 +:100340000CC00FB607FCFACFE889F989808185FFD8 +:10035000F5CFCE010E944D01F1CFEB8DEC0FFD2FBB +:10036000F11DE35AFF4FF0829FB7F8940B8FEA8993 +:10037000FB8980818062CFCFCF93DF93EC01888DA2 +:100380008823B9F0AA89BB89E889F9898C9185FD10 +:1003900003C0808186FD0DC00FB607FCF7CF8C919E +:1003A00085FFF2CF808185FFEDCFCE010E944D0108 +:1003B000E9CFDF91CF9108953FB7F8948091310153 +:1003C00090913201A0913301B091340126B5A89BE0 +:1003D00005C02F3F19F00196A11DB11D3FBFBA2FD7 +:1003E000A92F982F8827BC01CD01620F711D811D97 +:1003F000911D42E0660F771F881F991F4A95D1F71C +:100400000895FC0101900020E9F73197AF01481BE6 +:10041000590BBC018BE391E00C94CF008F929F921B +:10042000AF92BF920F931F93CF93DF93CDB7DEB7F9 +:10043000A1970FB6F894DEBF0FBECDBF19A2423010 +:1004400008F44AE08E010F5D1F4F842E912CB12CD1 +:10045000A12CA50194010E94FF04E62FB901CA0155 +:10046000EA30F4F4E05DD801EE938D01232B242BC8 +:10047000252B79F790E080E0109719F0CD010E94CC +:100480000102A1960FB6F894DEBF0FBECDBFDF917B +:10049000CF911F910F91BF90AF909F908F90089533 +:1004A000E95CE1CFCF92DF92EF92FF92CF93DF939F +:1004B0006B017C016DE28BE391E00E946F01EC0126 +:1004C00066277727CB016C197D098E099F094AE0C1 +:1004D0000E940E028C0F9D1FDF91CF91FF90EF9035 +:1004E000DF90CF900895CF93DF930E940102EC013B +:1004F00082E191E00E9401028C0F9D1FDF91CF915C +:1005000008951F920F920FB60F9211242F933F93CD +:100510004F935F936F937F938F939F93AF93BF930B +:10052000EF93FF938BE391E00E944D01FF91EF91D8 +:10053000BF91AF919F918F917F916F915F914F91FB +:100540003F912F910F900FBE0F901F9018951F9203 +:100550000F920FB60F9211242F938F939F93EF93C7 +:10056000FF93E0914B01F0914C018081E0915101AA +:10057000F091520182FD1BC09081809154018F5FE8 +:100580008F7320915501821741F0E0915401F0E002 +:10059000E55CFE4F958F80935401FF91EF919F9101 +:1005A0008F912F910F900FBE0F901F901895808103 +:1005B000F4CF1F920F920FB60F9211242F933F93F7 +:1005C0008F939F93AF93BF9380912D0190912E01B4 +:1005D000A0912F01B091300130912C0123E0230F25 +:1005E0002D3758F50196A11DB11D20932C01809344 +:1005F0002D0190932E01A0932F01B0933001809193 +:10060000310190913201A0913301B09134010196F2 +:10061000A11DB11D8093310190933201A09333014C +:10062000B0933401BF91AF919F918F913F912F91E2 +:100630000F900FBE0F901F90189526E8230F02967B +:10064000A11DB11DD2CF789484B5826084BD84B5DC +:10065000816084BD85B5826085BD85B5816085BDBD +:1006600080916E00816080936E0010928100809175 +:1006700081008260809381008091810081608093FD +:100680008100809180008160809380008091B10022 +:1006900084608093B1008091B00081608093B0004D +:1006A00080917A00846080937A0080917A008260E1 +:1006B00080937A0080917A00816080937A008091A3 +:1006C0007A00806880937A001092C100E0914B011B +:1006D000F0914C0182E08083E0914701F091480164 +:1006E0001082E0914901F0914A018FEC80831092D1 +:1006F0005301E0914F01F091500186E08083E09139 +:100700004D01F0914E01808180618083E0914D0127 +:10071000F0914E01808188608083E0914D01F091DD +:100720004E01808180688083E0914D01F0914E01FF +:1007300080818F7D808385E191E00E947302442453 +:100740004A9473E0572E612C712CE5E82E2EE0E0E0 +:100750003E2E0DEA10E0C0E0D0E020E420937C00C3 +:1007600080917A00806480937A0080917A0086FD7F +:10077000FCCF90917800809179008927982789276C +:10078000092E000CAA0BBB0B809337019093380104 +:10079000A0933901B0933A018DE191E00E94730278 +:1007A00060913701709138018091390190913A013F +:1007B00097FF80C00E94520282E191E00E940102F4 +:1007C00020913701309138014091390150913A011F +:1007D000AFEFB0E00E94F404A30192010E94D5049F +:1007E000A9013093360120933501E9E9F0E0F49056 +:1007F000F1018491882399F090E0880F991FFC0102 +:10080000E859FF4FA591B491FC01EE58FF4F659157 +:1008100074918FB7F8949C91F92AFC928FBF41157F +:10082000510509F04BC080E00E94870085E291E00D +:100830000E9473026091350170913601072E000C01 +:10084000880B990B97FF80C00E94520282E191E0D1 +:100850000E9401020E94DC014B015C0184EFC82E62 +:10086000DD24D394E12CF12C0E94DC016819790974 +:100870008A099B09683E734081059105A8F3F1E060 +:10088000CF1AD108E108F10828EE820E23E0921E6B +:10089000A11CB11CC114D104E104F10429F7209773 +:1008A00009F45BCF0E943901882309F456CF0E94D6 +:1008B000000053CF4AE00E940E027ECF4F3F510509 +:1008C00011F481E0B1CFF8018491833019F140F443 +:1008D0008130B1F08230C9F04038510594F7A3CF90 +:1008E000873011F1883041F18430B1F78091800078 +:1008F00080628093800030938B0020938A0096CF93 +:1009000084B5806884BD27BD91CF84B5806284BDE5 +:1009100028BD8CCF809180008068809380003093C8 +:1009200089002093880082CF8091B00080688093F6 +:10093000B0002093B3007ACF8091B00080628093A2 +:10094000B0002093B40072CF4AE00E940E027ECF26 +:10095000EBE3F1E01382128288EE93E0A0E0B0E0D6 +:1009600084839583A683B78384E091E09183808319 +:1009700085EC90E09587848784EC90E09787868764 +:1009800080EC90E0918B808B81EC90E0938B828B5C +:1009900082EC90E0958B848B86EC90E0978B868B35 +:1009A000118E128E138E148E0895052E97FB1EF451 +:1009B00000940E94EC0457FD07D00E94FF0407FC3E +:1009C00003D04EF40C94EC0450954095309521954D +:1009D0003F4F4F4F5F4F089590958095709561956B +:1009E0007F4F8F4F9F4F08950E942105A59F900D27 +:1009F000B49F900DA49F800D911D11240895A1E234 +:100A00001A2EAA1BBB1BFD010DC0AA1FBB1FEE1F88 +:100A1000FF1FA217B307E407F50720F0A21BB30BD3 +:100A2000E40BF50B661F771F881F991F1A9469F74F +:100A300060957095809590959B01AC01BD01CF01AB +:100A40000895A29FB001B39FC001A39F700D811DA7 +:100A50001124911DB29F700D811D1124911D0895C7 +:100A6000EE0FFF1F0590F491E02D0994F894FFCF4D +:100A7000000000006F01CF00FC00BC012D010B0144 +:100A80001F010D0A0054726F6C61736F0076616C08 +:0C0A90006F723A20006769726F3A200014 +:00000001FF diff --git a/Week 3/Relay-Motor/Relay-Motor.ino b/Week 3/Relay-Motor/Relay-Motor.ino new file mode 100644 index 0000000..01d4fac --- /dev/null +++ b/Week 3/Relay-Motor/Relay-Motor.ino @@ -0,0 +1,19 @@ +long val; +int spin; + +void setup() { + Serial.begin(9600); + Serial.println("Trolaso"); +} + +void loop() { + val = analogRead(A0); + Serial.println("valor: "); + Serial.println(val); + spin = map(val, 0, 1023, 0, 255); + + analogWrite(9, spin); + Serial.println("giro: "); + Serial.println(spin); + delay(500); +}