From 66bc1ba18fb222ffad08c92a2cc6ad43b7e41d2e Mon Sep 17 00:00:00 2001 From: coolneng Date: Fri, 15 Nov 2019 23:54:41 +0100 Subject: [PATCH] Add RGB with potentiometers code --- .../RGB-potentiometers.arduino.avr.uno.elf | Bin 0 -> 19296 bytes .../RGB-potentiometers.arduino.avr.uno.hex | 85 ++++++++++++++++++ RGB-potentiometers/RGB-potentiometers.ino | 22 +++++ 3 files changed, 107 insertions(+) create mode 100755 RGB-potentiometers/RGB-potentiometers.arduino.avr.uno.elf create mode 100644 RGB-potentiometers/RGB-potentiometers.arduino.avr.uno.hex create mode 100644 RGB-potentiometers/RGB-potentiometers.ino diff --git a/RGB-potentiometers/RGB-potentiometers.arduino.avr.uno.elf b/RGB-potentiometers/RGB-potentiometers.arduino.avr.uno.elf new file mode 100755 index 0000000000000000000000000000000000000000..59ece41d0d7b5f254e7bc3144b4180a22aabc40b GIT binary patch literal 19296 zcmd5^dw5*Mb)UO;C9N!358GfPKO|YQ{6edhEI$BaTb5*7*s_Ek7--sMC9R~5rCnvU zvJK%OW8)Y?u;sNN5E22UB;g~xUv1*xHvSsIM~c$Ix@U%tm(9| zcVvIbohJ@X?9aWk@U-!(ZIexZGxFrfY2*0ilT9~`93DCF%m;_x8F^#rJMjb0c}Cg# z?JL+?S*b=nfi}lSepB*;6Z1j?o|yPe?qnft(WnDz`dO7Xd_m7YNJG_3|cg4x$zQ?3L z!yWYFrT7=c(fBRGeRS_r!@YZteE*2D?HL8%vG>UHN8X1&!(zBsY2OU({o+5RkHj7Y z|Acr`@vun#N%8aX+nR^FhU3?Y;gM?uDU_i0eRvw0yTrkftA%H@@KEld+^2I7<(F2( z*TxUT$KsE~pNkKVWElrXvWii6;&E@|FngzGgRldrJ&Y9Gtj$ zY38Y?$8&HsJ~5u=z2gt_PKm=ghp%*P`!M6BoWmWijML^zTTf*JX&zlS>KiQ{UE9>u z_c8OJl;%P2Z= z-|Q!{j%U4>)m^x=aDU;Qg$0L0?_Y)X!?5!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@UC^qD+A+2@yywmcUCe)`CnrJPS|{5I0&zY`Z~x67<)>neyOhhvX$Ipo< z@K!qC@l%c~KI)9-jAINN(2hq^PJtYTk_QR;DUEiPW1T`+hd?Q35*Fh);Yb|4Y3ESM z!zq7fUoa5$cMJ}CBf{GiN%DUD^c{^kFnK1dp~28HFxIh66+0X{6R!kZSJPJG z$GkT*ZS`-d-@36)tqGjj^$$dFlouSd#^}cv3A?njAbcE`=%A7vbOgHmI0C}y;?Mx~ zx&pC)zb^tb8172yt^lc9PZ8=)lTO-Dfd+zes6opjCd8t)G}UfC%P8#eFHd$~$wA9g zMgNtR)q_EN!q8X01K(V<425@SYMLjND>eLrBu!Xf3}Dqkeae6bsl`yF474lQ9pH&# zB7}6YwPEAdnzr_q`m+p$=WmIrkljWGu9k+;kbzJElIM^KqnskFx4{tSr#BcFNOeLR z3l-X1>s$V$4|X^iLiW>9NeMyt6DAXI) z*EhE`HJ&9Vwh#JB^d$}9w9*Q_?V8Q{MlOWFP@c~O9jBku= zHbvCY5e@FJCA=bS8i%a?2?j3McweN`CM~n_Ht?~E+0f!$OWsRxzmfkhk=9b((S-bK zPSW<9O$@aC{6%$j=fMYVpn2QX?eV{Xu#;`?d;p{oUzyl1{&R{%qKujE9s1kTQRuA$ zW+&bznYJR^wj}^Z7ioa?C?NP}Wg09N!T5uG8M2Zs3xT(3ie4!Y;wQEdO}0~`srNvM z5btWQbGD5=4!tjzL~WM9!}>TOttKifQue-AkHg7{0! ztJuIwc3+IWoHGk|ZNl@Nt%TavV{Okh#n1CEI}t-Z2lCmAu99X5bbHUQ$0-Ho&Q7+y F{{ig3Gywnr literal 0 HcmV?d00001 diff --git a/RGB-potentiometers/RGB-potentiometers.arduino.avr.uno.hex b/RGB-potentiometers/RGB-potentiometers.arduino.avr.uno.hex new file mode 100644 index 0000000..37bb08b --- /dev/null +++ b/RGB-potentiometers/RGB-potentiometers.arduino.avr.uno.hex @@ -0,0 +1,85 @@ +:100000000C945C000C9479000C9479000C947900A9 +:100010000C9479000C9479000C9479000C9479007C +:100020000C9479000C9479000C9479000C9479006C +:100030000C9479000C9479000C9479000C9479005C +:100040000C9454010C9479000C9479000C94790070 +:100050000C9479000C9479000C9479000C9479003C +:100060000C9479000C947900000000080002010053 +:100070000003040700000000000000000000000072 +:10008000250028002B0000000000240027002A0083 +:10009000040404040404040402020202020203032E +:1000A0000303030301020408102040800102040836 +:1000B000102001020408102011241FBECFEFD8E049 +:1000C000DEBFCDBF11E0A0E0B1E0E8E3F5E002C0A3 +:1000D00005900D92A030B107D9F721E0A0E0B1E082 +:1000E00001C01D92AF30B207E1F70E949E010C944F +:1000F0009A020C94000090E0FC01EC55FF4F249113 +:1001000080579F4FFC018491882399F090E0880FDD +:10011000991FFC01EA57FF4FA591B491FC01E458E7 +:10012000FF4F859194918FB7F894EC91E22BEC936B +:100130008FBF089590E0FC01E859FF4F2491FC0126 +:10014000EC55FF4F3491FC01E057FF4FE491EE2353 +:10015000C9F0222339F0233001F1A8F4213019F13C +:10016000223029F1F0E0EE0FFF1FE458FF4FA59178 +:10017000B4918FB7F894EC91611126C030953E236D +:100180003C938FBF08952730A9F02830C9F0243060 +:1001900049F7809180008F7D03C0809180008F7728 +:1001A00080938000DFCF84B58F7784BDDBCF84B5AB +:1001B0008F7DFBCF8091B0008F778093B000D2CF3E +:1001C0008091B0008F7DF9CF3E2BDACF1F93CF9374 +:1001D000DF93182FEB010E947B00209739F460E039 +:1001E000812FDF91CF911F910C949A00CF3FD105C1 +:1001F00011F461E0F5CFE12FF0E0E859FF4FE49111 +:10020000E33031F140F4E130B1F0E230E1F0C038F8 +:10021000D1057CF7E4CFE73029F1E83059F1E4303B +:10022000B1F780918000806280938000D0938B0032 +:10023000C0938A0004C084B5806884BDC7BDDF91C7 +:10024000CF911F91089584B5806284BDC8BDF7CF5A +:1002500080918000806880938000D0938900C09353 +:100260008800EDCF8091B00080688093B000C0938B +:10027000B300E5CF8091B00080628093B000C0935E +:10028000B400DDCF8E50806480937C0080917A0032 +:10029000806480937A0080917A0086FDFCCF809103 +:1002A00078009091790008951F920F920FB60F92E7 +:1002B00011242F933F938F939F93AF93BF9380917C +:1002C0000B0190910C01A0910D01B0910E013091A4 +:1002D0000A0123E0230F2D3758F50196A11DB11D0A +:1002E00020930A0180930B0190930C01A0930D01C0 +:1002F000B0930E018091060190910701A091080131 +:10030000B09109010196A11DB11D80930601909342 +:100310000701A0930801B0930901BF91AF919F918C +:100320008F913F912F910F900FBE0F901F901895B6 +:1003300026E8230F0296A11DB11DD2CFCF93DF93E4 +:1003400000D000D0CDB7DEB7789484B5826084BD8C +:1003500084B5816084BD85B5826085BD85B58160C9 +:1003600085BD80916E00816080936E001092810047 +:100370008091810082608093810080918100816002 +:1003800080938100809180008160809380008091C3 +:10039000B10084608093B1008091B000816080934F +:1003A000B00080917A00846080937A0080917A0016 +:1003B000826080937A0080917A00816080937A00D5 +:1003C00080917A00806880937A001092C10083E067 +:1003D0000E947B0085E00E947B0086E00E947B00FB +:1003E000CC24CA9483E0D82EE12CF12C8EE00E941C +:1003F00042012FEF30E0DC010E949302A701960139 +:100400000E944302290130930501209304018FE0EB +:100410000E9442012FEF30E0DC010E949302A7010D +:1004200096010E9443024901309303012093020187 +:1004300080E10E9442012FEF30E0DC010E94930234 +:10044000A70196010E94430229833A834B835C8370 +:1004500089819A819093010180930001B20183E028 +:100460000E94E600B40186E00E94E60069817A817C +:1004700085E00E94E60080E090E0892B09F4B6CF89 +:100480000E940000B3CF052E97FB1EF400940E943B +:100490005A0257FD07D00E94620207FC03D04EF4B7 +:1004A0000C945A0250954095309521953F4F4F4FEF +:1004B0005F4F089590958095709561957F4F8F4F10 +:1004C0009F4F0895A1E21A2EAA1BBB1BFD010DC070 +:1004D000AA1FBB1FEE1FFF1FA217B307E407F507F4 +:1004E00020F0A21BB30BE40BF50B661F771F881FD0 +:1004F000991F1A9469F760957095809590959B0166 +:10050000AC01BD01CF010895A29FB001B39FC0010E +:10051000A39F700D811D1124911DB29F700D811D2F +:100520001124911D08950E948402B7FF0895821B33 +:08053000930B0895F894FFCF2E +:00000001FF diff --git a/RGB-potentiometers/RGB-potentiometers.ino b/RGB-potentiometers/RGB-potentiometers.ino new file mode 100644 index 0000000..79bdefd --- /dev/null +++ b/RGB-potentiometers/RGB-potentiometers.ino @@ -0,0 +1,22 @@ +// RGB with potentiometers +int red = 3; +int blue = 5; +int green = 6; +int redValue = 0; +int blueValue = 0; +int greenValue = 0; +void setup() { + pinMode(red, OUTPUT); + pinMode(blue, OUTPUT); + pinMode(green, OUTPUT); +} + +void loop() { + redValue = map(analogRead(A0), 0, 1023, 0, 255); + greenValue = map(analogRead(A1), 0, 1023, 0, 255); + blueValue = map(analogRead(A2), 0, 1023, 0, 255); + + analogWrite(red, redValue); + analogWrite(green, greenValue); + analogWrite(blue, blueValue); +}