From 85da32886cd0e419bf81a8bd24485cb73a5c70ee Mon Sep 17 00:00:00 2001 From: coolneng Date: Fri, 15 Nov 2019 23:54:28 +0100 Subject: [PATCH] Add Photoresistor code --- .../Photoresistor.arduino.avr.uno.elf | Bin 0 -> 19048 bytes .../Photoresistor.arduino.avr.uno.hex | 85 ++++++++++++++++++ Photoresistor/Photoresistor.ino | 15 ++++ 3 files changed, 100 insertions(+) create mode 100755 Photoresistor/Photoresistor.arduino.avr.uno.elf create mode 100644 Photoresistor/Photoresistor.arduino.avr.uno.hex create mode 100644 Photoresistor/Photoresistor.ino diff --git a/Photoresistor/Photoresistor.arduino.avr.uno.elf b/Photoresistor/Photoresistor.arduino.avr.uno.elf new file mode 100755 index 0000000000000000000000000000000000000000..80a7e4a29f1ad73a7577a391c54444c2b67567ab GIT binary patch literal 19048 zcmd6Pdwd+lm2UMsq>&}-VH?}XmL*w2mLD38WcdLY+p;7Z`6We?vB{DhM$$+cEX^pI zksl=3vN1$B1X~^{yt0uYECG^$!9Z97u|vGsBzt3%$KDN_dxKz|Y?8|bYk@VpA*=g+ zRo$bSwv)~MEq~BISJgS+Id$sPsp{&knwIz1ZC-B}hOjP&XciV%1@QC+A>1gdM1gRK zQjsGvr95U;KzR)mn5gGKV*Mw{7y~MSOhZZ`gp@IS6Vl%QMoKsSocd_WBOGYa=}HBi zxUND!7E7*JED(!?%e)-&a>~naxIEbfYX?-R@|@!QZ=ZYT=VQM-^`lccW5>sy9{b%t zzdzQsRoM#U zl$`dBtS(w5EiUjqexcO&gA2vJ`ilcY1LDYS&eO8oJrExdub(^g+>zafUj7Bk+kSs; zVCaN60?7&S6Gh+l@8?!8{-<+m;N`%O+c-LuVjLezHBJn9jFRUbd(eHle9e^?j4wWv z_jKNxQ!kc3UVdNs;DVQo9~rG#pUyjwHq)!#5<1qOqc^vK2etSJn&Sm}hZl#i134R@`OS zJyMzjarhaBpK`zPo23?F*# z;LV3#KJ?rHgws_-k(O8o=u;kNAjDN`iTm9&iu2AA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z(WJ$vgV*cNvhhV4&-(m|ezN}fM2#k=e_YY@_HMSxciQ;f;B|XN z{yN1dc-HY9@%)n`zIE_Ckn#Q-+DnXwA=}dHb8TP< zd9l6UQXlnrkr(h)*T*KkxzT^U->-VG-Nt&=e8NjL|^rQ|)sl`wvb+kR$5#R}5B7}6Yxqide>XvOy zb(iT1kH`{3A)Af#?v;j7k%3SFlIMa6qZ}g4w`hpt(-jQ#COe_^g$mo6>ze+g4^}uC zLhI0ueycIDMo4+8dYhQk(1N^er|<_E46u_E)gKFlx+hJpq)@L|SJ&9ou;nr_v3$^H zqHod=4iwGMTdr9Z*u;8t_cAtH>UOkT2DZBH!$TsvwDN< ztbINF&_;N}kyy~%8SeMuY~9-)+!bmIhQb|OO@cU5$JZi(Fuv%q*d$SFYhQ4eCE*=u z(O8^%5)53h@a{;PMVe;i!v1GubD+bgkbE}a`62&*9<82wLJ9d7ilnWbMhvv|K1Fr) zB*7PCp!pcp?diJ>%ia>`kVbUn#dh(ZFeEO@n79wncQdD z8el%!#iwj~r7*sjn-lZ0s)WE>G)2w1_zNh@h$h>u(bQX4B*eQ~hbb+Dc#4}o;EE|v7^upH&@hU5rm!-$p%P}+Yj1Aa- pSV|}@J(kv3Q@j>`?ROfn&IY{*iLR1n2y}a59nKOkcGhLt`+u#w`i%ep literal 0 HcmV?d00001 diff --git a/Photoresistor/Photoresistor.arduino.avr.uno.hex b/Photoresistor/Photoresistor.arduino.avr.uno.hex new file mode 100644 index 0000000..56d22ea --- /dev/null +++ b/Photoresistor/Photoresistor.arduino.avr.uno.hex @@ -0,0 +1,85 @@ +:100000000C945C000C9479000C9479000C947900A9 +:100010000C9479000C9479000C9479000C9479007C +:100020000C9479000C9479000C9479000C9479006C +:100030000C9479000C9479000C9479000C9479005C +:100040000C940B010C9479000C9479000C947900B9 +:100050000C9479000C9479000C9479000C9479003C +:100060000C9479000C947900000000080002010053 +:100070000003040700000000000000000000000072 +:10008000250028002B0000000000240027002A0083 +:10009000040404040404040402020202020203032E +:1000A0000303030301020408102040800102040836 +:1000B000102001020408102011241FBECFEFD8E049 +:1000C000DEBFCDBF11E0A0E0B1E0EAE3F5E002C0A1 +:1000D00005900D92A030B107D9F721E0A0E0B1E082 +:1000E00001C01D92A930B207E1F70E9455010C949E +:1000F0009B020C94000090E0FC01EC55FF4F249112 +:1001000080579F4FFC018491882399F090E0880FDD +:10011000991FFC01EA57FF4FA591B491FC01E458E7 +:10012000FF4F859194918FB7F894EC91E22BEC936B +:100130008FBF089590E0FC01E859FF4F2491FC0126 +:10014000EC55FF4F3491FC01E057FF4FE491EE2353 +:10015000C9F0222339F0233001F1A8F4213019F13C +:10016000223029F1F0E0EE0FFF1FE458FF4FA59178 +:10017000B4918FB7F894EC91611126C030953E236D +:100180003C938FBF08952730A9F02830C9F0243060 +:1001900049F7809180008F7D03C0809180008F7728 +:1001A00080938000DFCF84B58F7784BDDBCF84B5AB +:1001B0008F7DFBCF8091B0008F778093B000D2CF3E +:1001C0008091B0008F7DF9CF3E2BDACF3FB7F89406 +:1001D0008091050190910601A0910701B09108015D +:1001E00026B5A89B05C02F3F19F00196A11DB11D92 +:1001F0003FBFBA2FA92F982F8827BC01CD01620FCE +:10020000711D811D911D42E0660F771F881F991F88 +:100210004A95D1F708951F920F920FB60F921124AD +:100220002F933F938F939F93AF93BF93809101013F +:1002300090910201A0910301B0910401309100015D +:1002400023E0230F2D3758F50196A11DB11D2093F2 +:1002500000018093010190930201A0930301B093E8 +:1002600004018091050190910601A0910701B091D0 +:1002700008010196A11DB11D80930501909306010F +:10028000A0930701B0930801BF91AF919F918F9107 +:100290003F912F910F900FBE0F901F90189526E859 +:1002A000230F0296A11DB11DD2CF789484B5826030 +:1002B00084BD84B5816084BD85B5826085BD85B50A +:1002C000816085BD80916E00816080936E00109288 +:1002D0008100809181008260809381008091810003 +:1002E0008160809381008091800081608093800094 +:1002F0008091B10084608093B1008091B0008160F2 +:100300008093B00080917A00846080937A0080911D +:100310007A00826080937A0080917A008160809375 +:100320007A0080917A00806880937A001092C100F0 +:1003300089E00E947B0090E4392E44244A9423E013 +:10034000522E612C712C01E710E0C0E0D0E0309219 +:100350007C0080917A00806480937A0080917A009A +:1003600086FDFCCF80917800A0917900BA2FA82F4C +:100370002FEF30E00E949402A30192010E944402F8 +:10038000D22EC32EE22EF32E89E00E947B00E114D0 +:10039000F10471F560E089E00E949A000E94E60095 +:1003A0004B015C0184E6C82ED12CE12CF12C0E947B +:1003B000E600681979098A099B09683E734081053E +:1003C0009105A8F321E0C21AD108E108F10888EEEE +:1003D000880E83E0981EA11CB11CC114D104E10455 +:1003E000F10429F7209709F4B2CF0E940000AFCFA3 +:1003F0002FEFE216F10411F461E0CDCFF801849102 +:10040000833031F148F48130C9F08230E1F0F0E816 +:10041000EF16F1048CF7BECF873031F1883061F1EF +:100420008430A9F7809180008062809380008D2DB8 +:100430009C2D90938B0080938A00B0CF84B5806808 +:1004400084BDD7BCABCF84B5806284BDD8BCA6CFF9 +:10045000809180008068809380008D2D9C2D9093EA +:100460008900809388009ACF8091B0008068809343 +:10047000B000D092B30092CF8091B00080628093A0 +:10048000B000D092B4008ACF052E97FB1EF40094E2 +:100490000E945B0257FD07D00E94630207FC03D055 +:1004A0004EF40C945B0250954095309521953F4F4A +:1004B0004F4F5F4F089590958095709561957F4F50 +:1004C0008F4F9F4F0895A1E21A2EAA1BBB1BFD015F +:1004D0000DC0AA1FBB1FEE1FFF1FA217B307E40723 +:1004E000F50720F0A21BB30BE40BF50B661F771F7B +:1004F000881F991F1A9469F760957095809590955B +:100500009B01AC01BD01CF010895A29FB001B39F33 +:10051000C001A39F700D811D1124911DB29F700D0C +:10052000811D1124911D08950E948502B7FF089531 +:0A053000821B930B0895F894FFCF8F +:00000001FF diff --git a/Photoresistor/Photoresistor.ino b/Photoresistor/Photoresistor.ino new file mode 100644 index 0000000..07abdd4 --- /dev/null +++ b/Photoresistor/Photoresistor.ino @@ -0,0 +1,15 @@ +// Photoresistor +int sensorPIN = A0; +int LED = 9; +int sensorValue = 0; +int LEDValue = 0; +void setup() { + pinMode(LED, OUTPUT); +} + +void loop() { + sensorValue = analogRead(sensorPIN); + LEDValue = map(sensorValue, 0, 1023, 0, 255); + analogWrite(LED, LEDValue); + delay(100); +}