first commit

This commit is contained in:
pandacraft 2025-03-21 16:04:17 +01:00
commit a5a0434432
1126 changed files with 439481 additions and 0 deletions

71
.gitattributes vendored Normal file
View file

@ -0,0 +1,71 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
*.sh text eol=lf
*.py text eol=lf
*.md text eol=lf
*.txt text eol=lf
*.html text eol=lf
*.java text eol=lf
*.c text eol=lf

58
.gitignore vendored Normal file
View file

@ -0,0 +1,58 @@
# For PlatformIO extension
.pio/
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Windows shortcuts
*.lnk
# =========================
# Operating System Files
# =========================
# OSX
# =========================
.DS_Store
.AppleDouble
.LSOverride
# Thumbnails
._*
# Files that might appear on external disk
.Spotlight-V100
.Trashes
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
*.suo
Debug
bin
obj
Release
*.user
# Visual Studio files
*.pyc
*.pfx
Firmware/Source/grovepi/\.pioenvs/
Firmware/Source/grovepi/\.vscode/

View file

@ -0,0 +1,530 @@
:100000000C9463000C948B000C948B000C948B006C
:100010000C948B000C948B000C948B000C948B0034
:100020000C948B000C948B000C948B000C948B0024
:100030000C948B000C948B000C948B000C948B0014
:100040000C94FA080C948B000C94D80C0C94140D9E
:100050000C948B000C948B000C948B000C948B00F4
:100060000C94A6040C948B00000000070002010011
:100070000003040600000000000000000102040864
:100080001020408001020408102001020408102002
:10009000040404040404040402020202020203032E
:1000A00003030303000000002300260029000000D2
:1000B0000000250028002B0000000000240027007D
:1000C0002A00B503CF0D11241FBECFEFD8E0DEBF4D
:1000D000CDBF11E0A0E0B1E0E4ECF0E202C0059099
:1000E0000D92A233B107D9F712E0A2E3B1E001C04B
:1000F0001D92A03EB107E1F710E0C6ECD0E004C0CD
:100100002297FE010E945C10C23CD107C9F70E94F1
:100110002F0C0C9460100C940000CF93DF9322C03E
:100120008CE691E00E948F02049741F410924801FE
:100130001092470110924A0110924901C091490161
:10014000D0914A018CE691E00E949802FE01EE0FE8
:10015000FF1FE55BFE4F918380832196D0934A0178
:10016000C09349018CE691E00E948F02892BC1F671
:10017000DF91CF91089580914B0190914C010197AF
:1001800031F4609146018CE691E00E941A0380915F
:100190004B0190914C018330910511F0079741F488
:1001A00043E050E06DE371E08CE691E00E94EC02E8
:1001B00080914B0190914C01449741F444E050E010
:1001C0006DE371E08CE691E00E94EC0280914B01BE
:1001D00090914C018E31910511F0889741F449E0DE
:1001E00050E06DE371E08CE691E00C94EC02089530
:1001F00040E855E260E070E089E392E00E944F0D34
:1002000064E070E08CE691E00E9477036DE870E0B6
:100210008CE691E00E94AB036BEB70E08CE691E022
:100220000E94B00361E071E089E392E00C941B0C42
:10023000CF93DF93CDB7DEB728970FB6F894DEBF24
:100240000FBECDBF8091490190914A01049709F0FA
:100250005DC18091470190914801892B09F056C1F9
:1002600081E090E0909348018093470180914B0199
:1002700090914C01019731F480914D010E94060B41
:100280008093460180914B0190914C01029731F48B
:1002900060914F0180914D010E94CF0A80914B01E6
:1002A00090914C010397A9F480914D010E94EB09B4
:1002B00090933C0180933B019C0197FF02C0215029
:1002C0003F4F30933E0160E071E00E94E80F809361
:1002D0003F0180914B0190914C01049741F4609152
:1002E0004F017091500180914D010E940C0A809144
:1002F0004B0190914C01059731F460914F01809131
:100300004D010E94970A80914B0190914C010797F3
:1003100009F042C080914D0190914E0180933401CB
:100320009093350161E00E94970A60E0809134016A
:100330000E94CF0A82E090E00E94A60961E08091CD
:1003400034010E94CF0A85E090E00E94A60960E097
:10035000809134010E94CF0A60E0809134010E94B4
:10036000970A20E432E44FE050E061E080913401EC
:100370000E942F0B2AE330E040E050E00E941E1064
:10038000CA01B90120E031E040E050E00E941E10B7
:1003900020933E0160933F0180914B0190914C016D
:1003A000449709F580913A01811107C08BE691E0ED
:1003B0000E94030681E080933A0128E331E047E39D
:1003C00051E066E371E08BE691E00E9413068091B4
:1003D000360180933E018091370180933F018091E7
:1003E00038018093400180914B0190914C014E97D0
:1003F00069F580913901811107C083E691E00E947F
:10040000C20681E08093390183E691E00E94C6062E
:100410008091650180933E018091640180933F014A
:100420008091630180934001809168018093410134
:1004300080916701809342019091690190934301FB
:1004400080934401809166018093450180914B0126
:1004500090914C01889709F059C080914F0190917B
:100460005001009719F426E04BE005C0813091055A
:1004700049F426E046E160914D0185E591E00E9456
:100480004C0708C08230910519F426E045E1F3CF0E
:100490000397D9F360E085E591E00E9461086D83E0
:1004A0007E838F83988785E591E00E941308698396
:1004B0007A838B839C831092330110923201FE0168
:1004C000359680E090E001962191DC01A35CBE4F5F
:1004D0002C9384309105BCF384E090E09093330139
:1004E000809332010196DC01A35CBE4FE1E0F0E0B5
:1004F000EC0FFD1FE80FF91F359720812C938830F2
:10050000910584F3909333018093320128960FB6BE
:10051000F894DEBF0FBECDBFDF91CF91089520913B
:10052000A00130E08091A101281B3109C901089583
:100530008091A1019091A001891750F4E82FF0E07B
:10054000EE55FE4F208130E08F5F8093A10102C005
:100550002FEF3FEFC9010895E091A1018091A00123
:10056000E81730F4F0E0EE55FE4F208130E002C095
:100570002FEF3FEFC90108950895E0917801F091C0
:1005800079013097E1F03091A1012091A00132175B
:10059000B0F040E009C0DC01A20FB31F5C91D901AB
:1005A000AE55BE4F5C934F5F242F30E026173707C0
:1005B00094F31092A1016093A001CB0109940895D6
:1005C000E0917A01F0917B01309729F010927E0141
:1005D00010927D0109940895CF92DF92EF92FF92DD
:1005E0000F931F93CF93DF937C01CB018A0120915E
:1005F0007C01222391F0EB016B01C40ED51E09C0D2
:100600006991D701ED91FC910190F081E02DC70136
:100610000995CC15DD05A1F703C0642F0E94730472
:10062000C801DF91CF911F910F91FF90EF90DF9064
:10063000CF900895CF93DF931F92CDB7DEB7698334
:1006400020917C012223D1F020917D01203240F0C5
:1006500021E030E0FC013383228320E030E015C04C
:1006600080917E01E82FF0E0E158FE4F9981908360
:100670008F5F80937E0180937D0105C061E0CE0194
:1006800001960E94730421E030E0C9010F90DF91D0
:10069000CF910895FC011382128248EE53E060E08E
:1006A00070E044835583668377838CE091E0918387
:1006B000808308951092A1011092A00110927E01F2
:1006C00010927D010C94B903CF93DF93EC01862F38
:1006D0000E94D70380EE92E00E9491048DEB92E09D
:1006E0000E948C04CE01DF91CF910C945A030C949C
:1006F0006403862F413208F040E262EA71E00E9412
:10070000DB031092A1018093A001089521E00C94D5
:10071000790381E080937C0160939F0110927E01B8
:1007200010927D0108950C9489030F93062F21E008
:1007300040917D016FE771E080919F010E9420044C
:1007400010927E0110927D0110927C010F9108950C
:1007500061E00C949503709379016093780108959A
:1007600070937B0160937A0108958CE691E00C947C
:100770004A031092CB0181E08093C9011092C80115
:1007800061E082E10E94CF0A61E083E10E94CF0A2A
:10079000E9EBF0E080818E7F808380818D7F808394
:1007A00088E48093B80085E48093BC000895880FA6
:1007B0008093BA000895413208F03FC09091CB0178
:1007C0009111FCCF91E09093CB012093C9012FEFC1
:1007D0002093C2011092C701242F21502093C601FB
:1007E0009093CA019091CA01880F892B8093CA0106
:1007F0008091C801813041F41092C8018091CA01F2
:100800008093BB0085EC01C085EE8093BC00809195
:10081000CB018130E1F38091C701841710F440913E
:10082000C7012CEC31E0FB01D90102C08D9181930D
:100830008A2F821B8417D0F301C040E0842F0895D3
:100840000F93413208F046C09091CB019111FCCF3B
:1008500092E09093CB010093C9019FEF9093C20166
:100860001092C7014093C601FB016CEC71E0DB0103
:1008700002C091919D939A2F961B9417D0F31092DA
:10088000CA019091CA01880F892B8093CA01809177
:10089000C801813041F41092C8018091CA0180934F
:1008A000BB0085EC01C085EE8093BC00222321F0C3
:1008B0008091CB018230E1F38091C2018F3F61F0E2
:1008C0008091C201803251F08091C201803341F4A5
:1008D00083E007C081E005C080E003C082E001C082
:1008E00084E00F910895613298F42091CB01243077
:1008F00089F46093C401FC018CEE91E0DC0102C03C
:1009000021912D932A2F281B2617D0F380E00895DC
:1009100081E0089582E0089590930D0280930C0287
:10092000089590930F0280930E02089585ED8093B1
:10093000BC008091BC0084FDFCCF1092CB010895D7
:1009400085EC8093BC001092CB0108951F920F920A
:100950000FB60F9211242F933F934F935F936F9392
:100960007F938F939F93AF93BF93EF93FF93809168
:10097000B900887F803609F49FC058F5883209F4A1
:100980005BC090F4803109F452C038F4882309F434
:10099000F8C0883009F0F9C04AC0883109F44CC069
:1009A000803209F0F2C05CC0803409F46BC038F4C6
:1009B000803309F455C0883309F0E7C054C080354E
:1009C00009F454C0883509F462C0883409F0DDC0E8
:1009D000DAC0883909F4CBC0A8F4883709F46CC0B0
:1009E00038F4883609F468C0803709F0CEC064C096
:1009F000883809F4BCC0803909F464C0803809F033
:100A0000C4C060C0803B09F48AC038F4803A09F45D
:100A10006BC0883A09F0B9C082C0803C09F4ABC011
:100A2000883C09F4A8C0883B09F0AFC08DC0809114
:100A3000CA018093BB0012C09091C7018091C6018A
:100A4000981788F58091C701E82FF0E0E453FE4F36
:100A500090819093BB008F5F8093C70185EC88C025
:100A60008093C20190C08093C20156C08091C7019B
:100A70009091BB00E82FF0E0E453FE4F90838F5F2E
:100A80008093C7019091C7018091C6016DC080918C
:100A9000C7019091BB00E82FF0E0E453FE4F908334
:100AA0008F5F8093C7018091C90181116CC081E083
:100AB0008093C80184EA60C083E08093CB011092E8
:100AC000C301CCCF8091C301803208F050C0809127
:100AD000C3019091BB00E82FF0E0E05FFD4F9083F1
:100AE0008F5F8093C301BACF8091C301803230F40D
:100AF000E091C301F0E0E05FFD4F10820E94960498
:100B00006091C301E0910C02F0910D0270E080E170
:100B100092E009951092C3010E94A00436C084E0BF
:100B20008093CB011092C5011092C401E0910E0296
:100B3000F0910F0209958091C401811105C081E0F7
:100B40008093C4011092EC018091C501E82FF0E080
:100B5000E451FE4F90819093BB008F5F8093C5015D
:100B60009091C5018091C401981708F477CF85E86A
:100B70008093BC000AC085EC8093BC001092CB012E
:100B800004C01092C2010E949604FF91EF91BF91A0
:100B9000AF919F918F917F916F915F914F913F9115
:100BA0002F910F900FBE0F901F9018951F93CF930A
:100BB000DF931F92CDB7DEB7162F8CE691E0498305
:100BC0000E945A036CE470E08CE691E00E9493036B
:100BD000612F8CE691E00E941A034981642F8CE614
:100BE00091E00E941A038CE691E00F90DF91CF9183
:100BF0001F910C94A803462F67E00C94D605462F4E
:100C000068E00C94D605CF93DF93EC0160E00E947E
:100C1000FB0560E0CE010E94FF0561E0CE01DF919F
:100C2000CF910C94FB054F925F926F927F928F92BF
:100C30009F92AF92BF92CF92DF92EF92FF920F936B
:100C40001F93CF93DF9300D01F92CDB7DEB75B0128
:100C50006A01790180E48B838A8389830E94440935
:100C60002B013C010DC00E944409641975098609D5
:100C70009709653F71408105910514F080E06EC0D1
:100C80008CE691E00E948F021816190664F38CE638
:100C900091E00E94980243E050E06CE470E08CE642
:100CA00091E00E9486030E9444092B013C018E01C1
:100CB0000F5F1F4F48012DC0C8018819990903977C
:100CC000D4F40E9444092B013C0111C08CE691E050
:100CD0000E949802F80180830E94440964197509F2
:100CE0008609970963337105810591053CF6F80182
:100CF0008081803458F70E9444090F5F1F4F6419A8
:100D0000750986099709653F7140810591050CF0C9
:100D1000B5CF8CE691E00E948F02892B69F699810C
:100D2000892F880F880F95FD8D5F85958595F50135
:100D300080839A81892F880F880F95FD8D5F859517
:100D40008595F60180839B81892F880F880F95FDFB
:100D50008D5F85958595F701808381E00F900F90D9
:100D60000F90DF91CF911F910F91FF90EF90DF9047
:100D7000CF90BF90AF909F908F907F906F905F903B
:100D80004F9008958CE691E00C945A03CF93DF9333
:100D9000EC0168E670E08CE691E00E94930360E06D
:100DA0008CE691E00E941A038CE691E00E94A80371
:100DB00047E050E068E670E08CE691E00E94860330
:100DC0008CE691E00E949802382F3695369536953C
:100DD0003E70232F220F220F230F8F709927280F89
:100DE00028838CE691E00E949802282F22952F708C
:100DF0008F7099273AE0239F800D112489838CE618
:100E000091E00E949802382F3695369536953670C7
:100E1000232F220F220F230F8F709927280F2A8349
:100E20008CE691E00E949802282F22952F708F70F7
:100E300099273AE0239F800D11248B838CE691E063
:100E40000E949802282F22952F708F7099273AE0E0
:100E5000239F800D11248C838CE691E00E949802E0
:100E6000282F22952F708F7099273AE0239F800DAD
:100E700011248D838CE691E00E949802282F229500
:100E80002F708F7099273AE0239F800D11248E8355
:100E90001F82DF91CF910895CF93DF93EC01862FCE
:100EA0006E834F83288791E09D8760E00E94970AB8
:100EB00061E08E810E94CF0A19861A861B861C86E5
:100EC000DF91CF910895DF92EF92FF920F931F93DE
:100ED000CF93DF93EC0161E08E810E94CF0A6AEF2D
:100EE00070E080E090E00E9480090E94440909853A
:100EF0001A852B853C85601771078207930720F4BC
:100F000019861A861B861C862D85211111C009851C
:100F10001A852B853C85DC01CB01801B910BA20B34
:100F2000B30B803D9740A105B10510F481E073C07B
:100F30001D860E94440969877A878B879C871C825B
:100F40001B821A821982188261E08E810E94970AA0
:100F500060E08E810E94CF0A64E170E080E090E062
:100F60000E948009F89461E08E810E94CF0A88E295
:100F700090E00E94A60960E08E810E94970AF12C01
:100F8000D12C81E009C0E39481E090E00E94A609A1
:100F90008FEFE81204C009C0E12C082F10E08E8109
:100FA0000E94060B8017910771F38E810E94060B39
:100FB0009FEFE916C9F023E02F1590F4F0FC10C064
:100FC0009D2D969596959695FE01E90FF11D9081C0
:100FD000990F908328852E1510F491609083D394F7
:100FE000F39495E5F912D8CF789427E22D1590F473
:100FF0002C8130E04881898190E0840F911D4A81E5
:10100000840F911D4B81840F911D99272817390753
:1010100009F48CCF80E0DF91CF911F910F91FF9069
:10102000EF90DF900895EF92FF920F931F93CF936D
:10103000DF93EC010E946307882391F18F818B304D
:1010400029F070F18551823058F507C0688170E051
:1010500080E090E00E94EC0E2DC0688170E080E09E
:1010600090E00E94EC0E20E030E040E853E40E9463
:101070007A0F7B018C01698170E080E090E00E9432
:10108000EE0E9B01AC016E2D7F2D802F912F0E94C3
:10109000200E20E030E040E251E40E94840E0AC0BD
:1010A00068E171E089E392E00E94FC0B60E070E08F
:1010B00080EC9FE7DF91CF911F910F91FF90EF9010
:1010C0000895CF92DF92EF92FF920F931F93CF93E9
:1010D000DF938C01C62F0E946307882309F477C031
:1010E000F80187818B3039F008F471C08551823066
:1010F00008F06DC01DC0F801628170E080E090E0F2
:101100000E94EC0EB62FA72FF82FE92F462F572F4E
:10111000682F792FCB01BA01CC2309F462C020E0FB
:1011200030E040E151E46B2F7A2F8F2F9E2F37C094
:10113000F801D2816D2F6F7770E080E090E00E941F
:10114000EE0E20E030E040E853E40E947A0F6B019D
:101150007C01F801638170E080E090E00E94EE0E77
:101160009B01AC016C2D7D2D8E2D9F2D0E94200E9C
:1011700020E030E040E251E40E94840E472F382FF7
:10118000292F862F942FA32FB22FBC01CD01D7FD7D
:101190009058CC2331F120E030E040E151E40E944E
:1011A0007A0F20E030E040EA50E40E94840E20E014
:1011B00030E040E052E40E94200E472F382F292FC4
:1011C000862F942FA32FB22FBC01CD010AC068E156
:1011D00071E089E392E00E94FC0B60E070E080EC3B
:1011E0009FE7DF91CF911F910F91FF90EF90DF90DC
:1011F000CF9008951F920F920FB60F9211242F9344
:101200003F938F939F93AF93BF93809130029091C0
:101210003102A0913202B091330230913802232F73
:101220002D5F2D3720F40196A11DB11D05C0232F80
:101230002A570296A11DB11D2093380280933002D7
:1012400090933102A0933202B09333028091340222
:1012500090913502A0913602B09137020196A11DFE
:10126000B11D8093340290933502A0933602B0935F
:101270003702BF91AF919F918F913F912F910F9026
:101280000FBE0F901F9018950F931F938FB7F89470
:1012900000913002109131022091320230913302DC
:1012A0008FBFB801C9011F910F9108950F931F932C
:1012B0009FB7F894009134021091350220913602C4
:1012C0003091370286B5A89B06C08F3F21F00F5F93
:1012D0001F4F2F4F3F4F9FBF322F212F102F00271F
:1012E000080F111D211D311D42E0000F111F221F8B
:1012F000331F4A95D1F7B801C9011F910F91089585
:10130000CF92DF92EF92FF92CF93DF936B017C013C
:101310000E945609EB010EC00E9456096C1B7D0B02
:10132000683E734038F081E0C81AD108E108F1083E
:10133000C851DC4FC114D104E104F10469F7DF9115
:10134000CF91FF90EF90DF90CF900895019739F003
:10135000880F991F880F991F02970197F1F7089539
:10136000789484B5826084BD84B5816084BD85B580
:10137000826085BD85B5816085BDEEE6F0E0808147
:1013800081608083E1E8F0E0108280818260808368
:10139000808181608083E0E8F0E0808181608083EB
:1013A000E1EBF0E0808184608083E0EBF0E080811D
:1013B00081608083EAE7F0E08081846080838081BF
:1013C0008260808380818160808380818068808367
:1013D0001092C10008958E3008F08E5087702091D1
:1013E000000140E4249F90011124822B80937C0013
:1013F00080917A00806480937A0080917A0086FDE3
:10140000FCCF2091780030917900932F80E0AC01DF
:10141000422B9A01C90108951F93CF93DF93182F90
:10142000EB0161E00E94970A209711F460E004C08C
:10143000CF3FD10539F461E0812FDF91CF911F912A
:101440000C94CF0AE12FF0E0E859FF4FE491E3302C
:10145000B9F028F4E13051F0E230B1F50CC0E630DB
:1014600019F1E73049F1E43079F514C084B58068AA
:1014700084BDC7BD2EC084B5806284BDC8BD29C0EF
:1014800080918000806880938000D0938900C09311
:1014900088001FC080918000806280938000D0937C
:1014A0008B00C0938A0015C08091B0008068809343
:1014B000B000C093B3000DC08091B00080628093F3
:1014C000B000C093B40005C0C038D1050CF0B3CF54
:1014D000ADCFDF91CF911F910895833069F028F44B
:1014E0008130A1F0823011F514C08630B1F0873020
:1014F000C1F08430D9F404C0809180008F7703C09C
:10150000809180008F7D80938000089584B58F77CF
:1015100002C084B58F7D84BD08958091B0008F771F
:1015200003C08091B0008F7D8093B0000895CF9369
:10153000DF9390E0FC01E458FF4F4491FC01E05739
:10154000FF4F8491882341F190E0880F991FFC019F
:10155000E854FF4F25913491D90182559F4FFC01EA
:1015600085919491C82FD92F9FB7F8948C916111D0
:1015700006C0409584238C938881842308C0623000
:1015800041F4242F209582238C938881842B888397
:1015900002C0842B8C939FBFDF91CF9108950F934E
:1015A0001F93CF93DF931F92CDB7DEB7282F30E084
:1015B000F901E859FF4F8491F901E458FF4F149164
:1015C000F901E057FF4F04910023D1F0882321F067
:1015D00069830E946D0A6981E02FF0E0EE0FFF1F22
:1015E000E255FF4F85919491DC019FB7F8948C915F
:1015F000611103C01095812301C0812B8C939FBF83
:101600000F90DF91CF911F910F910895CF93DF93AA
:10161000282F30E0F901E859FF4F8491F901E4588F
:10162000FF4FD491F901E057FF4FC491CC2389F0CB
:1016300081110E946D0AEC2FF0E0EE0FFF1FEC55B8
:10164000FF4F85919491DC018C918D2321E030E056
:1016500011F420E030E0C901DF91CF9108958F921D
:101660009F92AF92BF92CF92DF92EF92FF920F9331
:101670001F93CF93DF9390E0FC01E458FF4FD49188
:10168000FC01E057FF4F7491611102C0C0E001C03E
:10169000CD2FDA01C901BF70672F70E0660F771F89
:1016A0006C557F4F812C912C5401FB0105911491B5
:1016B00010C0C12CD12C7601C394C80CD91CEA1CD3
:1016C000FB1C88169906AA06BB0609F44BC0460106
:1016D0005701F801E081ED23EC1759F310C0C12C3C
:1016E000D12C7601C394C80CD91CEA1CFB1C8816AB
:1016F0009906AA06BB06B1F14601570103C0FB01DA
:1017000005911491F801E081ED23EC13E8CF8819DD
:101710009909AA09BB0920E030E0A901FB01659104
:10172000749109C0281739074A075B07D9F02F5F62
:101730003F4F4F4F5F4FFB01E081ED23EC1791F3DB
:10174000A5E1B0E00E94DD0F8B019C01005F1F4FFF
:101750002F4F3F4F84E036952795179507958A952B
:10176000D1F703C000E010E09801B801C901DF9192
:10177000CF911F910F91FF90EF90DF90CF90BF908E
:10178000AF909F908F900895CF92DF92EF92FF924B
:101790000F931F93CF93DF936C01EB017A01E60E59
:1017A000F71E00E010E00BC06991D601ED91FC91AD
:1017B0000190F081E02DC6010995080F191FCE1583
:1017C000DF0591F7C801DF91CF911F910F91FF9035
:1017D000EF90DF90CF900895DB010D900020E9F7A6
:1017E000AD0141505109461B570BDC01ED91FC91B5
:1017F0000280F381E02D09940C94EC0BDC01ED9157
:10180000FC910190F081E02D09940F931F93CF93E9
:10181000DF93EC016DE00E94FE0B8C016AE0CE01CB
:101820000E94FE0B9C01200F311FC901DF91CF9157
:101830001F910F9108950F931F93CF93DF93EC01A6
:101840000E94EC0B8C01CE010E94050C9801280F20
:10185000391FC901DF91CF911F910F9108950E9407
:10186000B0090E94F800CBE0DDE00E94180120974B
:10187000E1F30E940B0DF9CFFC0184859585FC01F5
:10188000E05CFF4F20813181FC01EE5BFF4F8081E6
:101890009181281B390B2F733327C9010895FC014F
:1018A00084859585FC01E05CFF4F40815181FC01FE
:1018B000EE5BFF4F208131814217530741F00190C9
:1018C000F081E02DE80FF91F208130E002C02FEFFA
:1018D0003FEFC9010895FC0184859585FC01E05C1A
:1018E000FF4F40815181FC01EE5BFF4F2081318130
:1018F0004217530781F0A081B181A80FB91F8C91C5
:10190000208131812F5F3F4F2F7333273183208315
:10191000282F30E002C02FEF3FEFC9010895FC01EE
:1019200086859785FC01E05CFF4FDC01AE5BBF4F15
:10193000408151812D913C91119742175307C1F776
:101940000895CF93DF93FC0186859785DC01A05C29
:10195000BF4F2D913C9111972F5F3F4F2F7333272E
:10196000EC01CE5BDF4F4881598124173507D9F34D
:101970000D90BC91A02DA80FB91F6C93A685B785BB
:10198000A05CBF4F11963C932E93A689B7892C91EA
:1019900081E090E0058C02C0880F991F0A94E2F75D
:1019A000282B2C9381E090E0DF91CF91089508954A
:1019B0001F920F920FB60F9211242F933F934F93C4
:1019C0008F939F93EF93FF934091C6008091DC0229
:1019D0009091DD0201968F7399272091DE0230915C
:1019E000DF028217930759F0E091DC02F091DD02EB
:1019F000E456FD4F40839093DD028093DC02FF911B
:101A0000EF919F918F914F913F912F910F900FBE2A
:101A10000F901F90189589E392E00E943C0C892B4F
:101A200011F00C94D70C08951F920F920FB60F92DD
:101A300011242F933F938F939F93EF93FF932091C4
:101A400098023091990280919A0290919B022817F6
:101A5000390731F48091C1008F7D8093C10014C09B
:101A6000E0919A02F0919B02E85AFD4F208180910B
:101A70009A0290919B0201968F73992790939B02F3
:101A800080939A022093C600FF91EF919F918F91CE
:101A90003F912F910F900FBE0F901F901895CF92EE
:101AA000DF92EF92FF92CF93DF93EC016A017B010B
:101AB000411581EE580761057105F9F0EC89FD8942
:101AC00081E090E00E8C02C0880F991F0A94E2F723
:101AD000808360E079E08DE390E0A70196010E94A9
:101AE000FC0F215031094109510956954795379509
:101AF0002795211580E1380798F0EC89FD8910823F
:101B000060E874E88EE190E0A70196010E94FC0F66
:101B10002150310941095109569547953795279527
:101B2000E889F9893083EA89FB892083EE89FF8976
:101B3000408181E090E09C010A8C02C0220F331F9B
:101B40000A94E2F7422B4083EE89FF8940819C0191
:101B50000B8C02C0220F331F0A94E2F7422B408302
:101B6000EE89FF8940819C010C8C02C0220F331F3B
:101B70000A94E2F7422B4083EE89FF8920810D8C85
:101B800002C0880F991F0A94E2F780958223808310
:101B9000DF91CF91FF90EF90DF90CF90089510925A
:101BA0003C0210923B0288EE93E0A0E0B0E080930C
:101BB0003D0290933E02A0933F02B093400286E222
:101BC00091E090933A02809339028CE992E09093ED
:101BD00046028093450288E592E090934802809304
:101BE000470285EC90E090934A028093490284EC8E
:101BF00090E090934C0280934B0280EC90E09093A5
:101C00004E0280934D0281EC90E0909350028093BD
:101C10004F0286EC90E0909352028093510284E050
:101C20008093530283E08093540287E080935502AF
:101C300085E08093560281E08093570208955058C2
:101C4000BB27AA270ED01CC10DD130F012D120F035
:101C500031F49F3F11F41EF402C10EF4E095E7FB4E
:101C6000F8C0E92F1ED180F3BA1762077307840703
:101C7000950718F071F49EF536C10EF4E0950B2E21
:101C8000BA2FA02D0B01B90190010C01CA01A001CE
:101C90001124FF27591B99F0593F50F4503E68F129
:101CA0001A16F040A22F232F342F4427585FF3CF6A
:101CB000469537952795A795F0405395C9F77EF43B
:101CC0001F16BA0B620B730B840BBAF09150A1F084
:101CD000FF0FBB1F661F771F881FC2F70EC0BA0F0A
:101CE000621F731F841F48F4879577956795B79592
:101CF000F7959E3F08F0B3CF9395880F08F099278A
:101D0000EE0F9795879508950CD0BAC0B2D040F0E9
:101D1000A9D030F021F45F3F19F09BC05111E4C00D
:101D20009EC0BFD098F39923C9F35523B1F3951BF7
:101D3000550BBB27AA2762177307840738F09F5FEC
:101D40005F4F220F331F441FAA1FA9F333D00E2E5B
:101D50003AF0E0E830D091505040E695001CCAF7C8
:101D600029D0FE2F27D0660F771F881FBB1F26178D
:101D700037074807AB07B0E809F0BB0B802DBF0160
:101D8000FF2793585F4F2AF09E3F510568F061C0CE
:101D9000ABC05F3FECF3983EDCF386957795679593
:101DA000B795F7959F5FC9F7880F911D9695879511
:101DB00097F90895E1E0660F771F881FBB1F621730
:101DC00073078407BA0720F0621B730B840BBA0BEE
:101DD000EE1F88F7E0950895E89409C097FB3EF45C
:101DE00090958095709561957F4F8F4F9F4F992368
:101DF000A9F0F92F96E9BB279395F69587957795E6
:101E00006795B795F111F8CFFAF4BB0F11F460FFA5
:101E10001BC06F5F7F4F8F4F9F4F16C0882311F0FD
:101E200096E911C0772321F09EE8872F762F05C011
:101E3000662371F096E8862F70E060E02AF09A95AC
:101E4000660F771F881FDAF7880F9695879597F9A1
:101E5000089597F99F6780E870E060E008959FEF2C
:101E600080EC089500240A94161617061806090631
:101E7000089500240A941216130614060506089500
:101E8000092E0394000C11F4882352F0BB0F40F488
:101E9000BF2B11F460FF04C06F5F7F4F8F4F9F4FC8
:101EA000089557FD9058440F551F59F05F3F71F04A
:101EB0004795880F97FB991F61F09F3F79F08795B1
:101EC0000895121613061406551FF2CF4695F1DF3A
:101ED00008C0161617061806991FF1CF86957105CA
:101EE000610508940895E894BB2766277727CB01FE
:101EF00097F908950BD0C4CFB5DF28F0BADF18F0FA
:101F0000952309F0A6CFABCF1124EECFCADFA0F303
:101F1000959FD1F3950F50E0551F629FF001729F7E
:101F2000BB27F00DB11D639FAA27F00DB11DAA1F9D
:101F3000649F6627B00DA11D661F829F2227B00DEA
:101F4000A11D621F739FB00DA11D621F839FA00D75
:101F5000611D221F749F3327A00D611D231F849FC5
:101F6000600D211D822F762F6A2F11249F5750401C
:101F70008AF0E1F088234AF0EE0FFF1FBB1F661FB7
:101F8000771F881F91505040A9F79E3F510570F070
:101F900060CFAACF5F3FECF3983EDCF38695779550
:101FA0006795B795F795E7959F5FC1F7FE2B880F6B
:101FB000911D9695879597F908950E943A10A59FCF
:101FC000900DB49F900DA49F800D911D1124089534
:101FD00097FB072E16F4009407D077FD09D00E94D6
:101FE000461007FC05D03EF4909581959F4F0895CB
:101FF000709561957F4F0895A1E21A2EAA1BBB1B15
:10200000FD010DC0AA1FBB1FEE1FFF1FA217B307C4
:10201000E407F50720F0A21BB30BE40BF50B661FDA
:10202000771F881F991F1A9469F76095709580959E
:1020300090959B01AC01BD01CF010895052E97FB42
:1020400016F4009407D057FD0DD00E94FC0F07FC3A
:1020500009D07EF490958095709561957F4F8F4F54
:102060009F4F089550954095309521953F4F4F4F84
:102070005F4F0895A29FB001B39FC001A39F01D0FD
:10208000B29F700D811D1124911D0895AA1BBB1BC9
:1020900051E107C0AA1FBB1FA617B70710F0A61B68
:1020A000B70B881F991F5A95A9F780959095BC0189
:1020B000CD010895EE0FFF1F0590F491E02D0994D6
:0420C000F894FFCFC2
:1020C4000152656164792100000000001A03EC02EA
:1020D4008F029802AC02BC02526561642066616999
:1020E4006C0000000000A10CC40B3C0C6B0C4F0CEA
:0220F4008F0C4F
:00000001FF

View file

@ -0,0 +1,906 @@
:100000000C9463000C948B000C948B000C948B006C
:100010000C948B000C948B000C948B000C948B0034
:100020000C948B000C948B000C948B000C948B0024
:100030000C948B000C948B000C948B000C948B0014
:100040000C940E130C948B000C9407160C945516FC
:100050000C948B000C948B000C948B000C948B00F4
:100060000C945F110C948B0000000000240027000A
:100070002A0000000000250028002B0000000000DE
:1000800023002600290004040404040404040202DA
:100090000202020203030303030301020408102007
:1000A0004080010204081020010204081020000012
:1000B0000007000201000003040600000000000029
:1000C0000000D60FC11711241FBECFEFD8E0DEBF4E
:1000D000CDBF11E0A0E0B1E0E0E4F8E302C005909C
:1000E0000D92A035B107D9F713E0A0E5B1E001C04A
:1000F0001D92A23EB107E1F710E0C6ECD0E004C0CB
:100100002297FE010E941A1CC23CD107C9F70E9427
:1001100017180C941E1C0C9400000F931F93CF9380
:10012000DF93689F8001699F100D789F100D112447
:10013000C8010E94A218EC01009729F060E070E06D
:10014000A8010E94A900CE01DF91CF911F910F91CC
:100150000895DC0101C06D9341505040E0F70895CF
:10016000FC01828108950F931F938C01FC01808113
:1001700060E00E94C31484E190E00E94BD13F80186
:10018000808161E00E94C31484E190E00E94BD136D
:100190001F910F9108950F931F93CF93DF93EC015D
:1001A000062F10E007FF03C0898161E002C089814A
:1001B00060E00E94C314CE010E94B3001F5F18309C
:1001C00011F0000FEFCFDF91CF911F910F910895A4
:1001D000FF920F931F93CF93DF93EC01F62E042F22
:1001E000122F27FD02C060EE01C060EC16FF6061B7
:1001F00007FF686006FF6460F7FE6260F6FE6160FC
:10020000CE010E94CB00CE01612F0E94CB00CE0117
:10021000602F0E94CB00CE016F2D0E94CB00DF919A
:10022000CF911F910F91FF9008956F927F928F92BF
:100230009F92AF92BF92CF92DF92EF92FF920F9375
:100240001F93CF93DF93EC01E62E742E822E902E17
:1002500060E00E94CB00CE0160E00E94CB00CE01A6
:1002600060E00E94CB00CE0160E00E94CB0083E002
:10027000E89E8001112458010894A11CB11C92E051
:10028000C92ED12CC00ED11EFF2483E0682E1FC0C2
:10029000FE1479F4EB81FC81E00FF11F7082EB8199
:1002A000FC81EA0DFB1D8082EB81FC81EC0DFD1DC4
:1002B0009082EB81FC81F69CC0011124E80FF91FAC
:1002C000CE016081418122810E94E800F3948A81FD
:1002D000F816F0F2CE0160E00E94CB00CE0160E0A3
:1002E0000E94CB00CE0160E00E94CB00CE0160E016
:1002F0000E94CB00DF91CF911F910F91FF90EF9063
:10030000DF90CF90BF90AF909F908F907F906F9035
:1003100008950F931F93CF93DF93EC01862F68838B
:1003200049832A8361E00E948414898161E00E94EC
:1003300084149A8183E0989FC001112461E070E0E9
:100340000E948D008B839C8310E008C0CE01612F3A
:1003500040E020E000E00E9415011F5F8A8118172D
:10036000A8F3DF91CF911F910F9108950F931F93E1
:100370008C01862FF80166834783208791E095875B
:1003800060E00E948414F801868161E00E94C31439
:10039000F80111861286138614861F910F91089515
:1003A000CF92DF92EF92FF920F931F93CF93DF9341
:1003B000EC018E8161E00E94C3146AEF70E080E07E
:1003C00090E00E9464130E9456139B01AC01898542
:1003D0009A85AB85BC85281739074A075B0720F447
:1003E00019861A861B861C868D85882371F489855B
:1003F0009A85AB85BC85281B390B4A0B5B0B205DAE
:1004000037404040504008F477C01D860E94561384
:1004100069877A878B879C871C821B821A82198244
:1004200018828E8161E00E9484148E8160E00E94B7
:10043000C31464E170E080E090E00E946413F894DB
:100440008E8161E00E94C31488E290E00E94BD1397
:100450008E8160E00E94841481E0EE2400E010E0D0
:100460000AC0F39481E090E00E94BD138FEFF8166C
:1004700029F40AC0822FFF24C82EDD248E810E9419
:1004800017158C159D0569F38E810E941715282F6D
:100490008FEFF816C9F0043090F000FD10C08E2DDB
:1004A000869586958695FE01E80FF11D9081990F3E
:1004B000908388858F1510F491609083E3940F5F8B
:1004C0001F4F05351105B1F6789487E28E1510F0AF
:1004D00030E013C030E04C8150E02981888190E009
:1004E000820F911D2A81820F911D2B81820F911DF8
:1004F00090704817590709F431E0832FDF91CF91AD
:100500001F910F91FF90EF90DF90CF900895EF92A1
:10051000FF920F931F93CF93DF93EC010E94D001C2
:100520008823A9F18F818B3031F08B3080F1855198
:10053000823068F507C0688170E080E090E00E943A
:10054000A41A22C0688170E080E090E00E94A41AA2
:1005500020E030E040E853E40E94321B7B018C0134
:10056000698170E0882777FD8095982F0E94A61AF0
:100570009B01AC01C801B7010E94D81920E030E00E
:1005800040E251E40E943C1AE62F692F0AC08CEB2E
:1005900093E060E071E00E948C18E0E070E080EC95
:1005A0006FE72E2F372F482F562FB901CA01DF9141
:1005B000CF911F910F91FF90EF900895CF92DF920E
:1005C000EF92FF920F931F93CF93DF93EC01C62E10
:1005D0000E94D001882309F450C08F818B3041F0F4
:1005E0008B3008F44AC08551823008F046C007C0FD
:1005F0006A8170E080E090E00E94A41A29C0DA804D
:100600006D2D70E06F777070882777FD8095982F3B
:100610000E94A61A20E030E040E853E40E94321B1A
:100620007B018C016B8170E0882777FD8095982F86
:100630000E94A61A9B01AC01C801B7010E94D819FB
:1006400020E030E040E251E40E943C1AD7FC905890
:10065000CC20E9F020E030E040E151E40E94321B80
:1006600020E030E040EA50E40E943C1A20E030E014
:1006700040E052E40E94D8190AC08CEB93E060E09D
:1006800071E00E948C1860E070E080EC9FE7DF91E1
:10069000CF911F910F91FF90EF90DF90CF90089531
:1006A000DF92EF92FF920F931F937C0101E312E020
:1006B000C80168E670E00E94610FC80160E00E9416
:1006C0001E10C8010E946110C80168E670E047E092
:1006D00050E00E947210C8010E94740F282F2F77DB
:1006E00022952F703AE0D32E2D9D900111248F700A
:1006F000820FF7018083C8010E94740F282F229572
:100700002F702D9D900111248F70820FF70181832E
:10071000C8010E94740F282F2F7322952F702D9DD2
:10072000900111248F70820FF7018283C8010E940B
:10073000740F282F22952F702D9D900111248F70FA
:10074000820FF7018383C8010E94740F282F22951E
:100750002F702D9D900111248F70820FF7018483DB
:10076000C8010E94740F282F22952F702D9D900193
:1007700011248F70820FF7018583C8010E94740FC6
:10078000282F22952F702D9D900111248F70820F9C
:10079000F701868317821F910F91FF90EF90DF90F2
:1007A000089581E392E00E9476100895FC0185810E
:1007B00096810895FC0120E080819181892B09F0C8
:1007C00021E0822F0895FF920F931F93CF93DF9321
:1007D000EC018B01FF24612F661F6627661F8A814B
:1007E0000E94C31488810E94171560E0892B09F4C8
:1007F00061E088810E94C314000F111FF39480E10F
:10080000F81649F7DF91CF911F910F91FF9008954E
:100810001F93CF93DF93EC018A8160E00E94C314A1
:100820008AE090E00E94BD1310E08A8161E00E949E
:10083000C3148A8160E00E94C3141F5F1430A9F7BB
:10084000DF91CF911F910895EF92FF920F931F9325
:10085000CF93DF93EC017B01CB0193709E838D835B
:10086000CE0160E070E00E94E30300E010E08C81C4
:10087000882351F0C701002E02C0880F991F0A94E7
:10088000E2F791FD0DC009C0C701002E02C0969588
:1008900087950A94E2F780FD03C060E070E002C033
:1008A0006FEF70E0CE010E94E3030F5F1F4F0A302D
:1008B0001105E9F6CE0160E070E00E94E303CE018D
:1008C00060E070E00E94E303CE010E940804DF9123
:1008D000CF911F910F91FF90EF900895FC01662337
:1008E00011F481E004C0862F6B3008F08AE081505B
:1008F00061E070E002C0660F771F8A95E2F785819C
:1009000096816827792776836583CF010E94240426
:100910000895FC01662311F461E003C06B3008F018
:100920006AE0262F215085819681442351F061E0B1
:1009300070E002C0660F771F2A95E2F7682B792BCB
:100940000BC061E070E002C0660F771F2A95E2F7E6
:10095000609570956823792376836583CF010E9423
:1009600024040895FC01862F6B3008F08AE06FEFB5
:100970007FEF02C0660F771F8A95E2F7609570954A
:1009800076836583CF010E9424040895FC0164836B
:10099000658176810E94240408950F931F938C0132
:1009A000862FF8016083118242831382248316828A
:1009B000158261E00E948414F801828161E00E9446
:1009C00084141F910F9108958091C1019091C201EB
:1009D000019731F481E392E06091CF010E941E10F3
:1009E0008091C1019091C2018330910529F0873037
:1009F000910511F0C89741F481E392E060ED71E058
:100A000043E050E00E94ED0F8091C1019091C2013E
:100A10008830910511F0449741F481E392E060ED54
:100A200071E044E050E00E94ED0F8091C10190918F
:100A3000C2018E31910511F0889741F481E392E073
:100A400060ED71E049E050E00E94ED0F08950F93D2
:100A50001F9323C081E392E00E946B0F049741F43F
:100A60001092CE011092CD011092CC011092CB01C8
:100A70000091CB011091CC0181E392E00E94740FB0
:100A8000F801EE0FFF1FEF53FE4F918380830F5F3E
:100A90001F4F1093CC010093CB0181E392E00E94A1
:100AA0006B0F892BB9F61F910F910895AF92BF92EA
:100AB000CF92DF92EF92FF920F931F93DF93CF932A
:100AC000CDB7DEB72C970FB6F894DEBF0FBECDBF03
:100AD0008091CB019091CC01049709F027C78091B8
:100AE000CD019091CE01892B09F020C781E090E0E3
:100AF0009093CE018093CD018091C1019091C2016C
:100B0000019731F48091C3010E9417158093CF01A2
:100B10008091C1019091C201029731F48091C3018B
:100B20006091C5010E94C3148091C1019091C201DE
:100B30000397B1F48091C3010E9402149C01909329
:100B4000DA018093D90160E071E00E94B41B6093E8
:100B5000D101C90160E071E00E94B41B8093D20111
:100B60008091C1019091C201049741F46091C50147
:100B70007091C6018091C3010E9424148091C1012B
:100B80009091C201059731F48091C3016091C50134
:100B90000E9484148091C1019091C201079709F0CD
:100BA00052C08091C3019091C4018093E30190935E
:100BB000E40161E00E9484148091E30160E00E94FE
:100BC000C31482E090E00E94BD138091E30161E0D4
:100BD0000E94C31485E090E00E94BD138091E30160
:100BE00060E00E94C3148091E30160E00E948414DD
:100BF0008091E30161E020E432E44FE050E00E94A4
:100C00006A152AE330E040E050E00E94E91B122F11
:100C1000032FF42EE52E622F732F842F952F20E0C3
:100C200031E040E050E00E94E91B2093D101612FA8
:100C3000702F8F2D9E2D20E031E040E050E00E948B
:100C4000E91B6093D2018091C1019091C20188306B
:100C5000910539F481E08093D10182E08093D20143
:100C600021C0449709F58091DB01882339F480E5A0
:100C700091E00E94CF0D81E08093DB0180E591E05F
:100C80006DED71E04EED51E02FED31E00E94D10CA1
:100C90008091DD018093D1018091DE018093D201AA
:100CA0008091DF018093D3018091C1019091C201B5
:100CB0004E9769F58091DC01882339F481E591E054
:100CC0000E94D10381E08093DC0181E591E00E94E4
:100CD0005003809153018093D10180915201809300
:100CE000D201809151018093D3018091560180936C
:100CF000D401909155019093D50180915701809333
:100D0000D6019093D701809154018093D8018091AE
:100D1000C1019091C201889709F059C08091C50125
:100D20009091C601009731F489E591E06091C3018B
:100D30004BE013C08130910531F489E591E0609179
:100D4000C30146E10AC08230910511F0039741F4D6
:100D500089E591E06091C30145E126E00E94B6017A
:100D600089E591E060E00E94DE0269837A838B83EB
:100D70009C8389E591E00E9487026D837E838F8347
:100D80009887DE011196E1EDF1E020E030E004C04B
:100D90008D9181932F5F3F4F24303105CCF384E058
:100DA00090E09093E6018093E501DE011596E5ED74
:100DB000F1E024E030E004C08D9181932F5F3F4F3C
:100DC00028303105CCF33093E6012093E501809182
:100DD000C1019091C201C297E9F48091C301909141
:100DE000C401482F0297FC0153E0EE0FFF1F5A95F4
:100DF000E1F7E81BF90BE959FE4F642F6F5F20E024
:100E00008091C5019091C601892B09F021E0CF01A5
:100E10000E94CD048091C1019091C201C39771F5E8
:100E20002091C3013091C40122503040C90143E0F8
:100E3000880F991F4A95E1F7821B930B89599E4FA2
:100E40000E94DA038823D1F08091C3019091C401FC
:100E500002979C0103E0220F331F0A95E1F7281B3C
:100E6000390B29593E4F60E08091C5019091C60130
:100E7000892B09F061E0C9010E94C6048091C1017B
:100E80009091C201C49741F52091C3013091C401F2
:100E900022503040C90113E0880F991F1A95E1F7DD
:100EA000821B930B89599E4F0E94DA038823A1F07D
:100EB0002091C3013091C40122503040C901B3E0F8
:100EC000880F991FBA95E1F7821B930B89599E4FA2
:100ED0006091C5010E94B2048091C1019091C2014C
:100EE000C59781F52091C3013091C4012250304053
:100EF000C901A3E0880F991FAA95E1F7821B930B04
:100F000089599E4F0E94DA038823E1F08091C30142
:100F10009091C40102979C01F3E0220F331FFA95D0
:100F2000E1F7281B390B29593E4F40E08091C7015A
:100F30009091C801892B09F041E0C9016091C50178
:100F40000E9489048091C1019091C201C69741F528
:100F50002091C3013091C40122503040C901E3E027
:100F6000880F991FEA95E1F7821B930B89599E4FD1
:100F70000E94DA038823A1F02091C3013091C401BB
:100F800022503040C90173E0880F991F7A95E1F72C
:100F9000821B930B89599E4F6091C5010E946E047C
:100FA0008091C1019091C201C79779F52091C30149
:100FB0003091C40122503040C90163E0880F991F6D
:100FC0006A95E1F7821B930B89599E4F0E94DA03C1
:100FD0008823D9F02091C3013091C40122503040C0
:100FE000C90153E0880F991F5A95E1F7821B930BB3
:100FF0007091C70160E02091C5013091C601622760
:10100000732789599E4F0E9424048091C1019091B9
:10101000C201C89751F52091C3013091C4012250FB
:101020003040C90143E0880F991F4A95E1F7821BC0
:10103000930B89599E4F0E94DA038823B1F02091C7
:10104000C3013091C40122503040C90103E0880F30
:10105000991F0A95E1F7821B930B89599E4F0E94B5
:10106000D6038093D1019093D2018091C1019091D8
:10107000C2018634910591F46091C3017091C4015D
:101080009B0122503040C901880F991F820F931F86
:10109000462F4F5F8F569E4F0E94450F8091C10192
:1010A0009091C2018734910511F52091C3013091CF
:1010B000C40122503040C901880F991F820F931F2D
:1010C0008F569E4F0E94F00D882389F02091C30116
:1010D0003091C40122503040C901880F991F820FFE
:1010E000931F8F569E4F6091C5010E94E00D809125
:1010F000C1019091C2018834910569F52091C30125
:101100003091C40122503040C901880F991F820FCD
:10111000931F8F569E4F0E94F00D8823E1F020917F
:10112000C3013091C40122503040C901880F991F7A
:10113000820F931F7091C70160E02091C50130912B
:10114000C601622773278F569E4F40E024E000E0DF
:10115000EE240E94C50E8091C1019091C201893494
:10116000910569F52091C3013091C40122503040AE
:10117000C901880F991F820F931F8F569E4F0E949F
:10118000F00D8823E1F02091C3013091C401225079
:101190003040C901880F991F820F931F7091C701BA
:1011A00060E02091C5013091C601622773278F56F8
:1011B0009E4F41E024E000E0EE240E94C50E8091A5
:1011C000C1019091C2018A349105C1F52091C301FA
:1011D0003091C40122503040C901880F991F820FFD
:1011E000931F8F569E4F0E94F00D882339F1209156
:1011F000C3013091C40122503040C901880F991FAA
:10120000820F931F8F569E4F6091C7010E94E80D79
:1012100089832091C3013091C40122503040C9011B
:10122000880F991F820F931F8F569E4FBE016F5FCD
:101230007F4F41E02091C5010E94820E8091C10143
:101240009091C2018B34910549F52091C3013091F1
:10125000C40122503040C901880F991F820F931F8B
:101260008F569E4F0E94F00D8823C1F08091C701D8
:1012700089832091C3013091C40122503040C901BB
:10128000880F991F820F931F8F569E4FBE016F5F6D
:101290007F4F41E02091C5010E94820E8091C101E3
:1012A0009091C2018C34910509F089C02091C3014D
:1012B0003091C40122503040C901880F991F820F1C
:1012C000931F8F569E4F0E94F00D882309F477C01C
:1012D0008091C3019091C40102979C01220F331F9A
:1012E000280F391F8091C5019091C6016AE070E016
:1012F0000E94B41BC9018F569E4F0E94E80D89833E
:101300008091C3019091C40102979C01220F331F69
:10131000280F391F8091C5019091C6016AE070E0E5
:101320000E94B41B682FC9018F569E4F0E94E80D82
:1013300080688A838091C3019091C40102979C01C7
:10134000220F331F280F391F8091C7019091C801C8
:101350006AE070E00E94B41BC9018F569E4F0E9444
:10136000E80D8B838091C3019091C40102979C0189
:10137000220F331F280F391F8091C7019091C80198
:101380006AE070E00E94B41B682FC9018F569E4F1F
:101390000E94E80D8C832091C3013091C40122503A
:1013A0003040C901880F991F820F931F8F569E4F9F
:1013B000BE016F5F7F4F44E020E00E94820E80916B
:1013C000C1019091C2018D34910509F041C0209175
:1013D000C3013091C40122503040C901880F991FC8
:1013E000820F931F8F569E4F0E94F00D882381F12C
:1013F000F090C501A090C701B090C801AA0CBB1C19
:10140000AA0CBB1CCC24DD2420C08091C301909188
:10141000C40102978C01000F111F080F191F0F56EE
:101420001E4F8F2D0E940214BC01C80140E024E031
:1014300000E0EE240E94C50E6AEF70E080E090E0CC
:101440000E9464130894C11CD11CCA14DB04ECF282
:101450008091C1019091C2018E34910551F5209186
:10146000C3013091C40122503040C901880F991F37
:10147000820F931F8F569E4F0E94F00D8823C9F054
:101480008FEF89878A878B878C872091C301309162
:10149000C40122503040C901880F991F820F931F49
:1014A0008F569E4FBE01675F7F4F44E020E00E9451
:1014B000820E8091C1019091C2018F34910549F54E
:1014C0002091C3013091C40122503040C901880FDE
:1014D000991F820F931F8F569E4F0E94F00D8823F5
:1014E000C1F019861A861B861C862091C301309193
:1014F000C40122503040C901880F991F820F931FE9
:101500008F569E4FBE01675F7F4F44E020E00E94F0
:10151000820E8091C1019091C2018A35910569F4D2
:101520008091C3018093E0018091C5018093E10126
:101530008091C7018093E20119C08B359105B1F408
:101540006091C3017091C4019B0122503040C901D8
:10155000880F991F880F991F820F931F462F4F5F87
:101560008D559E4F2091C5010E9489018091C10136
:101570009091C2018C35910509F055C06091C3016D
:101580007091C4019B0122503040C901880F991FFE
:10159000880F991F820F931F462F4F5F8D559E4FC7
:1015A0002091C5010E9489012091C7013091C80195
:1015B000C9018470907095958795959587954FEFA3
:1015C00050E0849FC02C1124C901827090709595C1
:1015D0008795849FD02C112421703070249F102D6A
:1015E0001124EE24FF2418C02091C3013091C401BE
:1015F00022503040C901880F991F880F991F820F10
:10160000931F8D559E4F6E2D4C2D2D2D012F0E9419
:1016100015010894E11CF11C8091C5019091C6014F
:10162000E816F9060CF38091C1019091C2018D3545
:10163000910509F078C08091C5019091C601892B70
:10164000D1F42091C3013091C40122503040C9012E
:10165000880F991F880F991F820F931F8D559E4FDA
:101660006091C7014091E0012091E1010091E20108
:101670000E94150158C02091C3013091C40122502D
:101680003040C901880F991F880F991F820F931F3F
:101690008D559E4F0E94B000EE24FF24C82EDD24FD
:1016A0003EC08091C5019091C6018130910541F401
:1016B0008091C7019091C801E816F906A9F42CC0E1
:1016C0008230910541F48091C7019091C8018E1537
:1016D0009F0554F421C00397F9F48091C7019091BC
:1016E000C801E816F906C4F02091C3013091C40185
:1016F00022503040C901880F991F880F991F820F0F
:10170000931F8D559E4F6E2D4091E0012091E10178
:101710000091E2010E9415010894E11CF11CEC14F7
:10172000FD040CF4BECF8091C1019091C2018E35B1
:10173000910509F053C08091C7019091C801181616
:10174000190634F081E090E09093C8018093C701BE
:101750002091C3013091C40122503040C901880F4B
:10176000991F880F991F820F931F8D559E4F0E94BE
:10177000B000E090C501F090C601C82EDD242BC05A
:101780008091C5019091C6016091C7017091C80117
:101790009701281B390BC9010E94B41B892BC1F486
:1017A0002091C3013091C40122503040C901880FFB
:1017B000991F880F991F820F931F8D559E4F6E2D75
:1017C0004091E0012091E1010091E2010E941501A8
:1017D0000894E11CF11CEC14FD0494F28091C10109
:1017E0009091C2018F35910509F0A0C02091C301ED
:1017F0003091C40122503040C901880F991F880FD1
:10180000991F820F931F8D559E4F0E94B000682F25
:101810008091C7019091C801892B09F03FC0EE2447
:10182000FF24C62EDD2436C08091C5019091C601EB
:10183000E816F906BCF42091C3013091C40122508E
:101840003040C901880F991F880F991F820F931F7D
:101850008D559E4F6E2D4091E0012091E101009148
:10186000E20113C02091C3013091C40122503040E5
:10187000C901880F991F880F991F820F931F8D55DB
:101880009E4F6E2D40E020E000E00E94150108947C
:10189000E11CF11CEC14FD043CF248C0A62EBB2454
:1018A000162FEE24FF2465013AC08091C501909166
:1018B000C601A501481B590B24173507BCF0209120
:1018C000C3013091C40122503040C901880F991FD3
:1018D000880F991F820F931F8D559E4F612F409146
:1018E000E0012091E1010091E20113C02091C301C8
:1018F0003091C40122503040C901880F991F880FD0
:10190000991F820F931F8D559E4F612F40E020E05D
:1019100000E00E9415010894E11CF11C1150960191
:101920002E193F09EC14FD0409F0BFCF2C960FB619
:10193000F894DEBF0FBECDBFCF91DF911F910F9105
:10194000FF90EF90DF90CF90BF90AF900895EF920F
:10195000FF920F931F936CEBE62E63E0F62EC70108
:1019600040E855E260E070E00E94901601E312E06A
:10197000C80164E070E00E949510C80167E275E05C
:101980000E94CC0FC80164EE74E00E94D10FC70121
:101990006AE071E00E948F181F910F91FF90EF9005
:1019A00008952F923F925F926F927F928F929F92B3
:1019B000AF92BF92CF92DF92EF92FF920F931F935D
:1019C000DF93CF93CDB7DEB727970FB6F894DEBF7E
:1019D0000FBECDBF1B015D834C833F832E830E94CE
:1019E00056137B018C010CC00E9456136E197F099F
:1019F000800B910B655F7140804090400CF08AC075
:101A000081E392E00E946B0F181619066CF380E4D4
:101A10008B838A83898381E392E00E94740F81E340
:101A200092E06CE470E043E050E00E9472100E948B
:101A30005613AC01CB01DA013C014D016E01089453
:101A4000C11CD11CAA24BB2434C083E0A816B10455
:101A5000FCF40E9456137B018C0137014801F6010A
:101A6000808112C081E392E00E94740F582E0E9480
:101A700056136E197F09800B910B63337105810535
:101A800091050CF047C0852D803460F7F601808306
:101A90000E9456130894C11CD11C66197709880945
:101AA0009909655F714080409040A4F50894A11C9D
:101AB000B11C81E392E00E946B0F892B31F6898182
:101AC00090E0880F991F880F991F982F87FD9D5FC1
:101AD00095959595F10190838A8190E0880F991FE3
:101AE000880F991F982F87FD9D5F95959595EC819F
:101AF000FD8190838B8190E0880F991F880F991F3B
:101B0000982F87FD9D5F95959595EE81FF81908338
:101B100081E001C080E027960FB6F894DEBF0FBECB
:101B2000CDBFCF91DF911F910F91FF90EF90DF908C
:101B3000CF90BF90AF909F908F907F906F905F906D
:101B40003F902F900895EF92FF920F931F93162FBF
:101B5000042F51E3E52E52E0F52EC7010E947610C6
:101B6000C7016CE470E00E94610FC701612F0E9401
:101B70001E10C701602F0E941E10C7010E94611035
:101B80001F910F91FF90EF900895462F68E00E94FB
:101B9000A30D0895462F67E00E94A30D08950F93AB
:101BA0001F938C0160E00E94CA0DC80160E00E9492
:101BB000C50DC80161E00E94CA0D1F910F910895E3
:101BC000FC01683010F06FE001C0685F6283089527
:101BD000E62FF0E0EF70F070E85EFE4F8081089530
:101BE000FC018081811181E00895FF920F931F9382
:101BF000CF93DF93EC01162FFF24888161E00E94D0
:101C0000841482E390E00E94BD13012F10E000FFD6
:101C100003C0898160E002C0898161E00E94841470
:101C200082E390E00E94BD13888160E00E948414EA
:101C300082E390E00E94BD13F39488E0F81621F04F
:101C400015950795102FD9CF888161E00E948414E3
:101C5000898160E00E94841482E390E00E94BD13B9
:101C6000888160E00E94841482E390E00E94BD13AA
:101C700089810E941715182F882321F4898161E03A
:101C80000E94841482E390E00E94BD13888161E089
:101C90000E94841482E390E00E94BD13812F1111F1
:101CA00081E0DF91CF911F910F91FF9008950F93E5
:101CB0001F938C01FC01818161E00E94841482E306
:101CC00090E00E94BD13F801808160E00E948414BE
:101CD00082E390E00E94BD13F801818160E00E94E0
:101CE000841482E390E00E94BD131F910F91089528
:101CF000FC01818161E00E94841482E390E00E94F3
:101D0000BD130895DF92EF92FF920F931F93CF932D
:101D1000DF93EC01062FF72ED42E122F0E94780E9F
:101D2000CE0160E40E94F50DCE010E94570ECE0157
:101D30000E94780E13701054CE01612F0E94F50D91
:101D4000202F3F2DC9017C0110E007C0CE01F70113
:101D500061917F010E94F50D1F5F1D15B8F3CE0143
:101D60000E94570ECE010E94780E6A816058CE0103
:101D70000E94F50DCE010E94570EDF91CF911F9169
:101D80000F91FF90EF90DF9008955F926F927F9296
:101D90008F929F92AF92BF92CF92DF92EF92FF927B
:101DA0000F931F93DF93CF9300D000D0CDB7DEB752
:101DB0005C016B01742E922E602E8E2C2EE2E22E90
:101DC00021E0F22E9E012F5F3F4FE1E040E09FE3D4
:101DD000592ED7010D911C91C601B8010E94B41B68
:101DE0006115710561F4772021F4EE2311F0433081
:101DF00019F4D9015C9216C0D9011C9213C0E62FC8
:101E0000F0E0EF70F070E85EFE4F8081F9018083B2
:101E1000609FC001619F900D709F900D1124C81AA2
:101E2000D90AE0E0882031F0413021F4D9018C91C9
:101E300080688C934F5F8EEF9FEFE80EF91E2F5F47
:101E40003F4F443031F684E090E089199109BE019A
:101E50006F5F7F4F680F791FC501492D262D0E94A6
:101E6000820E0F900F900F900F90CF91DF911F91E6
:101E70000F91FF90EF90DF90CF90BF90AF909F9029
:101E80008F907F906F905F9008950F931F938C01B8
:101E9000862FF8016083418360E00E948414F8017A
:101EA000818160E00E948414F801808160E00E94DA
:101EB000C314F801818160E00E94C3141F910F9147
:101EC000089581E080932C026093090210922A0207
:101ED00010922B0208952091080230E080910702B1
:101EE000281B3109C9010895409107028091080219
:101EF000481718F02FEF3FEF0AC0E42FF0E0E95148
:101F0000FE4F8081282F30E04F5F40930702C901C8
:101F10000895E091070280910802E81718F0EFEFAA
:101F2000FFEF06C0F0E0E951FE4F8081E82FF0E0BE
:101F3000CF0108950895AC0120912F023091300215
:101F400021153105E1F09091070280910802981760
:101F5000B0F090E008C0FA01EA0FFB1F8081A951A0
:101F6000BE4F8C939F5FA92FB0E0A617B7079CF3D5
:101F70001092070260930802CB01F90109950895B8
:101F8000E0912D02F0912E02309729F010922A0252
:101F900010922B02099508957093300260932F02DE
:101FA000089570932E0260932D02089510923402CA
:101FB0001092330288EE93E0A0E0B0E08093350207
:101FC00090933602A0933702B093380284E391E0F5
:101FD00090933202809331020895CF92DF92EF9274
:101FE000FF920F931F93CF93DF937C016B018A01C4
:101FF00080912C028823A1F0C0E0D0E00DC0D70171
:10200000ED91FC91D601AC0FBD1F0190F081E02D48
:10201000C7016C9109952196C017D10780F304C0C0
:10202000CB01642F0E943A11C801DF91CF911F911B
:102030000F91FF90EF90DF90CF900895DF93CF93B3
:102040000F92CDB7DEB7FC01698380912C02882303
:10205000C9F080912B02803238F081E090E09383C8
:10206000828320E030E015C080912A02E82FF0E062
:10207000E65FFD4F998190838F5F80932A02809362
:102080002B0205C0CE01019661E00E943A1121E0C9
:1020900030E0C9010F90CF91DF9108950F93062F83
:1020A000809109026AE072E040912B0221E00E94D7
:1020B000E51010922A0210922B0210922C020F911E
:1020C000089561E00E944E100895413208F040E208
:1020D000862F67EE71E00E949C1010920702809399
:1020E0000802089521E00E946510089510920702E9
:1020F0001092080210922A0210922B020E94F012F3
:1021000008950F931F938C01862F0E94981080ECE6
:102110009FE00E945A118BE99FE00E945511C8016F
:102120000E9476101F910F9108950E9481100895CA
:10213000880F8093BA000895382F413210F040E0A4
:1021400042C080913D028823E1F791E090933D02E7
:1021500020933F028FEF8093AA02109265024150B4
:10216000409366024F5F90933E0280913E02330F90
:10217000832B80933E0280914002813041F4109283
:10218000400280913E028093BB0085EC01C085EE49
:102190008093BC0080913D028130E1F38091650223
:1021A000841710F44091650220E030E00AC0FB0182
:1021B000E20FF31FD901AB5BBD4F8C9180832F5F82
:1021C0003F4F2417A0F3842F08950F931F93582F88
:1021D000122F413210F081E04AC080913D028823E5
:1021E000E1F782E080933D0200933F028FEF8093FE
:1021F000AA021092650240936602A5E4B2E0FB01D8
:1022000002C081918D938E2F861B8417D0F310927C
:102210003E0280913E02550F852B80933E028091B5
:102220004002813041F41092400280913E0280933E
:10223000BB0085EC01C085EE8093BC00112321F02A
:1022400080913D028230E1F38091AA028F3F11F428
:1022500080E00DC08091AA02803211F482E007C0B4
:102260008091AA02803311F084E001C083E01F91C5
:102270000F910895482F613210F081E00895809108
:102280003D02843011F082E0089560938802A7E651
:10229000B2E0842F9C01F90102C081918D938E2FB1
:1022A000841B8617D0F380E00895909344028093B6
:1022B00043020895909342028093410208951F9231
:1022C0000F920FB60F9211242F933F934F935F936A
:1022D0006F937F938F939F93AF93BF93EF93FF93EE
:1022E0008091B90090E0887F90708036910509F464
:1022F000F2C081369105CCF58832910509F47BC096
:1023000089329105B4F48031910509F46FC08131AF
:1023100091053CF4009709F447C1089709F04FC1B3
:1023200065C08831910509F466C0809709F047C1FE
:1023300082C08034910509F4A4C08134910544F42D
:102340008033910509F482C0C89709F038C189C06B
:102350008035910509F489C08835910509F496C046
:102360008834910509F02BC1AEC08839910509F474
:1023700013C189399105ECF48837910509F4ABC094
:10238000893791054CF48836910509F4A4C080374B
:10239000910509F014C19FC08838910509F4FCC06B
:1023A0008039910509F49DC08038910509F007C175
:1023B00098C0803B910509F4C6C0813B91054CF45F
:1023C000803A910509F49FC0883A910509F0F7C059
:1023D000BAC0803C910509F4E3C0883C910509F43A
:1023E000DFC0883B910509F0EAC0C2C080913E027F
:1023F0008093BB00CFC090916502809166029817D0
:1024000068F490916502E92FF0E0EB5BFD4F80816D
:102410008093BB009F5F90936502BCC080913F0298
:10242000882309F44BC085ED8093BC008091BC00EB
:1024300084FDFCCFC2C080E28093AA0285ED809328
:10244000BC008091BC0084FDFCCFB7C080E38093CA
:10245000AA0285ED8093BC008091BC0084FDFCCF76
:10246000ACC088E38093AA029BC0809165029091E2
:10247000BB00E82FF0E0EB5BFD4F90838F5F809314
:102480006502909165028091660282C0809165022A
:102490009091BB00E82FF0E0EB5BFD4F90838F5FE6
:1024A0008093650280913F02882341F085ED8093FF
:1024B000BC008091BC0084FDFCCF7FC081E0809394
:1024C000400284EA6EC085ED8093BC008091BC0020
:1024D00084FDFCCF72C083E080933D021092A9027C
:1024E00059C08091A902803208F056C08091A9029B
:1024F0009091BB00E82FF0E0E757FD4F90838F5F8E
:102500008093A90247C08091A902803230F4E09103
:10251000A902F0E0E757FD4F108285ED8093BC00E3
:102520008091BC0084FDFCCF10923D026091A90215
:10253000E0914302F091440289E892E070E009954D
:102540001092A9022DC084E080933D021092870270
:1025500010928802E0914102F09142020995809127
:102560008802882329F481E0809388021092670210
:1025700090918702E92FF0E0E959FD4F8081809327
:10258000BB009F5F909387029091870280918802A1
:10259000981710F485EC01C085E88093BC000FC04B
:1025A00085EC8093BC0009C01092AA0285ED80934F
:1025B000BC008091BC0084FDFCCF10923D02FF91D5
:1025C000EF91BF91AF919F918F917F916F915F91AB
:1025D0004F913F912F910F900FBE0F901F90189524
:1025E00010923D0281E080933F021092400282E10E
:1025F00061E00E94C31483E161E00E94C314E9EB2F
:10260000F0E080818E7F808380818D7F808388E46D
:102610008093B80085E48093BC0008951F920F92C8
:102620000FB60F9211242F933F938F939F93AF93E5
:10263000BF938091AF029091B002A091B102B0918E
:10264000B2023091B3020196A11DB11D232F2D5F5F
:102650002D3720F02D570196A11DB11D2093B302F7
:102660008093AF029093B002A093B102B093B202F4
:102670008091AB029091AC02A091AD02B091AE02FC
:102680000196A11DB11D8093AB029093AC02A09363
:10269000AD02B093AE02BF91AF919F918F913F91E8
:1026A0002F910F900FBE0F901F9018958FB7F89431
:1026B0002091AF023091B0024091B1025091B2022C
:1026C0008FBFB901CA0108959B01AC017FB7F8948F
:1026D0008091AB029091AC02A091AD02B091AE029C
:1026E00066B5A89B05C06F3F19F00196A11DB11DED
:1026F0007FBFBA2FA92F982F8827860F911DA11D64
:10270000B11D62E0880F991FAA1FBB1F6A95D1F700
:10271000BC012DC0FFB7F8948091AB029091AC0240
:10272000A091AD02B091AE02E6B5A89B05C0EF3F07
:1027300019F00196A11DB11DFFBFBA2FA92F982F27
:1027400088278E0F911DA11DB11DE2E0880F991FF2
:10275000AA1FBB1FEA95D1F7861B970B885E934093
:10276000C8F2215030404040504068517C4F211504
:1027700031054105510571F60895019739F0880F2B
:10278000991F880F991F02970197F1F70895789480
:1027900084B5826084BD84B5816084BD85B5826066
:1027A00085BD85B5816085BDEEE6F0E08081816004
:1027B0008083E1E8F0E01082808182608083808104
:1027C00081608083E0E8F0E0808181608083E1EBDC
:1027D000F0E0808184608083E0EBF0E080818160C4
:1027E0008083EAE7F0E0808184608083808182607A
:1027F0008083808181608083808180688083109263
:10280000C1000895982F8E3008F09E5097708091E7
:1028100011018295880F880F807C892B80937C0022
:1028200080917A00806480937A0080917A0086FD9E
:10283000FCCF2091780040917900942F80E030E027
:10284000282B392BC90108951F93CF93DF93182F9D
:10285000EB0161E00E948414209709F44AC0CF3F45
:10286000D10509F449C0E12FF0E0E255FF4F849112
:102870008330C1F0843028F4813051F08230B1F5DA
:102880000CC0863019F1873049F1843079F514C0D5
:1028900084B5806884BDC7BD33C084B5806284BD03
:1028A000C8BD2EC080918000806880938000D09346
:1028B0008900C093880024C080918000806280934A
:1028C0008000D0938B00C0938A001AC08091B00022
:1028D00080688093B000C093B30012C08091B000B4
:1028E00080628093B000C093B4000AC0C038D105A4
:1028F0001CF4812F60E002C0812F61E00E94C314AC
:10290000DF91CF911F910895CF93DF93482F50E02F
:10291000CA0186569F4FFC0134914A575F4FFA0116
:102920008491882369F190E0880F991FFC01E85990
:10293000FF4FA591B491FC01EE58FF4FC591D49182
:10294000662351F42FB7F8948C91932F9095892397
:102950008C93888189230BC0623061F42FB7F8947F
:102960008C91932F909589238C938881832B8883D6
:102970002FBF06C09FB7F8948C91832B8C939FBF79
:10298000DF91CF910895482F50E0CA0182559F4FA3
:10299000FC012491CA0186569F4FFC0194914A572D
:1029A0005F4FFA013491332309F440C0222351F1DF
:1029B000233071F0243028F42130A1F0223011F5B9
:1029C00014C02630B1F02730C1F02430D9F404C04F
:1029D000809180008F7703C0809180008F7D8093ED
:1029E000800010C084B58F7702C084B58F7D84BD10
:1029F00009C08091B0008F7703C08091B0008F7DB7
:102A00008093B000E32FF0E0EE0FFF1FEE58FF4F72
:102A1000A591B4912FB7F894662321F48C919095E9
:102A2000892302C08C91892B8C932FBF0895682F26
:102A300070E0CB0182559F4FFC012491CB0186565B
:102A40009F4FFC0144916A577F4FFB01949199235A
:102A500019F420E030E03CC0222351F1233071F022
:102A6000243028F42130A1F0223011F514C0263092
:102A7000B1F02730C1F02430D9F404C08091800037
:102A80008F7703C0809180008F7D8093800010C07D
:102A900084B58F7702C084B58F7D84BD09C08091D5
:102AA000B0008F7703C08091B0008F7D8093B0001D
:102AB000892F90E0880F991F84589F4FFC01A591A2
:102AC000B4918C9120E030E0842311F021E030E0DB
:102AD000C90108958F929F92AF92BF92CF92DF92D9
:102AE000EF92FF920F931F93CF93DF93A82FB0E045
:102AF000CD0186569F4FFC018490AA57BF4FFD0120
:102B00008491662311F4992401C0982C6FEFA62EAE
:102B10006FEFB62E6FEFC62E6FE0D62EA222B32235
:102B2000C422D522682F70E0660F771F64587F4F4C
:102B3000EE24FF248701FB01A591B4910BC0EA1498
:102B4000FB040C051D0509F44EC00894E11CF11CA2
:102B5000011D111D8C918821891589F30CC0EA147F
:102B6000FB040C051D0509F43EC00894E11CF11C92
:102B7000011D111D03C0FB01A591B4918C91882109
:102B8000891569F720E030E040E050E0FB01C59195
:102B9000D4910FC0DA01C9018E0D9F1DA01FB11F76
:102BA0008A159B05AC05BD05F1F02F5F3F4F4F4FD8
:102BB0005F4F88818821891569F3CA01B90125E130
:102BC00030E040E050E00E94951B9B01AC01205F8B
:102BD0003F4F4F4F5F4F84E0569547953795279568
:102BE0008A95D1F704C020E030E040E050E0B90120
:102BF000CA01DF91CF911F910F91FF90EF90DF906D
:102C0000CF90BF90AF909F908F90089508951F929E
:102C10000F920FB60F9211242F933F934F938F93E0
:102C20009F93EF93FF938091C00082FD1DC0409160
:102C3000C60020913403309135032F5F3F4F2F772B
:102C4000307080913603909137032817390771F05F
:102C5000E0913403F0913503EC54FD4F4083309301
:102C600035032093340302C08091C600FF91EF9199
:102C70009F918F914F913F912F910F900FBE0F9089
:102C80001F901895E091C803F091C903E058FF4FD9
:102C90008191919120813181821B930B8F7790706C
:102CA000892B11F00E94061608951F920F920FB6FD
:102CB0000F9211242F933F938F939F93EF93FF9342
:102CC0002091B8033091B9038091BA039091BB036E
:102CD0002817390731F48091C1008F7D8093C1009E
:102CE00014C0E091BA03F091BB03E85CFC4F208173
:102CF0008091BA039091BB0301968F779070909367
:102D0000BB038093BA032093C600FF91EF919F917C
:102D10008F913F912F910F900FBE0F901F9018959C
:102D2000AF92BF92DF92EF92FF920F931F93CF93D8
:102D3000DF93EC017A018B01DD24403081EE5807EE
:102D400080E0680780E0780711F0DD24D39491E0FB
:102D5000A92EB12CEC89FD89DD2069F0C50108A000
:102D600002C0880F991F0A94E2F7808360E079E03F
:102D70008DE390E005C0108260E874E88EE190E099
:102D8000A80197010E94C71B21503040404050408D
:102D9000569547953795279580E12030380720F0E4
:102DA000DD2011F0DD24D6CFE889F9893083EA8966
:102DB000FB89208319A2EE89FF89408121E030E060
:102DC000C9010C8C02C0880F991F0A94E2F7482BA6
:102DD0004083EE89FF894081C9010D8C02C0880FB4
:102DE000991F0A94E2F7482B4083EE89FF894081BE
:102DF000C9010E8C02C0880F991F0A94E2F7482B74
:102E00004083EE89FF8980810F8C02C0220F331F1F
:102E10000A94E2F7209528232083DF91CF911F9118
:102E20000F91FF90EF90DF90BF90AF900895DC017D
:102E30001C96ED91FC911D97E058FF4F2191319127
:102E400080819181281B390B2F773070C90108953B
:102E5000DC011C96ED91FC911D97E058FF4F2081FD
:102E60003181E058F040DF01AE57BF4F8D919C910A
:102E700011972817390719F42FEF3FEF07C08D91ED
:102E80009C91E80FF91F8081282F30E0C901089537
:102E9000DC011C96ED91FC911D97E058FF4F2081BD
:102EA0003181E058F040DF01AE57BF4F8D919C91CA
:102EB00011972817390719F42FEF3FEF10C08D91A4
:102EC0009C911197E80FF91F20818D919C9111978A
:102ED00001968F77907011969C938E9330E0C90184
:102EE0000895DC0191968C919197882339F054963E
:102EF000ED91FC915597808186FFF9CF91961C92B8
:102F00000895CF93DF93EC01EE85FF85E058FF4FE6
:102F100020813181E058F0402F5F3F4F2F77307094
:102F2000DF01AE57BF4F8D919C911197281739073C
:102F3000D1F3E058FF4F80819181E058F040E80FD5
:102F4000F91F6083EE85FF85E058FF4F31832083B2
:102F5000EE89FF89208181E090E00F8C02C0880F0C
:102F6000991F0A94E2F7282B208381E089A3EC893A
:102F7000FD8980818064808381E090E0DF91CF9142
:102F800008951092BF031092BE0388EE93E0A0E074
:102F9000B0E08093C0039093C103A093C203B093A9
:102FA000C30384E491E09093BD038093BC0384EB5E
:102FB00092E09093C9038093C80388E393E09093D1
:102FC000CB038093CA0385EC90E09093CD0380936C
:102FD000CC0384EC90E09093CF038093CE0380ECFD
:102FE00090E09093D1038093D00381EC90E0909394
:102FF000D3038093D20382EC90E09093D503809327
:10300000D40386EC90E09093D7038093D60384E0BA
:103010008093D80383E08093D90387E08093DA0319
:1030200085E08093DB0381E08093DC030895CF93F8
:10303000DF930E94C7130E94A70CC2E4D6E10E944E
:1030400056052097E1F30E944216F9CFCF92DF9206
:10305000EF92FF920F931F93CF93DF937C016B014D
:103060008A01C0E0D0E00FC0D6016D916D01D7019B
:10307000ED91FC910190F081E02DC7010995C80FF9
:10308000D91F015010400115110571F7CE01DF91D4
:10309000CF911F910F91FF90EF90DF90CF90089507
:1030A000EF92FF920F931F938C01DC01ED91FC9145
:1030B0000190F081E02D6DE009957C01D801ED9142
:1030C000FC910190F081E02DC8016AE009959C0116
:1030D0002E0D3F1DC9011F910F91FF90EF90089594
:1030E000CF93DF93EC016115710519F420E030E016
:1030F0000FC0DB010D900020E9F71197A61BB70B5D
:10310000E881F9810280F381E02DAD0109959C01F0
:10311000C901DF91CF9108950E9470180895EF9230
:10312000FF920F931F937C010E9470188C01C701BE
:103130000E945018080F191FC8011F910F91FF908E
:10314000EF9008950F931F93CF93DF93BC018230CC
:10315000910510F462E070E0E091E003F091E1038A
:1031600040E050E0A0E0B0E024C08081918186176B
:103170009707D0F08617970771F482819381109793
:1031800029F013969C938E9312972CC09093E10391
:103190008093E00327C04115510519F08417950766
:1031A00018F48D01AC01EF01DF01828193819C0154
:1031B000F9013097D1F641155105F9F0CA01861B86
:1031C000970B8430910580F48A819B81011511054C
:1031D00021F0F8019383828304C09093E1038093EC
:1031E000E003FE01329645C0FE01E80FF91F61932E
:1031F00071930297998388833CC08091DE039091FC
:10320000DF03892B41F48091140190911501909373
:10321000DF038093DE0340911601509117014115A1
:10322000510541F44DB75EB78091120190911301A1
:10323000481B590B2091DE033091DF03241735071B
:10324000B0F4CA01821B930B8617970780F0AB017D
:103250004E5F5F4F8417950750F0420F531F5093F6
:10326000DF034093DE03F9016193719302C0E0E054
:10327000F0E0CF01DF91CF911F910F910895CF938F
:10328000DF939C01009709F48FC0EC0122971B8209
:103290001A826091E0037091E1036115710581F478
:1032A00088819981820F931F2091DE033091DF0383
:1032B0002817390739F5D093DF03C093DE0374C0B4
:1032C000DB0140E050E0AC17BD0708F1BB83AA83E7
:1032D000FE0121913191E20FF31FAE17BF0779F480
:1032E0008D919C911197280F391F2E5F3F4F398385
:1032F000288312968D919C9113979B838A83411505
:10330000510571F4D093E103C093E0034DC01296D0
:103310008D919C911397AD01009711F0DC01D3CFF3
:10332000DA011396DC93CE931297FA012191319131
:10333000E20FF31FCE17DF0769F488819981280F08
:10334000391F2E5F3F4FFA01318320838A819B8191
:1033500093838283E0E0F0E0DB0112968D919C91F3
:103360001397009719F0BC01FD01F6CFAB014E5F3A
:103370005F4FDB018D919C91840F951F2091DE039F
:103380003091DF032817390779F4309729F4109228
:10339000E1031092E00302C01382128242505040B7
:1033A0005093DF034093DE03DF91CF91089550588F
:1033B000BB27AA270ED01CC10DD130F012D120F0AE
:1033C00031F49F3F11F41EF402C10EF4E095E7FBC7
:1033D000F8C0E92F1ED180F3BA176207730784077C
:1033E000950718F071F49EF536C10EF4E0950B2E9A
:1033F000BA2FA02D0B01B90190010C01CA01A00147
:103400001124FF27591B99F0593F50F4503E68F1A1
:103410001A16F040A22F232F342F4427585FF3CFE2
:10342000469537952795A795F0405395C9F77EF4B3
:103430001F16BA0B620B730B840BBAF09150A1F0FC
:10344000FF0FBB1F661F771F881FC2F70EC0BA0F82
:10345000621F731F841F48F4879577956795B7950A
:10346000F7959E3F08F0B3CF9395880F08F0992702
:10347000EE0F9795879508950CD0BAC0B2D040F062
:10348000A9D030F021F45F3F19F09BC05111E4C086
:103490009EC0BFD098F39923C9F35523B1F3951B70
:1034A000550BBB27AA2762177307840738F09F5F65
:1034B0005F4F220F331F441FAA1FA9F333D00E2ED4
:1034C0003AF0E0E830D091505040E695001CCAF741
:1034D00029D0FE2F27D0660F771F881FBB1F261706
:1034E00037074807AB07B0E809F0BB0B802DBF01D9
:1034F000FF2793585F4F2AF09E3F510568F061C047
:10350000ABC05F3FECF3983EDCF38695779567950B
:10351000B795F7959F5FC9F7880F911D9695879589
:1035200097F90895E1E0660F771F881FBB1F6217A8
:1035300073078407BA0720F0621B730B840BBA0B66
:10354000EE1F88F7E0950895E89409C097FB3EF4D4
:1035500090958095709561957F4F8F4F9F4F9923E0
:10356000A9F0F92F96E9BB279395F695879577955E
:103570006795B795F111F8CFFAF4BB0F11F460FF1E
:103580001BC06F5F7F4F8F4F9F4F16C0882311F076
:1035900096E911C0772321F09EE8872F762F05C08A
:1035A000662371F096E8862F70E060E02AF09A9525
:1035B000660F771F881FDAF7880F9695879597F91A
:1035C000089597F99F6780E870E060E008959FEFA5
:1035D00080EC089500240A941616170618060906AA
:1035E000089500240A941216130614060506089579
:1035F000092E0394000C11F4882352F0BB0F40F401
:10360000BF2B11F460FF04C06F5F7F4F8F4F9F4F40
:10361000089557FD9058440F551F59F05F3F71F0C2
:103620004795880F97FB991F61F09F3F79F0879529
:103630000895121613061406551FF2CF4695F1DFB2
:1036400008C0161617061806991FF1CF8695710542
:10365000610508940895E894BB2766277727CB0176
:1036600097F908950BD0C4CFB5DF28F0BADF18F072
:10367000952309F0A6CFABCF1124EECFCADFA0F37C
:10368000959FD1F3950F50E0551F629FF001729FF7
:10369000BB27F00DB11D639FAA27F00DB11DAA1F16
:1036A000649F6627B00DA11D661F829F2227B00D63
:1036B000A11D621F739FB00DA11D621F839FA00DEE
:1036C000611D221F749F3327A00D611D231F849F3E
:1036D000600D211D822F762F6A2F11249F57504095
:1036E0008AF0E1F088234AF0EE0FFF1FBB1F661F30
:1036F000771F881F91505040A9F79E3F510570F0E9
:1037000060CFAACF5F3FECF3983EDCF386957795C8
:103710006795B795F795E7959F5FC1F7FE2B880FE3
:10372000911D9695879597F90895629FD001739F93
:10373000F001829FE00DF11D649FE00DF11D929F4D
:10374000F00D839FF00D749FF00D659FF00D99278C
:10375000729FB00DE11DF91F639FB00DE11DF91FB0
:10376000BD01CF011124089597FB092E07260AD029
:1037700077FD04D049D006D000201AF470956195E9
:103780007F4F0895F6F7909581959F4F0895A1E298
:103790001A2EAA1BBB1BFD010DC0AA1FBB1FEE1FCB
:1037A000FF1FA217B307E407F50720F0A21BB30B16
:1037B000E40BF50B661F771F881F991F1A9469F792
:1037C00060957095809590959B01AC01BD01CF01EE
:1037D000089597FB092E05260ED057FD04D0D7DF9C
:1037E0000AD0001C38F450954095309521953F4FF4
:1037F0004F4F5F4F0895F6F79095809570956195BE
:103800007F4F8F4F9F4F0895AA1BBB1B51E107C0ED
:10381000AA1FBB1FA617B70710F0A61BB70B881F60
:10382000991F5A95A9F780959095BC01CD010895EF
:10383000EE0FFF1F0590F491E02D0994F894FFCF4F
:1038400052656164206661696C005265616479212A
:1038500000018000E20300003F065B4F666D7D07BC
:103860007F6F777C395E797101000A006400E8039C
:10387000000000001E10ED0F6B0F740F890F9A0FE0
:10388000000000008117261817174817281771170E
:00000001FF

View file

@ -0,0 +1,906 @@
:100000000C9463000C948B000C948B000C948B006C
:100010000C948B000C948B000C948B000C948B0034
:100020000C948B000C948B000C948B000C948B0024
:100030000C948B000C948B000C948B000C948B0014
:100040000C940E130C948B000C9407160C945516FC
:100050000C948B000C948B000C948B000C948B00F4
:100060000C945F110C948B0000000000240027000A
:100070002A0000000000250028002B0000000000DE
:1000800023002600290004040404040404040202DA
:100090000202020203030303030301020408102007
:1000A0004080010204081020010204081020000012
:1000B0000007000201000003040600000000000029
:1000C0000000D60FC11711241FBECFEFD8E0DEBF4E
:1000D000CDBF11E0A0E0B1E0E0E4F8E302C005909C
:1000E0000D92A035B107D9F713E0A0E5B1E001C04A
:1000F0001D92A23EB107E1F710E0C6ECD0E004C0CB
:100100002297FE010E941A1CC23CD107C9F70E9427
:1001100017180C941E1C0C9400000F931F93CF9380
:10012000DF93689F8001699F100D789F100D112447
:10013000C8010E94A218EC01009729F060E070E06D
:10014000A8010E94A900CE01DF91CF911F910F91CC
:100150000895DC0101C06D9341505040E0F70895CF
:10016000FC01828108950F931F938C01FC01808113
:1001700060E00E94C31484E190E00E94BD13F80186
:10018000808161E00E94C31484E190E00E94BD136D
:100190001F910F9108950F931F93CF93DF93EC015D
:1001A000062F10E007FF03C0898161E002C089814A
:1001B00060E00E94C314CE010E94B3001F5F18309C
:1001C00011F0000FEFCFDF91CF911F910F910895A4
:1001D000FF920F931F93CF93DF93EC01F62E042F22
:1001E000122F27FD02C060EE01C060EC16FF6061B7
:1001F00007FF686006FF6460F7FE6260F6FE6160FC
:10020000CE010E94CB00CE01612F0E94CB00CE0117
:10021000602F0E94CB00CE016F2D0E94CB00DF919A
:10022000CF911F910F91FF9008956F927F928F92BF
:100230009F92AF92BF92CF92DF92EF92FF920F9375
:100240001F93CF93DF93EC01E62E742E822E902E17
:1002500060E00E94CB00CE0160E00E94CB00CE01A6
:1002600060E00E94CB00CE0160E00E94CB0083E002
:10027000E89E8001112458010894A11CB11C92E051
:10028000C92ED12CC00ED11EFF2483E0682E1FC0C2
:10029000FE1479F4EB81FC81E00FF11F7082EB8199
:1002A000FC81EA0DFB1D8082EB81FC81EC0DFD1DC4
:1002B0009082EB81FC81F69CC0011124E80FF91FAC
:1002C000CE016081418122810E94E800F3948A81FD
:1002D000F816F0F2CE0160E00E94CB00CE0160E0A3
:1002E0000E94CB00CE0160E00E94CB00CE0160E016
:1002F0000E94CB00DF91CF911F910F91FF90EF9063
:10030000DF90CF90BF90AF909F908F907F906F9035
:1003100008950F931F93CF93DF93EC01862F68838B
:1003200049832A8361E00E948414898161E00E94EC
:1003300084149A8183E0989FC001112461E070E0E9
:100340000E948D008B839C8310E008C0CE01612F3A
:1003500040E020E000E00E9415011F5F8A8118172D
:10036000A8F3DF91CF911F910F9108950F931F93E1
:100370008C01862FF80166834783208791E095875B
:1003800060E00E948414F801868161E00E94C31439
:10039000F80111861286138614861F910F91089515
:1003A000CF92DF92EF92FF920F931F93CF93DF9341
:1003B000EC018E8161E00E94C3146AEF70E080E07E
:1003C00090E00E9464130E9456139B01AC01898542
:1003D0009A85AB85BC85281739074A075B0720F447
:1003E00019861A861B861C868D85882371F489855B
:1003F0009A85AB85BC85281B390B4A0B5B0B205DAE
:1004000037404040504008F477C01D860E94561384
:1004100069877A878B879C871C821B821A82198244
:1004200018828E8161E00E9484148E8160E00E94B7
:10043000C31464E170E080E090E00E946413F894DB
:100440008E8161E00E94C31488E290E00E94BD1397
:100450008E8160E00E94841481E0EE2400E010E0D0
:100460000AC0F39481E090E00E94BD138FEFF8166C
:1004700029F40AC0822FFF24C82EDD248E810E9419
:1004800017158C159D0569F38E810E941715282F6D
:100490008FEFF816C9F0043090F000FD10C08E2DDB
:1004A000869586958695FE01E80FF11D9081990F3E
:1004B000908388858F1510F491609083E3940F5F8B
:1004C0001F4F05351105B1F6789487E28E1510F0AF
:1004D00030E013C030E04C8150E02981888190E009
:1004E000820F911D2A81820F911D2B81820F911DF8
:1004F00090704817590709F431E0832FDF91CF91AD
:100500001F910F91FF90EF90DF90CF900895EF92A1
:10051000FF920F931F93CF93DF93EC010E94D001C2
:100520008823A9F18F818B3031F08B3080F1855198
:10053000823068F507C0688170E080E090E00E943A
:10054000A41A22C0688170E080E090E00E94A41AA2
:1005500020E030E040E853E40E94321B7B018C0134
:10056000698170E0882777FD8095982F0E94A61AF0
:100570009B01AC01C801B7010E94D81920E030E00E
:1005800040E251E40E943C1AE62F692F0AC08CEB2E
:1005900093E060E071E00E948C18E0E070E080EC95
:1005A0006FE72E2F372F482F562FB901CA01DF9141
:1005B000CF911F910F91FF90EF900895CF92DF920E
:1005C000EF92FF920F931F93CF93DF93EC01C62E10
:1005D0000E94D001882309F450C08F818B3041F0F4
:1005E0008B3008F44AC08551823008F046C007C0FD
:1005F0006A8170E080E090E00E94A41A29C0DA804D
:100600006D2D70E06F777070882777FD8095982F3B
:100610000E94A61A20E030E040E853E40E94321B1A
:100620007B018C016B8170E0882777FD8095982F86
:100630000E94A61A9B01AC01C801B7010E94D819FB
:1006400020E030E040E251E40E943C1AD7FC905890
:10065000CC20E9F020E030E040E151E40E94321B80
:1006600020E030E040EA50E40E943C1A20E030E014
:1006700040E052E40E94D8190AC08CEB93E060E09D
:1006800071E00E948C1860E070E080EC9FE7DF91E1
:10069000CF911F910F91FF90EF90DF90CF90089531
:1006A000DF92EF92FF920F931F937C0101E312E020
:1006B000C80168E670E00E94610FC80160E00E9416
:1006C0001E10C8010E946110C80168E670E047E092
:1006D00050E00E947210C8010E94740F282F2F77DB
:1006E00022952F703AE0D32E2D9D900111248F700A
:1006F000820FF7018083C8010E94740F282F229572
:100700002F702D9D900111248F70820FF70181832E
:10071000C8010E94740F282F2F7322952F702D9DD2
:10072000900111248F70820FF7018283C8010E940B
:10073000740F282F22952F702D9D900111248F70FA
:10074000820FF7018383C8010E94740F282F22951E
:100750002F702D9D900111248F70820FF7018483DB
:10076000C8010E94740F282F22952F702D9D900193
:1007700011248F70820FF7018583C8010E94740FC6
:10078000282F22952F702D9D900111248F70820F9C
:10079000F701868317821F910F91FF90EF90DF90F2
:1007A000089581E392E00E9476100895FC0185810E
:1007B00096810895FC0120E080819181892B09F0C8
:1007C00021E0822F0895FF920F931F93CF93DF9321
:1007D000EC018B01FF24612F661F6627661F8A814B
:1007E0000E94C31488810E94171560E0892B09F4C8
:1007F00061E088810E94C314000F111FF39480E10F
:10080000F81649F7DF91CF911F910F91FF9008954E
:100810001F93CF93DF93EC018A8160E00E94C314A1
:100820008AE090E00E94BD1310E08A8161E00E949E
:10083000C3148A8160E00E94C3141F5F1430A9F7BB
:10084000DF91CF911F910895EF92FF920F931F9325
:10085000CF93DF93EC017B01CB0193709E838D835B
:10086000CE0160E070E00E94E30300E010E08C81C4
:10087000882351F0C701002E02C0880F991F0A94E7
:10088000E2F791FD0DC009C0C701002E02C0969588
:1008900087950A94E2F780FD03C060E070E002C033
:1008A0006FEF70E0CE010E94E3030F5F1F4F0A302D
:1008B0001105E9F6CE0160E070E00E94E303CE018D
:1008C00060E070E00E94E303CE010E940804DF9123
:1008D000CF911F910F91FF90EF900895FC01662337
:1008E00011F481E004C0862F6B3008F08AE081505B
:1008F00061E070E002C0660F771F8A95E2F785819C
:1009000096816827792776836583CF010E94240426
:100910000895FC01662311F461E003C06B3008F018
:100920006AE0262F215085819681442351F061E0B1
:1009300070E002C0660F771F2A95E2F7682B792BCB
:100940000BC061E070E002C0660F771F2A95E2F7E6
:10095000609570956823792376836583CF010E9423
:1009600024040895FC01862F6B3008F08AE06FEFB5
:100970007FEF02C0660F771F8A95E2F7609570954A
:1009800076836583CF010E9424040895FC0164836B
:10099000658176810E94240408950F931F938C0132
:1009A000862FF8016083118242831382248316828A
:1009B000158261E00E948414F801828161E00E9446
:1009C00084141F910F9108958091C1019091C201EB
:1009D000019731F481E392E06091CF010E941E10F3
:1009E0008091C1019091C2018330910529F0873037
:1009F000910511F0C89741F481E392E060ED71E058
:100A000043E050E00E94ED0F8091C1019091C2013E
:100A10008830910511F0449741F481E392E060ED54
:100A200071E044E050E00E94ED0F8091C10190918F
:100A3000C2018E31910511F0889741F481E392E073
:100A400060ED71E049E050E00E94ED0F08950F93D2
:100A50001F9323C081E392E00E946B0F049741F43F
:100A60001092CE011092CD011092CC011092CB01C8
:100A70000091CB011091CC0181E392E00E94740FB0
:100A8000F801EE0FFF1FEF53FE4F918380830F5F3E
:100A90001F4F1093CC010093CB0181E392E00E94A1
:100AA0006B0F892BB9F61F910F910895AF92BF92EA
:100AB000CF92DF92EF92FF920F931F93DF93CF932A
:100AC000CDB7DEB72C970FB6F894DEBF0FBECDBF03
:100AD0008091CB019091CC01049709F027C78091B8
:100AE000CD019091CE01892B09F020C781E090E0E3
:100AF0009093CE018093CD018091C1019091C2016C
:100B0000019731F48091C3010E9417158093CF01A2
:100B10008091C1019091C201029731F48091C3018B
:100B20006091C5010E94C3148091C1019091C201DE
:100B30000397B1F48091C3010E9402149C01909329
:100B4000DA018093D90160E071E00E94B41B6093E8
:100B5000D101C90160E071E00E94B41B8093D20111
:100B60008091C1019091C201049741F46091C50147
:100B70007091C6018091C3010E9424148091C1012B
:100B80009091C201059731F48091C3016091C50134
:100B90000E9484148091C1019091C201079709F0CD
:100BA00052C08091C3019091C4018093E30190935E
:100BB000E40161E00E9484148091E30160E00E94FE
:100BC000C31482E090E00E94BD138091E30161E0D4
:100BD0000E94C31485E090E00E94BD138091E30160
:100BE00060E00E94C3148091E30160E00E948414DD
:100BF0008091E30161E020E432E44FE050E00E94A4
:100C00006A152AE330E040E050E00E94E91B122F11
:100C1000032FF42EE52E622F732F842F952F20E0C3
:100C200031E040E050E00E94E91B2093D101612FA8
:100C3000702F8F2D9E2D20E031E040E050E00E948B
:100C4000E91B6093D2018091C1019091C20188306B
:100C5000910539F481E08093D10182E08093D20143
:100C600021C0449709F58091DB01882339F480E5A0
:100C700091E00E94CF0D81E08093DB0180E591E05F
:100C80006DED71E04EED51E02FED31E00E94D10CA1
:100C90008091DD018093D1018091DE018093D201AA
:100CA0008091DF018093D3018091C1019091C201B5
:100CB0004E9769F58091DC01882339F481E591E054
:100CC0000E94D10381E08093DC0181E591E00E94E4
:100CD0005003809153018093D10180915201809300
:100CE000D201809151018093D3018091560180936C
:100CF000D401909155019093D50180915701809333
:100D0000D6019093D701809154018093D8018091AE
:100D1000C1019091C201889709F059C08091C50125
:100D20009091C601009731F489E591E06091C3018B
:100D30004BE013C08130910531F489E591E0609179
:100D4000C30146E10AC08230910511F0039741F4D6
:100D500089E591E06091C30145E126E00E94B6017A
:100D600089E591E060E00E94DE0269837A838B83EB
:100D70009C8389E591E00E9487026D837E838F8347
:100D80009887DE011196E1EDF1E020E030E004C04B
:100D90008D9181932F5F3F4F24303105CCF384E058
:100DA00090E09093E6018093E501DE011596E5ED74
:100DB000F1E024E030E004C08D9181932F5F3F4F3C
:100DC00028303105CCF33093E6012093E501809182
:100DD000C1019091C201C297E9F48091C301909141
:100DE000C401482F0297FC0153E0EE0FFF1F5A95F4
:100DF000E1F7E81BF90BE959FE4F642F6F5F20E024
:100E00008091C5019091C601892B09F021E0CF01A5
:100E10000E94CD048091C1019091C201C39771F5E8
:100E20002091C3013091C40122503040C90143E0F8
:100E3000880F991F4A95E1F7821B930B89599E4FA2
:100E40000E94DA038823D1F08091C3019091C401FC
:100E500002979C0103E0220F331F0A95E1F7281B3C
:100E6000390B29593E4F60E08091C5019091C60130
:100E7000892B09F061E0C9010E94C6048091C1017B
:100E80009091C201C49741F52091C3013091C401F2
:100E900022503040C90113E0880F991F1A95E1F7DD
:100EA000821B930B89599E4F0E94DA038823A1F07D
:100EB0002091C3013091C40122503040C901B3E0F8
:100EC000880F991FBA95E1F7821B930B89599E4FA2
:100ED0006091C5010E94B2048091C1019091C2014C
:100EE000C59781F52091C3013091C4012250304053
:100EF000C901A3E0880F991FAA95E1F7821B930B04
:100F000089599E4F0E94DA038823E1F08091C30142
:100F10009091C40102979C01F3E0220F331FFA95D0
:100F2000E1F7281B390B29593E4F40E08091C7015A
:100F30009091C801892B09F041E0C9016091C50178
:100F40000E9489048091C1019091C201C69741F528
:100F50002091C3013091C40122503040C901E3E027
:100F6000880F991FEA95E1F7821B930B89599E4FD1
:100F70000E94DA038823A1F02091C3013091C401BB
:100F800022503040C90173E0880F991F7A95E1F72C
:100F9000821B930B89599E4F6091C5010E946E047C
:100FA0008091C1019091C201C79779F52091C30149
:100FB0003091C40122503040C90163E0880F991F6D
:100FC0006A95E1F7821B930B89599E4F0E94DA03C1
:100FD0008823D9F02091C3013091C40122503040C0
:100FE000C90153E0880F991F5A95E1F7821B930BB3
:100FF0007091C70160E02091C5013091C601622760
:10100000732789599E4F0E9424048091C1019091B9
:10101000C201C89751F52091C3013091C4012250FB
:101020003040C90143E0880F991F4A95E1F7821BC0
:10103000930B89599E4F0E94DA038823B1F02091C7
:10104000C3013091C40122503040C90103E0880F30
:10105000991F0A95E1F7821B930B89599E4F0E94B5
:10106000D6038093D1019093D2018091C1019091D8
:10107000C2018634910591F46091C3017091C4015D
:101080009B0122503040C901880F991F820F931F86
:10109000462F4F5F8F569E4F0E94450F8091C10192
:1010A0009091C2018734910511F52091C3013091CF
:1010B000C40122503040C901880F991F820F931F2D
:1010C0008F569E4F0E94F00D882389F02091C30116
:1010D0003091C40122503040C901880F991F820FFE
:1010E000931F8F569E4F6091C5010E94E00D809125
:1010F000C1019091C2018834910569F52091C30125
:101100003091C40122503040C901880F991F820FCD
:10111000931F8F569E4F0E94F00D8823E1F020917F
:10112000C3013091C40122503040C901880F991F7A
:10113000820F931F7091C70160E02091C50130912B
:10114000C601622773278F569E4F40E024E000E0DF
:10115000EE240E94C50E8091C1019091C201893494
:10116000910569F52091C3013091C40122503040AE
:10117000C901880F991F820F931F8F569E4F0E949F
:10118000F00D8823E1F02091C3013091C401225079
:101190003040C901880F991F820F931F7091C701BA
:1011A00060E02091C5013091C601622773278F56F8
:1011B0009E4F41E024E000E0EE240E94C50E8091A5
:1011C000C1019091C2018A349105C1F52091C301FA
:1011D0003091C40122503040C901880F991F820FFD
:1011E000931F8F569E4F0E94F00D882339F1209156
:1011F000C3013091C40122503040C901880F991FAA
:10120000820F931F8F569E4F6091C7010E94E80D79
:1012100089832091C3013091C40122503040C9011B
:10122000880F991F820F931F8F569E4FBE016F5FCD
:101230007F4F41E02091C5010E94820E8091C10143
:101240009091C2018B34910549F52091C3013091F1
:10125000C40122503040C901880F991F820F931F8B
:101260008F569E4F0E94F00D8823C1F08091C701D8
:1012700089832091C3013091C40122503040C901BB
:10128000880F991F820F931F8F569E4FBE016F5F6D
:101290007F4F41E02091C5010E94820E8091C101E3
:1012A0009091C2018C34910509F089C02091C3014D
:1012B0003091C40122503040C901880F991F820F1C
:1012C000931F8F569E4F0E94F00D882309F477C01C
:1012D0008091C3019091C40102979C01220F331F9A
:1012E000280F391F8091C5019091C6016AE070E016
:1012F0000E94B41BC9018F569E4F0E94E80D89833E
:101300008091C3019091C40102979C01220F331F69
:10131000280F391F8091C5019091C6016AE070E0E5
:101320000E94B41B682FC9018F569E4F0E94E80D82
:1013300080688A838091C3019091C40102979C01C7
:10134000220F331F280F391F8091C7019091C801C8
:101350006AE070E00E94B41BC9018F569E4F0E9444
:10136000E80D8B838091C3019091C40102979C0189
:10137000220F331F280F391F8091C7019091C80198
:101380006AE070E00E94B41B682FC9018F569E4F1F
:101390000E94E80D8C832091C3013091C40122503A
:1013A0003040C901880F991F820F931F8F569E4F9F
:1013B000BE016F5F7F4F44E020E00E94820E80916B
:1013C000C1019091C2018D34910509F041C0209175
:1013D000C3013091C40122503040C901880F991FC8
:1013E000820F931F8F569E4F0E94F00D882381F12C
:1013F000F090C501A090C701B090C801AA0CBB1C19
:10140000AA0CBB1CCC24DD2420C08091C301909188
:10141000C40102978C01000F111F080F191F0F56EE
:101420001E4F8F2D0E940214BC01C80140E024E031
:1014300000E0EE240E94C50E6AEF70E080E090E0CC
:101440000E9464130894C11CD11CCA14DB04ECF282
:101450008091C1019091C2018E34910551F5209186
:10146000C3013091C40122503040C901880F991F37
:10147000820F931F8F569E4F0E94F00D8823C9F054
:101480008FEF89878A878B878C872091C301309162
:10149000C40122503040C901880F991F820F931F49
:1014A0008F569E4FBE01675F7F4F44E020E00E9451
:1014B000820E8091C1019091C2018F34910549F54E
:1014C0002091C3013091C40122503040C901880FDE
:1014D000991F820F931F8F569E4F0E94F00D8823F5
:1014E000C1F019861A861B861C862091C301309193
:1014F000C40122503040C901880F991F820F931FE9
:101500008F569E4FBE01675F7F4F44E020E00E94F0
:10151000820E8091C1019091C2018A35910569F4D2
:101520008091C3018093E0018091C5018093E10126
:101530008091C7018093E20119C08B359105B1F408
:101540006091C3017091C4019B0122503040C901D8
:10155000880F991F880F991F820F931F462F4F5F87
:101560008D559E4F2091C5010E9489018091C10136
:101570009091C2018C35910509F055C06091C3016D
:101580007091C4019B0122503040C901880F991FFE
:10159000880F991F820F931F462F4F5F8D559E4FC7
:1015A0002091C5010E9489012091C7013091C80195
:1015B000C9018470907095958795959587954FEFA3
:1015C00050E0849FC02C1124C901827090709595C1
:1015D0008795849FD02C112421703070249F102D6A
:1015E0001124EE24FF2418C02091C3013091C401BE
:1015F00022503040C901880F991F880F991F820F10
:10160000931F8D559E4F6E2D4C2D2D2D012F0E9419
:1016100015010894E11CF11C8091C5019091C6014F
:10162000E816F9060CF38091C1019091C2018D3545
:10163000910509F078C08091C5019091C601892B70
:10164000D1F42091C3013091C40122503040C9012E
:10165000880F991F880F991F820F931F8D559E4FDA
:101660006091C7014091E0012091E1010091E20108
:101670000E94150158C02091C3013091C40122502D
:101680003040C901880F991F880F991F820F931F3F
:101690008D559E4F0E94B000EE24FF24C82EDD24FD
:1016A0003EC08091C5019091C6018130910541F401
:1016B0008091C7019091C801E816F906A9F42CC0E1
:1016C0008230910541F48091C7019091C8018E1537
:1016D0009F0554F421C00397F9F48091C7019091BC
:1016E000C801E816F906C4F02091C3013091C40185
:1016F00022503040C901880F991F880F991F820F0F
:10170000931F8D559E4F6E2D4091E0012091E10178
:101710000091E2010E9415010894E11CF11CEC14F7
:10172000FD040CF4BECF8091C1019091C2018E35B1
:10173000910509F053C08091C7019091C801181616
:10174000190634F081E090E09093C8018093C701BE
:101750002091C3013091C40122503040C901880F4B
:10176000991F880F991F820F931F8D559E4F0E94BE
:10177000B000E090C501F090C601C82EDD242BC05A
:101780008091C5019091C6016091C7017091C80117
:101790009701281B390BC9010E94B41B892BC1F486
:1017A0002091C3013091C40122503040C901880FFB
:1017B000991F880F991F820F931F8D559E4F6E2D75
:1017C0004091E0012091E1010091E2010E941501A8
:1017D0000894E11CF11CEC14FD0494F28091C10109
:1017E0009091C2018F35910509F0A0C02091C301ED
:1017F0003091C40122503040C901880F991F880FD1
:10180000991F820F931F8D559E4F0E94B000682F25
:101810008091C7019091C801892B09F03FC0EE2447
:10182000FF24C62EDD2436C08091C5019091C601EB
:10183000E816F906BCF42091C3013091C40122508E
:101840003040C901880F991F880F991F820F931F7D
:101850008D559E4F6E2D4091E0012091E101009148
:10186000E20113C02091C3013091C40122503040E5
:10187000C901880F991F880F991F820F931F8D55DB
:101880009E4F6E2D40E020E000E00E94150108947C
:10189000E11CF11CEC14FD043CF248C0A62EBB2454
:1018A000162FEE24FF2465013AC08091C501909166
:1018B000C601A501481B590B24173507BCF0209120
:1018C000C3013091C40122503040C901880F991FD3
:1018D000880F991F820F931F8D559E4F612F409146
:1018E000E0012091E1010091E20113C02091C301C8
:1018F0003091C40122503040C901880F991F880FD0
:10190000991F820F931F8D559E4F612F40E020E05D
:1019100000E00E9415010894E11CF11C1150960191
:101920002E193F09EC14FD0409F0BFCF2C960FB619
:10193000F894DEBF0FBECDBFCF91DF911F910F9105
:10194000FF90EF90DF90CF90BF90AF900895EF920F
:10195000FF920F931F936CEBE62E63E0F62EC70108
:1019600040E855E260E070E00E94901601E312E06A
:10197000C80164E070E00E949510C80167E275E05C
:101980000E94CC0FC80164EE74E00E94D10FC70121
:101990006AE071E00E948F181F910F91FF90EF9005
:1019A00008952F923F925F926F927F928F929F92B3
:1019B000AF92BF92CF92DF92EF92FF920F931F935D
:1019C000DF93CF93CDB7DEB727970FB6F894DEBF7E
:1019D0000FBECDBF1B015D834C833F832E830E94CE
:1019E00056137B018C010CC00E9456136E197F099F
:1019F000800B910B655F7140804090400CF08AC075
:101A000081E392E00E946B0F181619066CF380E4D4
:101A10008B838A83898381E392E00E94740F81E340
:101A200092E06CE470E043E050E00E9472100E948B
:101A30005613AC01CB01DA013C014D016E01089453
:101A4000C11CD11CAA24BB2434C083E0A816B10455
:101A5000FCF40E9456137B018C0137014801F6010A
:101A6000808112C081E392E00E94740F582E0E9480
:101A700056136E197F09800B910B63337105810535
:101A800091050CF047C0852D803460F7F601808306
:101A90000E9456130894C11CD11C66197709880945
:101AA0009909655F714080409040A4F50894A11C9D
:101AB000B11C81E392E00E946B0F892B31F6898182
:101AC00090E0880F991F880F991F982F87FD9D5FC1
:101AD00095959595F10190838A8190E0880F991FE3
:101AE000880F991F982F87FD9D5F95959595EC819F
:101AF000FD8190838B8190E0880F991F880F991F3B
:101B0000982F87FD9D5F95959595EE81FF81908338
:101B100081E001C080E027960FB6F894DEBF0FBECB
:101B2000CDBFCF91DF911F910F91FF90EF90DF908C
:101B3000CF90BF90AF909F908F907F906F905F906D
:101B40003F902F900895EF92FF920F931F93162FBF
:101B5000042F51E3E52E52E0F52EC7010E947610C6
:101B6000C7016CE470E00E94610FC701612F0E9401
:101B70001E10C701602F0E941E10C7010E94611035
:101B80001F910F91FF90EF900895462F68E00E94FB
:101B9000A30D0895462F67E00E94A30D08950F93AB
:101BA0001F938C0160E00E94CA0DC80160E00E9492
:101BB000C50DC80161E00E94CA0D1F910F910895E3
:101BC000FC01683010F06FE001C0685F6283089527
:101BD000E62FF0E0EF70F070E85EFE4F8081089530
:101BE000FC018081811181E00895FF920F931F9382
:101BF000CF93DF93EC01162FFF24888161E00E94D0
:101C0000841482E390E00E94BD13012F10E000FFD6
:101C100003C0898160E002C0898161E00E94841470
:101C200082E390E00E94BD13888160E00E948414EA
:101C300082E390E00E94BD13F39488E0F81621F04F
:101C400015950795102FD9CF888161E00E948414E3
:101C5000898160E00E94841482E390E00E94BD13B9
:101C6000888160E00E94841482E390E00E94BD13AA
:101C700089810E941715182F882321F4898161E03A
:101C80000E94841482E390E00E94BD13888161E089
:101C90000E94841482E390E00E94BD13812F1111F1
:101CA00081E0DF91CF911F910F91FF9008950F93E5
:101CB0001F938C01FC01818161E00E94841482E306
:101CC00090E00E94BD13F801808160E00E948414BE
:101CD00082E390E00E94BD13F801818160E00E94E0
:101CE000841482E390E00E94BD131F910F91089528
:101CF000FC01818161E00E94841482E390E00E94F3
:101D0000BD130895DF92EF92FF920F931F93CF932D
:101D1000DF93EC01062FF72ED42E122F0E94780E9F
:101D2000CE0160E40E94F50DCE010E94570ECE0157
:101D30000E94780E13701054CE01612F0E94F50D91
:101D4000202F3F2DC9017C0110E007C0CE01F70113
:101D500061917F010E94F50D1F5F1D15B8F3CE0143
:101D60000E94570ECE010E94780E6A816058CE0103
:101D70000E94F50DCE010E94570EDF91CF911F9169
:101D80000F91FF90EF90DF9008955F926F927F9296
:101D90008F929F92AF92BF92CF92DF92EF92FF927B
:101DA0000F931F93DF93CF9300D000D0CDB7DEB752
:101DB0005C016B01742E922E602E8E2C2EE2E22E90
:101DC00021E0F22E9E012F5F3F4FE1E040E09FE3D4
:101DD000592ED7010D911C91C601B8010E94B41B68
:101DE0006115710561F4772021F4EE2311F0433081
:101DF00019F4D9015C9216C0D9011C9213C0E62FC8
:101E0000F0E0EF70F070E85EFE4F8081F9018083B2
:101E1000609FC001619F900D709F900D1124C81AA2
:101E2000D90AE0E0882031F0413021F4D9018C91C9
:101E300080688C934F5F8EEF9FEFE80EF91E2F5F47
:101E40003F4F443031F684E090E089199109BE019A
:101E50006F5F7F4F680F791FC501492D262D0E94A6
:101E6000820E0F900F900F900F90CF91DF911F91E6
:101E70000F91FF90EF90DF90CF90BF90AF909F9029
:101E80008F907F906F905F9008950F931F938C01B8
:101E9000862FF8016083418360E00E948414F8017A
:101EA000818160E00E948414F801808160E00E94DA
:101EB000C314F801818160E00E94C3141F910F9147
:101EC000089581E080932C026093090210922A0207
:101ED00010922B0208952091080230E080910702B1
:101EE000281B3109C9010895409107028091080219
:101EF000481718F02FEF3FEF0AC0E42FF0E0E95148
:101F0000FE4F8081282F30E04F5F40930702C901C8
:101F10000895E091070280910802E81718F0EFEFAA
:101F2000FFEF06C0F0E0E951FE4F8081E82FF0E0BE
:101F3000CF0108950895AC0120912F023091300215
:101F400021153105E1F09091070280910802981760
:101F5000B0F090E008C0FA01EA0FFB1F8081A951A0
:101F6000BE4F8C939F5FA92FB0E0A617B7079CF3D5
:101F70001092070260930802CB01F90109950895B8
:101F8000E0912D02F0912E02309729F010922A0252
:101F900010922B02099508957093300260932F02DE
:101FA000089570932E0260932D02089510923402CA
:101FB0001092330288EE93E0A0E0B0E08093350207
:101FC00090933602A0933702B093380284E391E0F5
:101FD00090933202809331020895CF92DF92EF9274
:101FE000FF920F931F93CF93DF937C016B018A01C4
:101FF00080912C028823A1F0C0E0D0E00DC0D70171
:10200000ED91FC91D601AC0FBD1F0190F081E02D48
:10201000C7016C9109952196C017D10780F304C0C0
:10202000CB01642F0E943A11C801DF91CF911F911B
:102030000F91FF90EF90DF90CF900895DF93CF93B3
:102040000F92CDB7DEB7FC01698380912C02882303
:10205000C9F080912B02803238F081E090E09383C8
:10206000828320E030E015C080912A02E82FF0E062
:10207000E65FFD4F998190838F5F80932A02809362
:102080002B0205C0CE01019661E00E943A1121E0C9
:1020900030E0C9010F90CF91DF9108950F93062F83
:1020A000809109026AE072E040912B0221E00E94D7
:1020B000E51010922A0210922B0210922C020F911E
:1020C000089561E00E944E100895413208F040E208
:1020D000862F67EE71E00E949C1010920702809399
:1020E0000802089521E00E946510089510920702E9
:1020F0001092080210922A0210922B020E94F012F3
:1021000008950F931F938C01862F0E94981080ECE6
:102110009FE00E945A118BE99FE00E945511C8016F
:102120000E9476101F910F9108950E9481100895CA
:10213000880F8093BA000895382F413210F040E0A4
:1021400042C080913D028823E1F791E090933D02E7
:1021500020933F028FEF8093AA02109265024150B4
:10216000409366024F5F90933E0280913E02330F90
:10217000832B80933E0280914002813041F4109283
:10218000400280913E028093BB0085EC01C085EE49
:102190008093BC0080913D028130E1F38091650223
:1021A000841710F44091650220E030E00AC0FB0182
:1021B000E20FF31FD901AB5BBD4F8C9180832F5F82
:1021C0003F4F2417A0F3842F08950F931F93582F88
:1021D000122F413210F081E04AC080913D028823E5
:1021E000E1F782E080933D0200933F028FEF8093FE
:1021F000AA021092650240936602A5E4B2E0FB01D8
:1022000002C081918D938E2F861B8417D0F310927C
:102210003E0280913E02550F852B80933E028091B5
:102220004002813041F41092400280913E0280933E
:10223000BB0085EC01C085EE8093BC00112321F02A
:1022400080913D028230E1F38091AA028F3F11F428
:1022500080E00DC08091AA02803211F482E007C0B4
:102260008091AA02803311F084E001C083E01F91C5
:102270000F910895482F613210F081E00895809108
:102280003D02843011F082E0089560938802A7E651
:10229000B2E0842F9C01F90102C081918D938E2FB1
:1022A000841B8617D0F380E00895909344028093B6
:1022B00043020895909342028093410208951F9231
:1022C0000F920FB60F9211242F933F934F935F936A
:1022D0006F937F938F939F93AF93BF93EF93FF93EE
:1022E0008091B90090E0887F90708036910509F464
:1022F000F2C081369105CCF58832910509F47BC096
:1023000089329105B4F48031910509F46FC08131AF
:1023100091053CF4009709F447C1089709F04FC1B3
:1023200065C08831910509F466C0809709F047C1FE
:1023300082C08034910509F4A4C08134910544F42D
:102340008033910509F482C0C89709F038C189C06B
:102350008035910509F489C08835910509F496C046
:102360008834910509F02BC1AEC08839910509F474
:1023700013C189399105ECF48837910509F4ABC094
:10238000893791054CF48836910509F4A4C080374B
:10239000910509F014C19FC08838910509F4FCC06B
:1023A0008039910509F49DC08038910509F007C175
:1023B00098C0803B910509F4C6C0813B91054CF45F
:1023C000803A910509F49FC0883A910509F0F7C059
:1023D000BAC0803C910509F4E3C0883C910509F43A
:1023E000DFC0883B910509F0EAC0C2C080913E027F
:1023F0008093BB00CFC090916502809166029817D0
:1024000068F490916502E92FF0E0EB5BFD4F80816D
:102410008093BB009F5F90936502BCC080913F0298
:10242000882309F44BC085ED8093BC008091BC00EB
:1024300084FDFCCFC2C080E28093AA0285ED809328
:10244000BC008091BC0084FDFCCFB7C080E38093CA
:10245000AA0285ED8093BC008091BC0084FDFCCF76
:10246000ACC088E38093AA029BC0809165029091E2
:10247000BB00E82FF0E0EB5BFD4F90838F5F809314
:102480006502909165028091660282C0809165022A
:102490009091BB00E82FF0E0EB5BFD4F90838F5FE6
:1024A0008093650280913F02882341F085ED8093FF
:1024B000BC008091BC0084FDFCCF7FC081E0809394
:1024C000400284EA6EC085ED8093BC008091BC0020
:1024D00084FDFCCF72C083E080933D021092A9027C
:1024E00059C08091A902803208F056C08091A9029B
:1024F0009091BB00E82FF0E0E757FD4F90838F5F8E
:102500008093A90247C08091A902803230F4E09103
:10251000A902F0E0E757FD4F108285ED8093BC00E3
:102520008091BC0084FDFCCF10923D026091A90215
:10253000E0914302F091440289E892E070E009954D
:102540001092A9022DC084E080933D021092870270
:1025500010928802E0914102F09142020995809127
:102560008802882329F481E0809388021092670210
:1025700090918702E92FF0E0E959FD4F8081809327
:10258000BB009F5F909387029091870280918802A1
:10259000981710F485EC01C085E88093BC000FC04B
:1025A00085EC8093BC0009C01092AA0285ED80934F
:1025B000BC008091BC0084FDFCCF10923D02FF91D5
:1025C000EF91BF91AF919F918F917F916F915F91AB
:1025D0004F913F912F910F900FBE0F901F90189524
:1025E00010923D0281E080933F021092400282E10E
:1025F00061E00E94C31483E161E00E94C314E9EB2F
:10260000F0E080818E7F808380818D7F808388E46D
:102610008093B80085E48093BC0008951F920F92C8
:102620000FB60F9211242F933F938F939F93AF93E5
:10263000BF938091AF029091B002A091B102B0918E
:10264000B2023091B3020196A11DB11D232F2D5F5F
:102650002D3720F02D570196A11DB11D2093B302F7
:102660008093AF029093B002A093B102B093B202F4
:102670008091AB029091AC02A091AD02B091AE02FC
:102680000196A11DB11D8093AB029093AC02A09363
:10269000AD02B093AE02BF91AF919F918F913F91E8
:1026A0002F910F900FBE0F901F9018958FB7F89431
:1026B0002091AF023091B0024091B1025091B2022C
:1026C0008FBFB901CA0108959B01AC017FB7F8948F
:1026D0008091AB029091AC02A091AD02B091AE029C
:1026E00066B5A89B05C06F3F19F00196A11DB11DED
:1026F0007FBFBA2FA92F982F8827860F911DA11D64
:10270000B11D62E0880F991FAA1FBB1F6A95D1F700
:10271000BC012DC0FFB7F8948091AB029091AC0240
:10272000A091AD02B091AE02E6B5A89B05C0EF3F07
:1027300019F00196A11DB11DFFBFBA2FA92F982F27
:1027400088278E0F911DA11DB11DE2E0880F991FF2
:10275000AA1FBB1FEA95D1F7861B970B885E934093
:10276000C8F2215030404040504068517C4F211504
:1027700031054105510571F60895019739F0880F2B
:10278000991F880F991F02970197F1F70895789480
:1027900084B5826084BD84B5816084BD85B5826066
:1027A00085BD85B5816085BDEEE6F0E08081816004
:1027B0008083E1E8F0E01082808182608083808104
:1027C00081608083E0E8F0E0808181608083E1EBDC
:1027D000F0E0808184608083E0EBF0E080818160C4
:1027E0008083EAE7F0E0808184608083808182607A
:1027F0008083808181608083808180688083109263
:10280000C1000895982F8E3008F09E5097708091E7
:1028100011018295880F880F807C892B80937C0022
:1028200080917A00806480937A0080917A0086FD9E
:10283000FCCF2091780040917900942F80E030E027
:10284000282B392BC90108951F93CF93DF93182F9D
:10285000EB0161E00E948414209709F44AC0CF3F45
:10286000D10509F449C0E12FF0E0E255FF4F849112
:102870008330C1F0843028F4813051F08230B1F5DA
:102880000CC0863019F1873049F1843079F514C0D5
:1028900084B5806884BDC7BD33C084B5806284BD03
:1028A000C8BD2EC080918000806880938000D09346
:1028B0008900C093880024C080918000806280934A
:1028C0008000D0938B00C0938A001AC08091B00022
:1028D00080688093B000C093B30012C08091B000B4
:1028E00080628093B000C093B4000AC0C038D105A4
:1028F0001CF4812F60E002C0812F61E00E94C314AC
:10290000DF91CF911F910895CF93DF93482F50E02F
:10291000CA0186569F4FFC0134914A575F4FFA0116
:102920008491882369F190E0880F991FFC01E85990
:10293000FF4FA591B491FC01EE58FF4FC591D49182
:10294000662351F42FB7F8948C91932F9095892397
:102950008C93888189230BC0623061F42FB7F8947F
:102960008C91932F909589238C938881832B8883D6
:102970002FBF06C09FB7F8948C91832B8C939FBF79
:10298000DF91CF910895482F50E0CA0182559F4FA3
:10299000FC012491CA0186569F4FFC0194914A572D
:1029A0005F4FFA013491332309F440C0222351F1DF
:1029B000233071F0243028F42130A1F0223011F5B9
:1029C00014C02630B1F02730C1F02430D9F404C04F
:1029D000809180008F7703C0809180008F7D8093ED
:1029E000800010C084B58F7702C084B58F7D84BD10
:1029F00009C08091B0008F7703C08091B0008F7DB7
:102A00008093B000E32FF0E0EE0FFF1FEE58FF4F72
:102A1000A591B4912FB7F894662321F48C919095E9
:102A2000892302C08C91892B8C932FBF0895682F26
:102A300070E0CB0182559F4FFC012491CB0186565B
:102A40009F4FFC0144916A577F4FFB01949199235A
:102A500019F420E030E03CC0222351F1233071F022
:102A6000243028F42130A1F0223011F514C0263092
:102A7000B1F02730C1F02430D9F404C08091800037
:102A80008F7703C0809180008F7D8093800010C07D
:102A900084B58F7702C084B58F7D84BD09C08091D5
:102AA000B0008F7703C08091B0008F7D8093B0001D
:102AB000892F90E0880F991F84589F4FFC01A591A2
:102AC000B4918C9120E030E0842311F021E030E0DB
:102AD000C90108958F929F92AF92BF92CF92DF92D9
:102AE000EF92FF920F931F93CF93DF93A82FB0E045
:102AF000CD0186569F4FFC018490AA57BF4FFD0120
:102B00008491662311F4992401C0982C6FEFA62EAE
:102B10006FEFB62E6FEFC62E6FE0D62EA222B32235
:102B2000C422D522682F70E0660F771F64587F4F4C
:102B3000EE24FF248701FB01A591B4910BC0EA1498
:102B4000FB040C051D0509F44EC00894E11CF11CA2
:102B5000011D111D8C918821891589F30CC0EA147F
:102B6000FB040C051D0509F43EC00894E11CF11C92
:102B7000011D111D03C0FB01A591B4918C91882109
:102B8000891569F720E030E040E050E0FB01C59195
:102B9000D4910FC0DA01C9018E0D9F1DA01FB11F76
:102BA0008A159B05AC05BD05F1F02F5F3F4F4F4FD8
:102BB0005F4F88818821891569F3CA01B90125E130
:102BC00030E040E050E00E94951B9B01AC01205F8B
:102BD0003F4F4F4F5F4F84E0569547953795279568
:102BE0008A95D1F704C020E030E040E050E0B90120
:102BF000CA01DF91CF911F910F91FF90EF90DF906D
:102C0000CF90BF90AF909F908F90089508951F929E
:102C10000F920FB60F9211242F933F934F938F93E0
:102C20009F93EF93FF938091C00082FD1DC0409160
:102C3000C60020913403309135032F5F3F4F2F772B
:102C4000307080913603909137032817390771F05F
:102C5000E0913403F0913503EC54FD4F4083309301
:102C600035032093340302C08091C600FF91EF9199
:102C70009F918F914F913F912F910F900FBE0F9089
:102C80001F901895E091C803F091C903E058FF4FD9
:102C90008191919120813181821B930B8F7790706C
:102CA000892B11F00E94061608951F920F920FB6FD
:102CB0000F9211242F933F938F939F93EF93FF9342
:102CC0002091B8033091B9038091BA039091BB036E
:102CD0002817390731F48091C1008F7D8093C1009E
:102CE00014C0E091BA03F091BB03E85CFC4F208173
:102CF0008091BA039091BB0301968F779070909367
:102D0000BB038093BA032093C600FF91EF919F917C
:102D10008F913F912F910F900FBE0F901F9018959C
:102D2000AF92BF92DF92EF92FF920F931F93CF93D8
:102D3000DF93EC017A018B01DD24403081EE5807EE
:102D400080E0680780E0780711F0DD24D39491E0FB
:102D5000A92EB12CEC89FD89DD2069F0C50108A000
:102D600002C0880F991F0A94E2F7808360E079E03F
:102D70008DE390E005C0108260E874E88EE190E099
:102D8000A80197010E94C71B21503040404050408D
:102D9000569547953795279580E12030380720F0E4
:102DA000DD2011F0DD24D6CFE889F9893083EA8966
:102DB000FB89208319A2EE89FF89408121E030E060
:102DC000C9010C8C02C0880F991F0A94E2F7482BA6
:102DD0004083EE89FF894081C9010D8C02C0880FB4
:102DE000991F0A94E2F7482B4083EE89FF894081BE
:102DF000C9010E8C02C0880F991F0A94E2F7482B74
:102E00004083EE89FF8980810F8C02C0220F331F1F
:102E10000A94E2F7209528232083DF91CF911F9118
:102E20000F91FF90EF90DF90BF90AF900895DC017D
:102E30001C96ED91FC911D97E058FF4F2191319127
:102E400080819181281B390B2F773070C90108953B
:102E5000DC011C96ED91FC911D97E058FF4F2081FD
:102E60003181E058F040DF01AE57BF4F8D919C910A
:102E700011972817390719F42FEF3FEF07C08D91ED
:102E80009C91E80FF91F8081282F30E0C901089537
:102E9000DC011C96ED91FC911D97E058FF4F2081BD
:102EA0003181E058F040DF01AE57BF4F8D919C91CA
:102EB00011972817390719F42FEF3FEF10C08D91A4
:102EC0009C911197E80FF91F20818D919C9111978A
:102ED00001968F77907011969C938E9330E0C90184
:102EE0000895DC0191968C919197882339F054963E
:102EF000ED91FC915597808186FFF9CF91961C92B8
:102F00000895CF93DF93EC01EE85FF85E058FF4FE6
:102F100020813181E058F0402F5F3F4F2F77307094
:102F2000DF01AE57BF4F8D919C911197281739073C
:102F3000D1F3E058FF4F80819181E058F040E80FD5
:102F4000F91F6083EE85FF85E058FF4F31832083B2
:102F5000EE89FF89208181E090E00F8C02C0880F0C
:102F6000991F0A94E2F7282B208381E089A3EC893A
:102F7000FD8980818064808381E090E0DF91CF9142
:102F800008951092BF031092BE0388EE93E0A0E074
:102F9000B0E08093C0039093C103A093C203B093A9
:102FA000C30384E491E09093BD038093BC0384EB5E
:102FB00092E09093C9038093C80388E393E09093D1
:102FC000CB038093CA0385EC90E09093CD0380936C
:102FD000CC0384EC90E09093CF038093CE0380ECFD
:102FE00090E09093D1038093D00381EC90E0909394
:102FF000D3038093D20382EC90E09093D503809327
:10300000D40386EC90E09093D7038093D60384E0BA
:103010008093D80383E08093D90387E08093DA0319
:1030200085E08093DB0381E08093DC030895CF93F8
:10303000DF930E94C7130E94A70CC2E4D6E10E944E
:1030400056052097E1F30E944216F9CFCF92DF9206
:10305000EF92FF920F931F93CF93DF937C016B014D
:103060008A01C0E0D0E00FC0D6016D916D01D7019B
:10307000ED91FC910190F081E02DC7010995C80FF9
:10308000D91F015010400115110571F7CE01DF91D4
:10309000CF911F910F91FF90EF90DF90CF90089507
:1030A000EF92FF920F931F938C01DC01ED91FC9145
:1030B0000190F081E02D6DE009957C01D801ED9142
:1030C000FC910190F081E02DC8016AE009959C0116
:1030D0002E0D3F1DC9011F910F91FF90EF90089594
:1030E000CF93DF93EC016115710519F420E030E016
:1030F0000FC0DB010D900020E9F71197A61BB70B5D
:10310000E881F9810280F381E02DAD0109959C01F0
:10311000C901DF91CF9108950E9470180895EF9230
:10312000FF920F931F937C010E9470188C01C701BE
:103130000E945018080F191FC8011F910F91FF908E
:10314000EF9008950F931F93CF93DF93BC018230CC
:10315000910510F462E070E0E091E003F091E1038A
:1031600040E050E0A0E0B0E024C08081918186176B
:103170009707D0F08617970771F482819381109793
:1031800029F013969C938E9312972CC09093E10391
:103190008093E00327C04115510519F08417950766
:1031A00018F48D01AC01EF01DF01828193819C0154
:1031B000F9013097D1F641155105F9F0CA01861B86
:1031C000970B8430910580F48A819B81011511054C
:1031D00021F0F8019383828304C09093E1038093EC
:1031E000E003FE01329645C0FE01E80FF91F61932E
:1031F00071930297998388833CC08091DE039091FC
:10320000DF03892B41F48091140190911501909373
:10321000DF038093DE0340911601509117014115A1
:10322000510541F44DB75EB78091120190911301A1
:10323000481B590B2091DE033091DF03241735071B
:10324000B0F4CA01821B930B8617970780F0AB017D
:103250004E5F5F4F8417950750F0420F531F5093F6
:10326000DF034093DE03F9016193719302C0E0E054
:10327000F0E0CF01DF91CF911F910F910895CF938F
:10328000DF939C01009709F48FC0EC0122971B8209
:103290001A826091E0037091E1036115710581F478
:1032A00088819981820F931F2091DE033091DF0383
:1032B0002817390739F5D093DF03C093DE0374C0B4
:1032C000DB0140E050E0AC17BD0708F1BB83AA83E7
:1032D000FE0121913191E20FF31FAE17BF0779F480
:1032E0008D919C911197280F391F2E5F3F4F398385
:1032F000288312968D919C9113979B838A83411505
:10330000510571F4D093E103C093E0034DC01296D0
:103310008D919C911397AD01009711F0DC01D3CFF3
:10332000DA011396DC93CE931297FA012191319131
:10333000E20FF31FCE17DF0769F488819981280F08
:10334000391F2E5F3F4FFA01318320838A819B8191
:1033500093838283E0E0F0E0DB0112968D919C91F3
:103360001397009719F0BC01FD01F6CFAB014E5F3A
:103370005F4FDB018D919C91840F951F2091DE039F
:103380003091DF032817390779F4309729F4109228
:10339000E1031092E00302C01382128242505040B7
:1033A0005093DF034093DE03DF91CF91089550588F
:1033B000BB27AA270ED01CC10DD130F012D120F0AE
:1033C00031F49F3F11F41EF402C10EF4E095E7FBC7
:1033D000F8C0E92F1ED180F3BA176207730784077C
:1033E000950718F071F49EF536C10EF4E0950B2E9A
:1033F000BA2FA02D0B01B90190010C01CA01A00147
:103400001124FF27591B99F0593F50F4503E68F1A1
:103410001A16F040A22F232F342F4427585FF3CFE2
:10342000469537952795A795F0405395C9F77EF4B3
:103430001F16BA0B620B730B840BBAF09150A1F0FC
:10344000FF0FBB1F661F771F881FC2F70EC0BA0F82
:10345000621F731F841F48F4879577956795B7950A
:10346000F7959E3F08F0B3CF9395880F08F0992702
:10347000EE0F9795879508950CD0BAC0B2D040F062
:10348000A9D030F021F45F3F19F09BC05111E4C086
:103490009EC0BFD098F39923C9F35523B1F3951B70
:1034A000550BBB27AA2762177307840738F09F5F65
:1034B0005F4F220F331F441FAA1FA9F333D00E2ED4
:1034C0003AF0E0E830D091505040E695001CCAF741
:1034D00029D0FE2F27D0660F771F881FBB1F261706
:1034E00037074807AB07B0E809F0BB0B802DBF01D9
:1034F000FF2793585F4F2AF09E3F510568F061C047
:10350000ABC05F3FECF3983EDCF38695779567950B
:10351000B795F7959F5FC9F7880F911D9695879589
:1035200097F90895E1E0660F771F881FBB1F6217A8
:1035300073078407BA0720F0621B730B840BBA0B66
:10354000EE1F88F7E0950895E89409C097FB3EF4D4
:1035500090958095709561957F4F8F4F9F4F9923E0
:10356000A9F0F92F96E9BB279395F695879577955E
:103570006795B795F111F8CFFAF4BB0F11F460FF1E
:103580001BC06F5F7F4F8F4F9F4F16C0882311F076
:1035900096E911C0772321F09EE8872F762F05C08A
:1035A000662371F096E8862F70E060E02AF09A9525
:1035B000660F771F881FDAF7880F9695879597F91A
:1035C000089597F99F6780E870E060E008959FEFA5
:1035D00080EC089500240A941616170618060906AA
:1035E000089500240A941216130614060506089579
:1035F000092E0394000C11F4882352F0BB0F40F401
:10360000BF2B11F460FF04C06F5F7F4F8F4F9F4F40
:10361000089557FD9058440F551F59F05F3F71F0C2
:103620004795880F97FB991F61F09F3F79F0879529
:103630000895121613061406551FF2CF4695F1DFB2
:1036400008C0161617061806991FF1CF8695710542
:10365000610508940895E894BB2766277727CB0176
:1036600097F908950BD0C4CFB5DF28F0BADF18F072
:10367000952309F0A6CFABCF1124EECFCADFA0F37C
:10368000959FD1F3950F50E0551F629FF001729FF7
:10369000BB27F00DB11D639FAA27F00DB11DAA1F16
:1036A000649F6627B00DA11D661F829F2227B00D63
:1036B000A11D621F739FB00DA11D621F839FA00DEE
:1036C000611D221F749F3327A00D611D231F849F3E
:1036D000600D211D822F762F6A2F11249F57504095
:1036E0008AF0E1F088234AF0EE0FFF1FBB1F661F30
:1036F000771F881F91505040A9F79E3F510570F0E9
:1037000060CFAACF5F3FECF3983EDCF386957795C8
:103710006795B795F795E7959F5FC1F7FE2B880FE3
:10372000911D9695879597F90895629FD001739F93
:10373000F001829FE00DF11D649FE00DF11D929F4D
:10374000F00D839FF00D749FF00D659FF00D99278C
:10375000729FB00DE11DF91F639FB00DE11DF91FB0
:10376000BD01CF011124089597FB092E07260AD029
:1037700077FD04D049D006D000201AF470956195E9
:103780007F4F0895F6F7909581959F4F0895A1E298
:103790001A2EAA1BBB1BFD010DC0AA1FBB1FEE1FCB
:1037A000FF1FA217B307E407F50720F0A21BB30B16
:1037B000E40BF50B661F771F881F991F1A9469F792
:1037C00060957095809590959B01AC01BD01CF01EE
:1037D000089597FB092E05260ED057FD04D0D7DF9C
:1037E0000AD0001C38F450954095309521953F4FF4
:1037F0004F4F5F4F0895F6F79095809570956195BE
:103800007F4F8F4F9F4F0895AA1BBB1B51E107C0ED
:10381000AA1FBB1FA617B70710F0A61BB70B881F60
:10382000991F5A95A9F780959095BC01CD010895EF
:10383000EE0FFF1F0590F491E02D0994F894FFCF4F
:1038400052656164206661696C005265616479212A
:1038500000018000E20300003F065B4F666D7D07BC
:103860007F6F777C395E797101000A006400E8039C
:10387000000000001E10ED0F6B0F740F890F9A0FE0
:10388000000000008117261817174817281771170E
:00000001FF

View file

@ -0,0 +1,906 @@
:100000000C9463000C948B000C948B000C948B006C
:100010000C948B000C948B000C948B000C944C1261
:100020000C948B000C948B000C948B000C948B0024
:100030000C948B000C948B000C948B000C948B0014
:100040000C94C8150C948B000C949C170C94D81726
:100050000C948B000C948B000C948B000C948B00F4
:100060000C94F5100C948B000000000700020100B6
:100070000003040600000000000000000102040864
:100080001020408001020408102001020408102002
:10009000040404040404040402020202020203032E
:1000A00003030303000000002300260029000000D2
:1000B0000000250028002B0000000000240027007D
:1000C0002A000410131811241FBECFEFD8E0DEBFA2
:1000D000CDBF11E0A0E0B1E0EAE3F8E302C0059093
:1000E0000D92AA34B107D9F715E0AAE4B1E001C036
:1000F0001D92AD3DB107E1F710E0C6ECD0E004C0C1
:100100002297FE010E94A01AC23CD107C9F70E94A3
:10011000F3160C941B1C0C940000CF93DF93EC019E
:1001200060E088810E94D31484E190E00E947416FC
:1001300061E088810E94D31484E190E0DF91CF9147
:100140000C9474160F931F93CF93DF93EC01062F3B
:1001500018E007FF02C061E001C060E089810E94F1
:10016000D314CE010E948D00000F115091F7DF9142
:10017000CF911F910F910895EF92FF921F93CF930C
:10018000DF9300D0CDB7DEB77C01162F27FF02C06A
:1001900060EC01C060EE26FF606147FF686046FFCB
:1001A000646017FF626016FF6160C70129834A839C
:1001B0000E94A2002981622FC7010E94A2004A81E9
:1001C000642FC7010E94A200612FC7010F900F90FA
:1001D000DF91CF911F91FF90EF900C94A2007F923E
:1001E0008F929F92AF92BF92CF92DF92EF92FF9247
:1001F0000F931F93CF93DF93EC01162F942E822E33
:1002000060E00E94A20060E0CE010E94A20060E0D7
:10021000CE010E94A20060E0CE010E94A20083E015
:10022000189F7001112467018FEFC81AD80A57016F
:1002300082E0A80EB11C712C1FC071120FC0EB819F
:10024000FC81EE0DFF1D9082EB81FC81EC0DFD1D0C
:100250008082EB81FC81EA0DFB1D0083EB81FC8138
:1002600083E0789EE00DF11D11242281418160819F
:10027000CE010E94BC0073948A817816F0F260E08F
:10028000CE010E94A20060E0CE010E94A20060E0C8
:10029000CE010E94A20060E0CE01DF91CF911F91BC
:1002A0000F91FF90EF90DF90CF90BF90AF909F9015
:1002B0008F907F900C94A2000F931F93CF93DF93A6
:1002C000EC01862F688349832A8361E00E949B1496
:1002D00061E089810E949B148A8161E070E023E0E3
:1002E000829FC00111240E94A41A8B839C8310E07A
:1002F00008C000E020E040E0612FCE010E94EF0046
:100300001F5F8A811817A8F3DF91CF911F910F917A
:100310000895FC018281089584E092E00C94A90F75
:10032000CF93DF93EC0168E670E084E092E00E94F6
:10033000E20F60E084E092E00E94690F84E092E0C6
:100340000E94F70F47E050E068E670E084E092E03A
:100350000E94D50F84E092E00E94E70E382F369578
:10036000369536953E70232F220F220F230F8F7064
:100370009927280F288384E092E00E94E70E282F17
:1003800022952F708F7099273AE0239F800D1124BA
:10039000898384E092E00E94E70E382F36953695E7
:1003A00036953670232F220F220F230F8F70992737
:1003B000280F2A8384E092E00E94E70E282F2295DE
:1003C0002F708F7099273AE0239F800D11248B8323
:1003D00084E092E00E94E70E282F22952F708F7004
:1003E00099273AE0239F800D11248C8384E092E0CA
:1003F0000E94E70E282F22952F708F7099273AE0E0
:10040000239F800D11248D8384E092E00E94E70EEB
:10041000282F22952F708F7099273AE0239F800D07
:1004200011248E831F82DF91CF910895CF93DF93A4
:10043000EC01862F688319824A831B822C831E82DB
:100440001D8261E00E949B1461E08A81DF91CF915F
:100450000C949B141F93CF93DF93EC0160E08A818F
:100460000E94D3148AE090E00E94741614E061E0C8
:100470008A810E94D31460E08A810E94D3141150B3
:10048000B1F7DF91CF911F910895FF920F931F93C2
:10049000CF93DF93EC018B0190E1F92E612F661F62
:1004A0006627661F8A810E94D31488810E940A15DC
:1004B00061E0892B09F060E088810E94D314000F6D
:1004C000111FFA9459F7DF91CF911F910F91FF906F
:1004D0000895EF92FF920F931F93CF93DF93EC0158
:1004E0007B01CB0193709E838D8360E070E0CE0131
:1004F0000E94450200E010E08C81882351F0C70182
:10050000002E02C0880F991F0A94E2F791FF0DC0D8
:1005100009C0C701002E02C0969587950A94E2F79C
:1005200080FF03C06FEF70E002C060E070E0CE01BA
:100530000E9445020F5F1F4F0A301105E9F660E087
:1005400070E0CE010E94450260E070E0CE010E94A2
:100550004502CE01DF91CF911F910F91FF90EF9057
:100560000C942A02662321F06B3018F06AE001C077
:1005700061E0262F215061E070E002C0660F771F16
:100580002A95E2F7FC01258136816227732776835D
:1005900065830C946902662321F06B3018F06AE0E1
:1005A00001C061E0562F5150FC012581368161E088
:1005B00070E002C0660F771F5A95E2F7442319F0E6
:1005C000622B732B04C06095709562237323FC012A
:1005D000768365830C9469026B3008F06AE02FEF34
:1005E0003FEF02C0220F331F6A95E2F72095309546
:1005F000FC0136832583B9010C946902FC016483F4
:10060000658176810C946902FC018581968108954B
:10061000FC0181E020813181232B09F480E00895E1
:100620008091890190918A01019731F46091820152
:1006300084E092E00E94690F8091890190918A0183
:100640008330910529F08730910511F0C89741F466
:1006500043E050E06DE671E084E092E00E943B0FE1
:100660008091890190918A018830910511F0449719
:1006700041F444E050E06DE671E084E092E00E94D5
:100680003B0F8091890190918A018E31910511F083
:10069000889741F449E050E06DE671E084E092E033
:1006A0000E943B0F8091890190918A01459751F4F6
:1006B00045E150E06DE671E084E092E00E943B0F7E
:1006C00010926D010895CF93DF9322C084E092E0F1
:1006D0000E94DE0E049741F410928601109285016B
:1006E0001092880110928701C0918701D0918801F2
:1006F00084E092E00E94E70EFE01EE0FFF1FE75735
:10070000FE4F918380832196D0938801C093870107
:1007100084E092E00E94DE0E892BC1F6DF91CF913A
:10072000089564E070E084E092E00E94C60F63E602
:1007300073E084E092E00E94FA0F60E173E084E0ED
:1007400092E00C94FF0FAF92BF92CF92DF92EF92A4
:10075000FF920F931F93CF93DF93CDB7DEB72C9704
:100760000FB6F894DEBF0FBECDBF80918701909188
:100770008801049709F006C781E090E09093860114
:10078000809385018091890190918A01469741F477
:1007900060918B0170918C0188EC92E00E943C1278
:1007A0008091890190918A01459739F08091890162
:1007B00090918A01019751F523C088EC92E00E9444
:1007C000CB13882399F368E571E088EC92E00E94EE
:1007D000F71281E080936D0180E090E009C0FC0198
:1007E000E359FE4FDC01A85ABE4F2C91218301969C
:1007F00084319105A4F39093840180938301D6CF33
:1008000080918B010E940A15809382018091890159
:1008100090918A01029731F460918D0180918B0152
:100820000E94D3148091890190918A010397A9F4C1
:1008300080918B010E94EF13909357018093560192
:100840009C0197FF02C021503F4F30936E0160E042
:1008500071E00E942C1A80936F0180918901909120
:100860008A01049741F460918D0170918E0180910D
:100870008B010E9410148091890190918A01059743
:1008800031F460918D0180918B010E949B148091C5
:10089000890190918A01079709F042C080918B01EC
:1008A00090918C0180934C0190934D0161E00E94E6
:1008B0009B1460E080914C010E94D31482E090E090
:1008C0000E94741661E080914C010E94D31485E06F
:1008D00090E00E94741660E080914C010E94D31455
:1008E00060E080914C010E949B1420E432E44FE0D0
:1008F00050E061E080914C010E9433152AE330E022
:1009000040E050E00E94621ACA01B90120E031E0E3
:1009100040E050E00E94621A20936E0160936F01E4
:100920008091890190918A018830910541F481E09C
:1009300080936E0182E080936F0183E021C0449731
:1009400009F580915501811107C083E092E00E9472
:10095000710C81E08093550123E531E042E551E0DF
:1009600061E571E083E092E00E94810C8091510189
:1009700080936E018091520180936F0180915301A9
:10098000809370018091890190918A014E9769F559
:1009900080915401811107C08BEF91E00E948C017E
:1009A00081E0809354018BEF91E00E94900180914F
:1009B000FD0180936E018091FC0180936F01809115
:1009C000FB018093700180910002809371018091FE
:1009D000FF018093720190910102909373018093C3
:1009E00074018091FE01809375018091890190913D
:1009F0008A01889709F059C080918D0190918E01EC
:100A0000009719F426E04BE005C08130910549F4C8
:100A100026E046E160918B018DEE91E00E94300D61
:100A200008C08230910519F426E045E1F3CF039721
:100A3000D9F360E08DEE91E00E94450E69877A87D8
:100A40008B879C878DEE91E00E94F70D6D837E83EE
:100A50008F83988710924B0110924A01FE013996BC
:100A600080E090E001962191DC01A359BE4F2C93C8
:100A700084309105BCF384E090E090934B01809327
:100A80004A010196DC01A359BE4FE5E0F0E0EC0F0E
:100A9000FD1FE80FF91F359720812C9388309105B1
:100AA00084F390934B0180934A0180918901909146
:100AB0008A01C297D9F480918B0190918C01482FC3
:100AC00021E060918D0170918E01672B09F420E087
:100AD000642F6F5FFC01329737E03E9FC0013F9F5C
:100AE000900D11248D539E4F0E9416028091890112
:100AF00090918A01C39791F420918B0130918C01E0
:100B00002250310947E0429FC001439F900D1124BC
:100B10008D539E4F0E94080381116AC38091890101
:100B200090918A01C49791F420918B0130918C01AE
:100B30002250310917E0129FC001139F900D11241C
:100B40008D539E4F0E94080381116BC380918901D0
:100B500090918A01C59791F420918B0130918C017D
:100B60002250310947E0429FC001439F900D11245C
:100B70008D539E4F0E940803811165C380918901A6
:100B800090918A01C69791F420918B0130918C014C
:100B90002250310917E0129FC001139F900D1124BC
:100BA0008D539E4F0E940803811168C38091890173
:100BB00090918A01C79791F420918B0130918C011B
:100BC0002250310917E0129FC001139F900D11248C
:100BD0008D539E4F0E940803811162C38091890149
:100BE00090918A01C89791F420918B0130918C01EA
:100BF0002250310917E0129FC001139F900D11245C
:100C00008D539E4F0E940803811163C38091890117
:100C100090918A018634910591F460918B017091D5
:100C20008C01462F4F5F9B0122503109C901880F6B
:100C3000991F820F931F8F549E4F0E94D30A809159
:100C4000890190918A018734910589F420918B0163
:100C500030918C0122503109C901880F991F820FF0
:100C6000931F8F549E4F0E943D0C811146C380916B
:100C7000890190918A018834910589F420918B0132
:100C800030918C0122503109C901880F991F820FC0
:100C9000931F8F549E4F0E943D0C811140C3809141
:100CA000890190918A018934910589F420918B0101
:100CB00030918C0122503109C901880F991F820F90
:100CC000931F8F549E4F0E943D0C811145C380910C
:100CD000890190918A018A34910589F420918B01D0
:100CE00030918C0122503109C901880F991F820F60
:100CF000931F8F549E4F0E943D0C81114AC38091D7
:100D0000890190918A018B34910589F420918B019E
:100D100030918C0122503109C901880F991F820F2F
:100D2000931F8F549E4F0E943D0C81115AC3809196
:100D3000890190918A018C34910589F420918B016D
:100D400030918C0122503109C901880F991F820FFF
:100D5000931F8F549E4F0E943D0C81115BC3809165
:100D6000890190918A018D349105A9F520918B011B
:100D700030918C0122503109C901880F991F820FCF
:100D8000931F8F549E4F0E943D0C8111BBC323C003
:100D9000812F0E94EF13BC0120918B0130918C01B7
:100DA00022503109C901880F991F820F931FE12C2E
:100DB00000E024E040E08F549E4F0E94BB0B6AEF9E
:100DC00070E080E090E00E944E162FEFC21AD20A27
:100DD000CA14DB04ECF28091890190918A018E346F
:100DE000910589F420918B0130918C0122503109B9
:100DF000C901880F991F820F931F8F549E4F0E9425
:100E00003D0C81118CC38091890190918A018F34AE
:100E1000910589F420918B0130918C012250310988
:100E2000C901880F991F820F931F8F549E4F0E94F4
:100E30003D0C81118EC38091890190918A018A3580
:100E4000910569F480918B0180934E0180918D0111
:100E500080934F0180918F018093500118C08B3592
:100E60009105A9F460918B0170918C01462F4F5F21
:100E70009B012250310955E0529FC001539F900DB4
:100E8000112420918D018D569E4F0E945C0180910E
:100E9000890190918A018C35910549F080918901F1
:100EA00090918A018D35910509F0BDC048C06091CF
:100EB0008B0170918C01462F4F5F9B0122503109AD
:100EC00055E0529FC001539F900D112420918D0138
:100ED0008D569E4F0E945C0100918F0110919001F0
:100EE00002FBDD24D0F8D19401FBCC24C0F8C194DE
:100EF00001701127102F1195E12CF12CA5E0BA2ECD
:100F000016C060918B0170918C0162507109B69E80
:100F1000C001B79E900D1124012F2C2D4D2D6E2D4B
:100F20008D569E4F0E94EF003FEFE31AF30A809127
:100F30008D0190918E01E816F9061CF3AFCF209138
:100F40008D0130918E0180918B0190918C01232B2A
:100F5000B1F49C012250310945E0429FC001439FFA
:100F6000900D11240091500120914F0140914E01AC
:100F700060918F018D569E4F0E94EF0054C09C01DE
:100F80002250310945E0429FC001439F900D11243A
:100F90008D569E4F0E948901E12CF12CC82ED12C38
:100FA00015E03DC020918D0130918E012130310539
:100FB00041F480918F0190919001E816F906B1F407
:100FC0002BC02230310541F480918F019091900126
:100FD0008E159F055CF420C023303105E9F4809123
:100FE0008F0190919001E816F906B4F020918B01E1
:100FF00030918C0122503109129FC001139F900D36
:1010000011240091500120914F0140914E016E2D0D
:101010008D569E4F0E94EF008FEFE81AF80AEC14ED
:10102000FD040CF4BFCF8091890190918A018E3527
:10103000910549F08091890190918A018F35910540
:1010400009F0A0C252C080918F01909190011816B2
:10105000190634F081E090E09093900180938F0125
:1010600020918B0130918C012250310945E0429F43
:10107000C001439F900D11248D569E4F0E948901FF
:10108000E0908D01F0908E01C82ED12C15E029C082
:1010900080918D0190918E019701281B390BC90118
:1010A00060918F01709190010E942C1A892BB1F4EC
:1010B00020918B0130918C0122503109129FC00187
:1010C000139F900D11240091500120914F014091E8
:1010D0004E016E2D8D569E4F0E94EF003FEFE31A9A
:1010E000F30AEC14FD04A4F2A5CF20918B013091FA
:1010F0008C012250310945E0429FC001439F900D71
:1011000011248D569E4F0E94890120918F013091AC
:101110009001232B59F133C080918D0190918E0164
:1011200020918B0130918C0122503109E816F9068B
:1011300064F4129FC001139F900D1124009150017F
:1011400020914F0140914E0108C0129FC001139F92
:10115000900D112400E020E040E06E2D8D569E4F52
:101160000E94EF008FEFE81AF80A05C0E12CF12C7D
:10117000C82ED12C15E0EC14FD0474F203C2C82E65
:10118000D12C760115E030C080918D0190918E01B7
:101190009601281B390B80918B0190918C01E216EE
:1011A000F3067CF09C0122503109129FC001139F6D
:1011B000900D11240091500120914F0140914E015A
:1011C0000BC09C0122503109129FC001139F900D4A
:1011D000112400E020E040E06E2D8D569E4F0E94CD
:1011E000EF0021E0E21AF108E114F10469F6CAC146
:1011F00061E080918D0190918E01892B09F460E06E
:1012000020918B0130918C012250310947E0429F9F
:10121000C001439F900D11248D539E4F0E94FE02EA
:101220007DCC20918B0130918C0122503109129F8D
:10123000C001139F900D112460918D018D539E4F1D
:101240000E94EC0283CC41E080918F01909190014B
:10125000892B09F440E020918B0130918C012250C0
:10126000310957E0529FC001539F900D11246091A6
:101270008D018D539E4F0E94CB0280CC20918B011B
:1012800030918C0122503109129FC001139F900DA3
:10129000112460918D018D539E4F0E94B20286CC25
:1012A00090918F0180E060918D0170918E0168278F
:1012B000792720918B0130918C0122503109129FA6
:1012C000C001139F900D11248D539E4F0E946902FF
:1012D00085CC20918B0130918C0122503109129FD5
:1012E000C001139F900D11248D539E4F0E94040343
:1012F00080936E0190936F0189CC20918B01309186
:101300008C0122503109C901880F991F820F931F48
:1013100060918D018F549E4F0E94EA0AA8CC909153
:101320008F0180E060918D0170918E01682779278F
:1013300020918B0130918C0122503109C901880F15
:10134000991F820F931FE12C00E024E040E08F54AE
:101350009E4F0E94BB0BA3CC90918F0180E06091C7
:101360008D0170918E016827792720918B01309132
:101370008C0122503109C901880F991F820F931FD8
:10138000E12C00E024E041E08F549E4F0E94BB0B13
:101390009ECC20918B0130918C0122503109C901E2
:1013A000880F991F820F931F60918F018F549E4F5A
:1013B0000E94360C898320918B0130918C01225040
:1013C0003109C901880F991F820F931F20918D0148
:1013D00041E0BE016F5F7F4F8F549E4F0E94710BA3
:1013E0008ECC80918F01898320918B0130918C016B
:1013F00022503109C901880F991F820F931F209134
:101400008D0141E0BE016F5F7F4F8F549E4F0E9460
:10141000710B8DCC80918D0190918E010AE010E0CE
:10142000B8010E942C1A20918B0130918C0122501E
:101430003109C901880F991F820F931F8F549E4F46
:101440000E94360C898380918D0190918E01B801A4
:101450000E942C1A20918B0130918C01225031096D
:10146000A901440F551F420F531F682FCA018F5403
:101470009E4F0E94360C80688A8380918F019091E4
:101480009001B8010E942C1A20918B0130918C019F
:1014900022503109C901880F991F820F931F8F5461
:1014A0009E4F0E94360C8B8380918F01909190010A
:1014B000B8010E942C1A20918B0130918C0122508E
:1014C0003109A901440F551F420F531F682FCA014C
:1014D0008F549E4F0E94360C8C8320918B0130914B
:1014E0008C0122503109C901880F991F820F931F67
:1014F00020E044E0BE016F5F7F4F8F549E4F0E94FB
:10150000710B2DCC10918D01A0908F01B0909001A6
:10151000AA0CBB1CAA0CBB1CC12CD12C59CC8FEF24
:1015200089838A838B838C8320918B0130918C01FA
:1015300022503109C901880F991F820F931F20E0A3
:1015400044E0BE016F5F7F4F8F549E4F0E94710B2E
:101550005ACC19821A821B821C8220918B013091F5
:101560008C0122503109C901880F991F820F931FE6
:1015700020E044E0BE016F5F7F4F8F549E4F0E947A
:10158000710B59CC2C960FB6F894DEBF0FBECDBFB1
:10159000DF91CF911F910F91FF90EF90DF90CF904F
:1015A000BF90AF900895CF93DF93EC01862F6883AF
:1015B000498360E00E949B1460E089810E949B1433
:1015C00060E088810E94D31460E08981DF91CF912F
:1015D0000C94D314683010F4685F01C06FE0FC0114
:1015E0006283089561E0FC0181810E949B1482E383
:1015F00090E00C947416CF93DF93EC0161E0898145
:101600000E949B1482E390E00E94741660E088813F
:101610000E949B1482E390E00E94741660E089812E
:101620000E949B1482E390E0DF91CF910C9474169A
:101630000F931F93CF93DF93EC01062F18E061E027
:1016400088810E949B1482E390E00E94741600FF40
:1016500002C060E001C061E089810E949B1482E3C6
:1016600090E00E94741660E088810E949B1482E3DF
:1016700090E00E9474160695115009F761E0888188
:101680000E949B1460E089810E949B1482E390E099
:101690000E94741660E088810E949B1482E390E0AF
:1016A0000E94741689810E940A15182F811104C0A6
:1016B00061E089810E949B1482E390E00E9474168D
:1016C00061E088810E949B1482E390E00E9474167E
:1016D00081E0111101C080E0DF91CF911F910F9146
:1016E0000895CF92DF92EF92FF920F931F93CF93C3
:1016F000DF9300D0CDB7DEB76C01F62EE42E298340
:101700007A830E94F20A60E4C6010E94180BC601A7
:101710000E94FB0AC6010E94F20A2981622F6370AF
:101720006054C6010E94180B0F2D7A81172F06C036
:10173000F80161918F01C6010E94180B802F8F194B
:101740008E15B0F3C6010E94FB0AC6010E94F20A80
:10175000F60162816058C6010E94180BC6010F9005
:101760000F90DF91CF911F910F91FF90EF90DF903D
:10177000CF900C94FB0A4F925F926F927F928F9260
:101780009F92AF92BF92CF92DF92EF920F931F93EF
:10179000CF93DF9300D000D0CDB7DEB73C016B0113
:1017A000322F202F8FE0A82E81E0B82E882483943A
:1017B000912C8C0E9D1EF40101E01FE3D5015E907B
:1017C0004E905D01C601B2010E942C1A611571058F
:1017D00061F4411106C0002321F08E2F8819833057
:1017E00011F4108313C0108211C0DB01AF70BB274E
:1017F000A15FBE4F8C918083649DC001659D900D5B
:10180000749D900D1124C81AD90A00E0EE2039F019
:101810008E2F8819813019F48081806880833196F9
:10182000B7E0AB16B1E0BB0649F684E090E0831B5D
:101830009109BE016F5F7F4F680F791F432FC3016E
:101840000E94710B0F900F900F900F90DF91CF912E
:101850001F910F91EF90DF90CF90BF90AF909F902E
:101860008F907F906F905F904F9008956F70E62FEC
:10187000F0E0E15FFE4F80810895FC0181E09081FE
:10188000911101C080E008951F93CF93DF931F92C1
:10189000CDB7DEB7162F84E092E049830E94A90FEE
:1018A0006CE470E084E092E00E94E20F612F84E03B
:1018B00092E00E94690F4981642F84E092E00E94C7
:1018C000690F84E092E00F90DF91CF911F910C940B
:1018D000F70F462F67E00C94440C462F68E00C94F9
:1018E000440CCF93DF93EC0160E00E94690C60E050
:1018F000CE010E946D0C61E0CE01DF91CF910C947E
:10190000690C4F925F926F927F928F929F92AF92EB
:10191000BF92CF92DF92EF92FF920F931F93CF93DC
:10192000DF9300D01F92CDB7DEB75B016A0179016A
:1019300080E48B838A8389830E9412162B013C01E9
:101940000DC00E9412166419750986099709653F32
:1019500071408105910514F080E06EC084E092E052
:101960000E94DE0E1816190664F384E092E00E94CD
:10197000E70E43E050E06CE470E084E092E00E9407
:10198000D50F0E9412162B013C018E010F5F1F4FD5
:1019900048012DC0C801881999090397D4F40E9401
:1019A00012162B013C0111C084E092E00E94E70E68
:1019B000F80180830E941216641975098609970937
:1019C00063337105810591053CF6F801808180340F
:1019D00058F70E9412160F5F1F4F64197509860988
:1019E0009709653F7140810591050CF0B5CF84E002
:1019F00092E00E94DE0E892B69F69981892F880F6B
:101A0000880F95FD8D5F85958595F50180839A8179
:101A1000892F880F880F95FD8D5F85958595F60137
:101A200080839B81892F880F880F95FD8D5F859519
:101A30008595F701808381E00F900F900F90DF91E3
:101A4000CF911F910F91FF90EF90DF90CF90BF90BB
:101A5000AF909F908F907F906F905F904F90089580
:101A6000CF93DF93EC01862F6E834F83288791E01D
:101A70009D8760E00E949B1461E08E810E94D314D8
:101A800019861A861B861C86DF91CF910895DF92F6
:101A9000EF92FF920F931F93CF93DF93EC0161E0DE
:101AA0008E810E94D3146AEF70E080E090E00E9483
:101AB0004E160E94121609851A852B853C856017E3
:101AC00071078207930720F419861A861B861C86E5
:101AD0002D85211111C009851A852B853C85DC01D6
:101AE000CB01801B910BA20BB30B803D9740A1054E
:101AF000B10510F481E073C01D860E94121669873B
:101B00007A878B879C871C821B821A821982188293
:101B100061E08E810E949B1460E08E810E94D3144C
:101B200064E170E080E090E00E944E16F89461E07D
:101B30008E810E94D31488E290E00E94741660E0C7
:101B40008E810E949B14F12CD12C81E009C0E3947A
:101B500081E090E00E9474168FEFE81204C009C083
:101B6000E12C082F10E08E810E940A158017910742
:101B700071F38E810E940A159FEFE916C9F023E0E8
:101B80002F1590F4F0FC10C09D2D96959695969586
:101B9000FE01E90FF11D9081990F908328852E1584
:101BA00010F491609083D394F39495E5F912D8CF13
:101BB000789427E22D1590F42C8130E048818981BA
:101BC00090E0840F911D4A81840F911D4B81840FF9
:101BD000911D99272817390709F48CCF80E0DF91F0
:101BE000CF911F910F91FF90EF90DF900895EF92AA
:101BF000FF920F931F93CF93DF93EC010E94470D49
:101C0000882391F18F818B3029F070F185518230DA
:101C100058F507C0688170E080E090E00E943019BC
:101C20002DC0688170E080E090E00E94301920E0D3
:101C300030E040E853E40E94BE197B018C016981C9
:101C400070E080E090E00E9432199B01AC016E2DA3
:101C50007F2D802F912F0E94641820E030E040E219
:101C600051E40E94C8180AC06FE171E082E395E078
:101C70000E94F11660E070E080EC9FE7DF91CF9169
:101C80001F910F91FF90EF900895CF92DF92EF9206
:101C9000FF920F931F93CF93DF938C01C62F0E9467
:101CA000470D882309F477C0F80187818B3039F01C
:101CB00008F471C08551823008F06DC01DC0F80174
:101CC000628170E080E090E00E943019B62FA72F6B
:101CD000F82FE92F462F572F682F792FCB01BA0104
:101CE000CC2309F462C020E030E040E151E46B2FE6
:101CF0007A2F8F2F9E2F37C0F801D2816D2F6F77EB
:101D000070E080E090E00E94321920E030E040E88E
:101D100053E40E94BE196B017C01F801638170E0FD
:101D200080E090E00E9432199B01AC016C2D7D2D6A
:101D30008E2D9F2D0E94641820E030E040E251E497
:101D40000E94C818472F382F292F862F942FA32F92
:101D5000B22FBC01CD01D7FD9058CC2331F120E04A
:101D600030E040E151E40E94BE1920E030E040EA5A
:101D700050E40E94C81820E030E040E052E40E94A5
:101D80006418472F382F292F862F942FA32FB22F77
:101D9000BC01CD010AC06FE171E082E395E00E94D1
:101DA000F11660E070E080EC9FE7DF91CF911F912A
:101DB0000F91FF90EF90DF90CF900895209138021F
:101DC00030E080913902281B3109C90108958091C2
:101DD000390290913802891750F4E82FF0E0E65C60
:101DE000FD4F208130E08F5F8093390202C02FEFDA
:101DF0003FEFC9010895E091390280913802E81758
:101E000030F4F0E0E65CFD4F208130E002C02FEFBF
:101E10003FEFC90108950895E0911002F091110279
:101E20003097E1F030913902209138023217B0F04A
:101E300040E009C0DC01A20FB31F5C91D901A65C90
:101E4000BD4F5C934F5F242F30E02617370794F384
:101E50001092390260933802CB0109940895E09101
:101E60001202F0911302309729F01092160210928C
:101E7000150209940895CF92DF92EF92FF920F938B
:101E80001F93CF93DF937C01CB018A012091140231
:101E9000222391F0EB016B01C40ED51E09C069919C
:101EA000D701ED91FC910190F081E02DC7010995DA
:101EB000CC15DD05A1F703C0642F0E94C210C80134
:101EC000DF91CF911F910F91FF90EF90DF90CF9016
:101ED0000895CF93DF931F92CDB7DEB7698320912A
:101EE00014022223D1F020911502203240F021E08B
:101EF00030E0FC013383228320E030E015C0809184
:101F00001602E82FF0E0E95EFD4F998190838F5F24
:101F1000809316028093150205C061E0CE01019600
:101F20000E94C21021E030E0C9010F90DF91CF91F3
:101F30000895FC011382128248EE53E060E070E0E5
:101F400044835583668377838DE291E09183808318
:101F500008951092390210923802109216021092CF
:101F600015020C940810CF93DF93EC01862F0E948A
:101F700026108FE29FE00E94E0108CE09FE00E941C
:101F8000DB10CE01DF91CF910C94A90F0C94B30F0D
:101F9000862F413208F040E26AE372E00E942A1084
:101FA0001092390280933802089521E00C94C80FF2
:101FB00081E080931402609337021092160210920F
:101FC000150208950C94D80F0F93062F21E040912D
:101FD000150267E172E0809137020E946F10109243
:101FE000160210921502109214020F91089561E0EA
:101FF0000C94E40F70931102609310020895709393
:10200000130260931202089584E092E00C94990FF9
:102010001092630281E0809361021092600261E09D
:1020200082E10E94D31461E083E10E94D314E9EBC2
:10203000F0E080818E7F808380818D7F808388E443
:102040008093B80085E48093BC000895880F809346
:10205000BA000895413208F03FC090916302911197
:10206000FCCF91E090936302209361022FEF2093C5
:102070005A0210925F02242F215020935E02909307
:10208000620290916202880F892B80936202809194
:102090006002813041F4109260028091620280936C
:1020A000BB0085EC01C085EE8093BC00809163028B
:1020B0008130E1F380915F02841710F440915F0258
:1020C00024E632E0FB01D90102C08D9181938A2F71
:1020D000821B8417D0F301C040E0842F08950F9332
:1020E000413208F046C0909163029111FCCF92E01A
:1020F00090936302009361029FEF90935A021092B3
:102100005F0240935E02FB0164E672E0DB0102C005
:1021100091919D939A2F961B9417D0F3109262027F
:1021200090916202880F892B8093620280916002F5
:10213000813041F410926002809162028093BB0072
:1021400085EC01C085EE8093BC00222321F08091B4
:1021500063028230E1F380915A028F3F61F08091F7
:102160005A02803251F080915A02803341F483E068
:1021700007C081E005C080E003C082E001C084E0C8
:102180000F910895613298F420916302243089F40C
:1021900060935C02FC0184E892E0DC0102C02191C2
:1021A0002D932A2F281B2617D0F380E0089581E075
:1021B000089582E008959093A5028093A402089563
:1021C0009093A7028093A602089585ED8093BC00AA
:1021D0008091BC0084FDFCCF10926302089585ECD1
:1021E0008093BC001092630208951F920F920FB665
:1021F0000F9211242F933F934F935F936F937F938D
:102200008F939F93AF93BF93EF93FF938091B90008
:10221000887F803609F49FC058F5883209F45BC086
:1022200090F4803109F452C038F4882309F4F8C0DE
:10223000883009F0F9C04AC0883109F44CC08032B6
:1022400009F0F2C05CC0803409F46BC038F480330C
:1022500009F455C0883309F0E7C054C0803509F44B
:1022600054C0883509F462C0883409F0DDC0DAC092
:10227000883909F4CBC0A8F4883709F46CC038F465
:10228000883609F468C0803709F0CEC064C0883849
:1022900009F4BCC0803909F464C0803809F0C4C0B6
:1022A00060C0803B09F48AC038F4803A09F46BC0FE
:1022B000883A09F0B9C082C0803C09F4ABC0883CC0
:1022C00009F4A8C0883B09F0AFC08DC080916202BC
:1022D0008093BB0012C090915F0280915E029817BC
:1022E00088F580915F02E82FF0E0EC59FD4F908176
:1022F0009093BB008F5F80935F0285EC88C08093D2
:102300005A0290C080935A0256C080915F02909109
:10231000BB00E82FF0E0EC59FD4F90838F5F809376
:102320005F0290915F0280915E026DC080915F02BA
:102330009091BB00E82FF0E0EC59FD4F90838F5F48
:1023400080935F028091610281116CC081E0809373
:10235000600284EA60C083E08093630210925B02B3
:10236000CCCF80915B02803208F050C080915B023C
:102370009091BB00E82FF0E0E855FD4F90838F5F10
:1023800080935B02BACF80915B02803230F4E0919F
:102390005B02F0E0E855FD4F10820E94E51060916D
:1023A0005B02E091A402F091A50270E088EA92E05D
:1023B000099510925B020E94EF1036C084E0809372
:1023C000630210925D0210925C02E091A602F0910D
:1023D000A702099580915C02811105C081E080937C
:1023E0005C021092840280915D02E82FF0E0EC57CD
:1023F000FD4F90819093BB008F5F80935D02909121
:102400005D0280915C02981708F477CF85E880938D
:10241000BC000AC085EC8093BC001092630204C02B
:1024200010925A020E94E510FF91EF91BF91AF9177
:102430009F918F917F916F915F914F913F912F91DC
:102440000F900FBE0F901F901895F89482E0809324
:10245000B0008093B10094E69093B3001092B20064
:102460008093700078948093CD021092280580911B
:10247000CC0260E00C949B146093CC020E94251265
:1024800064E170E080E090E00E944E1682E080936C
:10249000CD021092280508951F920F920FB60F9249
:1024A00011242F933F934F935F936F937F938F9359
:1024B0009F93AF93BF93EF93FF938091CC020E94C1
:1024C0000A152091CE023091CF022F5F3F4F3093FB
:1024D000CF022093CE02909128059091CD029330A7
:1024E000C1F020F4923009F058C006C0943059F180
:1024F000953009F052C04BC081114FC08091CE027F
:102500009091CF028436910508F443C010922805BB
:102510001CC0813009F041C020912805E22FF0E075
:102520008091CE029091CF02EE0FFF1FE053FD4F3E
:10253000918380832F5F209328051092CF02109201
:10254000CE0284E021C0811117C020912805E22F1E
:10255000F0E08091CE029091CF02EE0FFF1FE0538A
:10256000FD4F918380832F5F209328051092CF0227
:102570001092CE0283E008C08091CE029091CF02EB
:102580008536910550F085E08093CD0206C081111B
:1025900004C01092CF021092CE02FF91EF91BF9132
:1025A000AF919F918F917F916F915F914F913F91EB
:1025B0002F910F900FBE0F901F901895FB0180ED8B
:1025C00092E0918380838091280582831382809199
:1025D000CD02853041F482E08093CD02109228052F
:1025E00021E030E002C020E030E0C90108954F92C0
:1025F0005F927F928F929F92AF92BF92CF92DF9223
:10260000EF92FF920F931F93CF93DF932C01FB0167
:10261000DC0112962D913C9113974901B4E08B1A7D
:10262000910897FE04C04901CBE08C0E911CA4E0F8
:1026300095948794AA95E1F7D2010D911C9140E001
:1026400050E080E090E07801B6E0EB0EF11CD7019D
:10265000A40FB51F6D917C91860F971F4C5F5F4F44
:1026600048325105A1F76AE070E00E942C1A7B0104
:102670005B01AA0CBB1CD801189640E050E060E05A
:1026800070E080E090E089010950110901C0A901C2
:102690002D913C911197A216B30638F42D913C91DF
:1026A0001197820F931F6F5F7F4F6A30710549F05A
:1026B00014969A012E5F3F4F4A5F5F4F40175107B4
:1026C00034F30E942C1A762EDF01169648E050E073
:1026D00020E030E0CC24C394D12C2EC01C928A017F
:1026E00087E090E0E20168817981600F711FEB0162
:1026F00068817981A616B70648F4B601082E01C094
:10270000660F0A94EAF77C91762B09C0B601082E71
:1027100001C0660F0A94EAF760957C9176237C935A
:1027200001970C5F1F4F8F3FDFEF9D07D9F62F5F9B
:102730003F4F1196405E5F4F281539057CF2882D7A
:102740008B5F8083E201A881B98112968D919C9163
:1027500013978183A881B98114968D919C911597C7
:102760008283E3827482858282E08093CD0210921C
:10277000280580818F5FDF91CF911F910F91FF908E
:10278000EF90DF90CF90BF90AF909F908F907F9011
:102790005F904F900895CF93DF93EC01BC010E94AE
:1027A000DE12892BC1F08A819B818034910534F03F
:1027B00004979C0127703327232B31F082E080930C
:1027C000CD021092280507C0B4E095958795BA957B
:1027D000E1F78A5F01C080E0DF91CF9108958E30EC
:1027E00008F08E5087702091060140E4249F9001EC
:1027F0001124822B80937C0080917A0080648093E6
:102800007A0080917A0086FDFCCF2091780030918B
:102810007900932F80E0AC01422B9A01C901089501
:102820001F93CF93DF93182FEB0161E00E949B145D
:10283000209711F460E004C0CF3FD10539F461E086
:10284000812FDF91CF911F910C94D314E12FF0E0F1
:10285000E859FF4FE491E330B9F028F4E13051F04A
:10286000E230B1F50CC0E63019F1E73049F1E4305F
:1028700079F514C084B5806884BDC7BD2EC084B509
:10288000806284BDC8BD29C080918000806880932B
:102890008000D0938900C09388001FC08091800081
:1028A000806280938000D0938B00C0938A0015C013
:1028B0008091B00080688093B000C093B3000DC0D9
:1028C0008091B00080628093B000C093B40005C0D6
:1028D000C038D1050CF0B3CFADCFDF91CF911F91B0
:1028E0000895833069F028F48130A1F0823011F529
:1028F00014C08630B1F08730C1F08430D9F404C000
:10290000809180008F7703C0809180008F7D8093BD
:102910008000089584B58F7702C084B58F7D84BD13
:1029200008958091B0008F7703C08091B0008F7DB3
:102930008093B0000895CF93DF9390E0FC01E458BA
:10294000FF4F4491FC01E057FF4F8491882341F1F0
:1029500090E0880F991FFC01E854FF4F25913491B6
:10296000D90182559F4FFC0185919491C82FD92F91
:102970009FB7F8948C91611106C0409584238C9385
:102980008881842308C0623041F4242F209582235B
:102990008C938881842B888302C0842B8C939FBF67
:1029A000DF91CF9108950F931F93CF93DF931F92E1
:1029B000CDB7DEB7282F30E0F901E859FF4F8491F9
:1029C000F901E458FF4F1491F901E057FF4F0491CA
:1029D0000023D1F0882321F069830E94711469815A
:1029E000E02FF0E0EE0FFF1FE255FF4F859194912D
:1029F000DC019FB7F8948C91611103C0109581237D
:102A000001C0812B8C939FBF0F90DF91CF911F91BD
:102A10000F910895CF93DF93282F30E0F901E85903
:102A2000FF4F8491F901E458FF4FD491F901E05729
:102A3000FF4FC491CC2389F081110E947114EC2FB7
:102A4000F0E0EE0FFF1FEC55FF4F85919491DC01F4
:102A50008C918D2321E030E011F420E030E0C901B9
:102A6000DF91CF9108958F929F92AF92BF92CF92B4
:102A7000DF92EF92FF920F931F93CF93DF9390E03B
:102A8000FC01E458FF4FD491FC01E057FF4F7491D3
:102A9000611102C0C0E001C0CD2FDA01C901BF70D1
:102AA000672F70E0660F771F6C557F4F812C912C3C
:102AB0005401FB010591149110C0C12CD12C760159
:102AC000C394C80CD91CEA1CFB1C88169906AA06DC
:102AD000BB0609F44BC046015701F801E081ED2324
:102AE000EC1759F310C0C12CD12C7601C394C80C3B
:102AF000D91CEA1CFB1C88169906AA06BB06B1F174
:102B00004601570103C0FB0105911491F801E081D2
:102B1000ED23EC13E8CF88199909AA09BB0920E035
:102B200030E0A901FB016591749109C028173907AC
:102B30004A075B07D9F02F5F3F4F4F4F5F4FFB01B5
:102B4000E081ED23EC1791F3A5E1B0E00E94211A9A
:102B50008B019C01005F1F4F2F4F3F4F84E0369544
:102B60002795179507958A95D1F703C000E010E0E7
:102B70009801B801C901DF91CF911F910F91FF908A
:102B8000EF90DF90CF90BF90AF909F908F9008957F
:102B90001F920F920FB60F9211242F933F938F9392
:102BA0009F93AF93BF938091290590912A05A0919F
:102BB0002B05B0912C0530913105232F2D5F2D373A
:102BC00020F40196A11DB11D05C0232F2A5702969E
:102BD000A11DB11D209331058093290590932A05ED
:102BE000A0932B05B0932C0580912D0590912E0577
:102BF000A0912F05B09130050196A11DB11D8093C4
:102C00002D0590932E05A0932F05B0933005BF910D
:102C1000AF919F918F913F912F910F900FBE0F9089
:102C20001F9018950F931F938FB7F8940091290563
:102C300010912A0520912B0530912C058FBFB801EA
:102C4000C9011F910F9108950F931F939FB7F89497
:102C500000912D0510912E0520912F053091300502
:102C600086B5A89B06C08F3F21F00F5F1F4F2F4FE7
:102C70003F4F9FBF322F212F102F0027080F111D0C
:102C8000211D311D42E0000F111F221F331F4A95E5
:102C9000D1F7B801C9011F910F910895CF92DF922A
:102CA000EF92FF92CF93DF936B017C010E94241679
:102CB000EB010EC00E9424166C1B7D0B683E734016
:102CC00038F081E0C81AD108E108F108C851DC4F9A
:102CD000C114D104E104F10469F7DF91CF91FF90B1
:102CE000EF90DF90CF900895019739F0880F991FEA
:102CF000880F991F02970197F1F70895789484B58A
:102D0000826084BD84B5816084BD85B5826085BDE7
:102D100085B5816085BDEEE6F0E0808181608083CD
:102D2000E1E8F0E0108280818260808380818160B0
:102D30008083E0E8F0E0808181608083E1EBF0E077
:102D4000808184608083E0EBF0E08081816080831B
:102D5000EAE7F0E080818460808380818260808304
:102D60008081816080838081806880831092C1002F
:102D70000895CF92DF92EF92FF920F931F93CF931C
:102D8000DF936C01EB017A01E60EF71E00E010E024
:102D90000BC06991D601ED91FC910190F081E02D7D
:102DA000C6010995080F191FCE15DF0591F7C80157
:102DB000DF91CF911F910F91FF90EF90DF90CF9017
:102DC0000895DB010D900020E9F7AD014150510954
:102DD000461B570BDC01ED91FC910280F381E02D45
:102DE00009940C94E1160E947E160E949103CFEC88
:102DF000D7E10E94A3032097E1F30E94CF17F9CFF8
:102E0000FC0184859585FC01E05CFF4F20813181C8
:102E1000FC01EE5BFF4F80819181281B390B2F73E2
:102E20003327C9010895FC0184859585FC01E05C88
:102E3000FF4F40815181FC01EE5BFF4F20813181CA
:102E40004217530741F00190F081E02DE80FF91F80
:102E5000208130E002C02FEF3FEFC9010895FC014F
:102E600084859585FC01E05CFF4F40815181FC0128
:102E7000EE5BFF4F208131814217530781F0A08123
:102E8000B181A80FB91F8C91208131812F5F3F4FF5
:102E90002F73332731832083282F30E002C02FEF98
:102EA0003FEFC9010895FC0186859785FC01E05C30
:102EB000FF4FDC01AE5BBF4F408151812D913C91B2
:102EC000119742175307C1F70895CF93DF93FC0181
:102ED00086859785DC01A05CBF4F2D913C911197B1
:102EE0002F5F3F4F2F733327EC01CE5BDF4F4881BD
:102EF000598124173507D9F30D90BC91A02DA80F47
:102F0000B91F6C93A685B785A05CBF4F11963C9303
:102F10002E93A689B7892C9181E090E0058C02C0A0
:102F2000880F991F0A94E2F7282B2C9381E090E0F8
:102F3000DF91CF91089508951F920F920FB60F92CF
:102F400011242F933F934F938F939F93EF93FF936E
:102F50004091C6008091D5059091D60501968F735A
:102F600099272091D7053091D8058217930759F0FA
:102F7000E091D505F091D605EB56FA4F408390933A
:102F8000D6058093D505FF91EF919F918F914F9139
:102F90003F912F910F900FBE0F901F90189582E3D5
:102FA00095E00E940017892B11F00C949B1708954F
:102FB0001F920F920FB60F9211242F933F938F936E
:102FC0009F93EF93FF93209191053091920580910B
:102FD0009305909194052817390731F48091C10029
:102FE0008F7D8093C10014C0E0919305F09194050A
:102FF000EF5AFA4F208180919305909194050196A4
:103000008F73992790939405809393052093C6001E
:10301000FF91EF919F918F913F912F910F900FBE54
:103020000F901F901895109235051092340588EE78
:1030300093E0A0E0B0E08093360590933705A0932D
:103040003805B09339058DE391E090933305809373
:10305000320585E995E090933F0580933E0581E533
:1030600095E0909341058093400585EC90E0909326
:1030700043058093420584EC90E09093450580934E
:10308000440580EC90E0909347058093460581ECE1
:1030900090E0909349058093480586EC90E09093EA
:1030A0004B0580934A0584E080934C0583E0809330
:1030B0004D0587E080934E0585E080934F0581E0C4
:1030C0008093500508955058BB27AA270ED01CC1E5
:1030D0000DD130F012D120F031F49F3F11F41EF4E5
:1030E00002C10EF4E095E7FBF8C0E92F1ED180F392
:1030F000BA17620773078407950718F071F49EF5F5
:1031000036C10EF4E0950B2EBA2FA02D0B01B9019C
:1031100090010C01CA01A0011124FF27591B99F04D
:10312000593F50F4503E68F11A16F040A22F232F59
:10313000342F4427585FF3CF469537952795A795A9
:10314000F0405395C9F77EF41F16BA0B620B730B50
:10315000840BBAF09150A1F0FF0FBB1F661F771FC1
:10316000881FC2F70EC0BA0F621F731F841F48F476
:10317000879577956795B795F7959E3F08F0B3CFFC
:103180009395880F08F09927EE0F979587950895E6
:103190000CD0BAC0B2D040F0A9D030F021F45F3FDB
:1031A00019F09BC05111E4C09EC0BFD098F3992381
:1031B000C9F35523B1F3951B550BBB27AA276217FB
:1031C0007307840738F09F5F5F4F220F331F441F40
:1031D000AA1FA9F333D00E2E3AF0E0E830D0915078
:1031E0005040E695001CCAF729D0FE2F27D0660F65
:1031F000771F881FBB1F261737074807AB07B0E8A4
:1032000009F0BB0B802DBF01FF2793585F4F2AF0B9
:103210009E3F510568F061C0ABC05F3FECF3983E44
:10322000DCF3869577956795B795F7959F5FC9F716
:10323000880F911D9695879597F90895E1E0660F9F
:10324000771F881FBB1F621773078407BA0720F018
:10325000621B730B840BBA0BEE1F88F7E095089581
:10326000E89409C097FB3EF4909580957095619520
:103270007F4F8F4F9F4F9923A9F0F92F96E9BB27D6
:103280009395F695879577956795B795F111F8CF52
:10329000FAF4BB0F11F460FF1BC06F5F7F4F8F4FBD
:1032A0009F4F16C0882311F096E911C0772321F0B3
:1032B0009EE8872F762F05C0662371F096E8862F4B
:1032C00070E060E02AF09A95660F771F881FDAF7A2
:1032D000880F9695879597F9089597F99F6780E8E5
:1032E00070E060E008959FEF80EC089500240A9458
:1032F0001616170618060906089500240A941216D1
:103300001306140605060895092E0394000C11F403
:10331000882352F0BB0F40F4BF2B11F460FF04C0B0
:103320006F5F7F4F8F4F9F4F089557FD9058440F09
:10333000551F59F05F3F71F04795880F97FB991F14
:1033400061F09F3F79F087950895121613061406D1
:10335000551FF2CF4695F1DF08C01616170618065E
:10336000991FF1CF86957105610508940895E89439
:10337000BB2766277727CB0197F908950BD0C4CFD9
:10338000B5DF28F0BADF18F0952309F0A6CFABCF50
:103390001124EECFCADFA0F3959FD1F3950F50E033
:1033A000551F629FF001729FBB27F00DB11D639FF7
:1033B000AA27F00DB11DAA1F649F6627B00DA11D9D
:1033C000661F829F2227B00DA11D621F739FB00D43
:1033D000A11D621F839FA00D611D221F749F3327B3
:1033E000A00D611D231F849F600D211D822F762F4C
:1033F0006A2F11249F5750408AF0E1F088234AF049
:10340000EE0FFF1FBB1F661F771F881F9150504094
:10341000A9F79E3F510570F060CFAACF5F3FECF354
:10342000983EDCF3869577956795B795F795E79580
:103430009F5FC1F7FE2B880F911D9695879597F991
:1034400008950E947E1AA59F900DB49F900DA49F91
:10345000800D911D1124089597FB072E16F40094FA
:1034600007D077FD09D00E948A1A07FC05D03EF4E8
:10347000909581959F4F0895709561957F4F089520
:10348000A1E21A2EAA1BBB1BFD010DC0AA1FBB1F68
:10349000EE1FFF1FA217B307E407F50720F0A21BDA
:1034A000B30BE40BF50B661F771F881F991F1A9447
:1034B00069F760957095809590959B01AC01BD0171
:1034C000CF010895052E97FB16F4009407D057FD01
:1034D0000DD00E94401A07FC09D07EF4909580958B
:1034E000709561957F4F8F4F9F4F089550954095F0
:1034F000309521953F4F4F4F5F4F0895A29FB001E8
:10350000B39FC001A39F01D0B29F700D811D1124F4
:10351000911D0895AA1BBB1B51E107C0AA1FBB1F29
:10352000A617B70710F0A61BB70B881F991F5A954F
:10353000A9F780959095BC01CD010895EE0FFF1F6E
:103540000590F491E02D09940F931F93CF93DF938F
:10355000689F8001699F100D789F100D1124C8018C
:103560000E94C21AC82FD92F209731F0A80160E01D
:1035700070E08C2F0E94F91BCE01DF91CF911F913B
:103580000F9108950F931F93CF93DF93823091058E
:1035900010F482E090E0E091DB05F091DC0520E0A2
:1035A00030E0C0E0D0E023C0408151814817590786
:1035B000A8F04817590761F482819381209719F088
:1035C0009B838A832EC09093DC058093DB0529C002
:1035D0002115310529F04217530710F0A90102C047
:1035E000BE01DF0102811381EF019A01F8013097DA
:1035F000D9F62115310509F1281B390B2430310585
:1036000090F412968D919C9113976115710521F09C
:10361000FB019383828304C09093DC058093DB05D8
:10362000FD01329644C0FD01E20FF31F8193919397
:10363000225031092D933C933AC02091D905309105
:10364000DA05232B41F420910201309103013093DC
:10365000DA052093D905209100013091010121154F
:10366000310541F42DB73EB7409104015091050159
:10367000241B350BE091D905F091DA05E217F30729
:10368000A0F42E1B3F0B2817390778F0AC014E5FD2
:103690005F4F2417350748F04E0F5F1F5093DA0530
:1036A0004093D9058193919302C0E0E0F0E0CF010F
:1036B000DF91CF911F910F910895EF92FF920F9399
:1036C0001F93CF93DF93009709F48EC0DC0112970C
:1036D00013961C921E921297E090DB05F090DC0589
:1036E000E114F10489F42D913C911197280F391FB1
:1036F0008091D9059091DA058217930789F5B093E7
:10370000DA05A093D90570C0E70120E030E001C0E0
:10371000EA01CA17DB0738F44A815B819E01411533
:103720005105B1F722C0AC0142505109FA01D383CF
:10373000C28300811181BC01600F711F6C177D076E
:1037400061F468817981600F711F6E5F7F4F7183B3
:1037500060836A817B81738362832115310529F43B
:10376000B093DC05A093DB053FC0F901B383A283CE
:10377000E90149915991C40FD51FAC17BD0771F4E8
:10378000DC019E918E91840F951F02969183808318
:1037900012968D919C91139793838283A0E0B0E061
:1037A00002C0D7017C01F701828193810097C9F79C
:1037B000C701029620813181820F931F2091D90584
:1037C0003091DA052817390779F4109729F4109207
:1037D000DC051092DB0504C013961C921E92129712
:1037E000F092DA05E092D905CDB7DEB7E6E00C94A9
:1037F0000C1CDC0101C06D9341505040E0F708956E
:103800002A88398848885F846E847D848C849B8470
:10381000AA84B984C884DF80EE80FD800C811B817E
:10382000AA81B981CE0FD11D0FB6F894DEBF0FBEAD
:0A383000CDBFED010895F894FFCF1D
:10383A000000DD0520000101000A006400E8033FE2
:10384A00065B4F666D7D077F6F777C395E797152B3
:10385A00656164206661696C0000000000690F3BC5
:10386A000FDE0EE70EFB0E0B0F000000006517B906
:0A387A001600172F1713175317003D
:00000001FF

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,865 @@
:100000000C9464000C94DB120C9408130C948C0078
:100010000C948C000C9490030C948C000C948C0029
:100020000C948C000C948C000C948C000C948C0020
:100030000C948C000C94F80D0C948C000C948C0097
:100040000C9435130C948C000C9485150C94B715F6
:100050000C948C000C948C000C948C000C948C00F0
:100060000C947E110C948C0000000008000201002A
:100070000003040700000000000000000102040863
:100080001020408001020408102001020408102002
:10009000040404040404040402020202020203032E
:1000A00003030303000000002300260029000000D2
:1000B0000000250028002B0000000000240027007D
:1000C0002A00D9031611E71511241FBECFEFD8E07F
:1000D000DEBFCDBF11E0A0E0B1E0EEEAF5E302C083
:1000E00005900D92AA34B107D9F723E0AAE4B1E054
:1000F00001C01D92A53AB207E1F710E0C8ECD0E0CC
:1001000004C02297FE010E948719C23CD107C9F79B
:100110000E942B160C94D51A0C940000CF92DF92FB
:10012000EF92FF920F931F93E82FF92F05C0015014
:1001300011092109310961F1908196239417B9F3CE
:1001400005C0015011092109310911F1908196234F
:100150009413F7CFC12CD12CE12CF12C0AC08FEFD6
:10016000C81AD80AE80AF80A0C151D052E053F051D
:1001700079F080818623841791F36C2D7D2D8E2D4F
:100180009F2D1F910F91FF90EF90DF90CF900895DA
:1001900060E070E080E090E01F910F91FF90EF90A1
:1001A000DF90CF900895CF93DF93EC0160E08881DA
:1001B0000E94FA1484E190E00E94D61361E08881E5
:1001C0000E94FA1484E190E0DF91CF910C94D61351
:1001D0000F931F93CF93DF93EC01062F18E007FFD7
:1001E00002C061E001C060E089810E94FA14CE0182
:1001F0000E94D300000F115091F7DF91CF911F9112
:100200000F910895EF92FF921F93CF93DF9300D049
:10021000CDB7DEB77C01162F27FF02C060EC01C00E
:1002200060EE26FF606147FF686046FF646017FF6D
:10023000626016FF6160C70129834A830E94E8005B
:100240002981622FC7010E94E8004A81642FC701FB
:100250000E94E800612FC7010F900F90DF91CF91AE
:100260001F91FF90EF900C94E8007F928F929F92E5
:10027000AF92BF92CF92DF92EF92FF920F931F93B4
:10028000CF93DF93EC01162F942E822E60E00E9414
:10029000E80060E0CE010E94E80060E0CE010E942C
:1002A000E80060E0CE010E94E80083E0189F700142
:1002B000112467018FEFC81AD80A570182E0A80EEF
:1002C000B11C712C8A81781600F571120FC0EB8178
:1002D000FC81EE0DFF1D9082EB81FC81EC0DFD1D7C
:1002E0008082EB81FC81EA0DFB1D0083EB81FC81A8
:1002F00083E0789EE00DF11D11242281418160810F
:10030000CE010E9402017394DDCF60E0CE010E9415
:10031000E80060E0CE010E94E80060E0CE010E94AB
:10032000E80060E0CE01DF91CF911F910F91FF9027
:10033000EF90DF90CF90BF90AF909F908F907F9085
:100340000C94E8000F931F93CF93DF93EC01862F5B
:10035000688349832A8361E00E94C11461E0898136
:100360000E94C1148A8161E070E023E0829FC00195
:1003700011240E948B199C838B8310E08A811817AB
:1003800048F400E020E040E0612FCE010E943501FA
:100390001F5FF4CFDF91CF911F910F910895FC0162
:1003A00082810895CF93DF93EC01862F6E834F8374
:1003B000288791E09D8760E00E94C11461E08E81F2
:1003C0000E94FA1419861A861B861C86DF91CF912B
:1003D0000895DF92EF92FF920F931F93CF93DF93D5
:1003E000EC0161E08E810E94FA146AEF70E080E017
:1003F00090E00E94AE130E947F1309851A852B8519
:100400003C85601771078207930720F419861A86C6
:100410001B861C862D85211111C009851A852B8507
:100420003C85DC01CB01801B910BA20BB30B803D03
:100430009740A105B10510F481E071C01D860E94AE
:100440007F1369877A878B879C871C821B821A821D
:100450001982188261E08E810E94C11460E08E8151
:100460000E94FA1464E170E080E090E00E94AE1314
:10047000F89461E08E810E94FA1488E290E00E9474
:10048000D61360E08E810E94C114F12CD12C81E042
:10049000E12C082F10E08E810E9430158017910703
:1004A00041F4E39481E090E00E94D6138FEFE812CC
:1004B000F2CF8E810E9430159FEFE916C9F023E03C
:1004C0002F1590F4F0FC10C09D2D9695969596955D
:1004D000FE01E90FF11D9081990F908328852E155B
:1004E00010F491609083D394F39495E5F912D0CFF2
:1004F000789427E22D1590F42C8130E04881898191
:1005000090E0840F911D4A81840F911D4B81840FCF
:10051000911D99272817390709F48ECF80E0DF91C4
:10052000CF911F910F91FF90EF90DF900895CF92A0
:10053000DF92EF92FF920F931F93CF93DF93EC0123
:10054000162F0E94E901882309F450C08F818B3057
:1005500031F008F44BC08551823078F047C06A8191
:1005600070E080E090E00E942B18112309F449C04C
:1005700020E030E040E151E42AC00A81602F6F772B
:1005800070E080E090E00E942D1820E030E040E82C
:1005900053E40E94B9186B017C016B8170E080E02C
:1005A00090E00E942D189B01AC01C701B6010E948A
:1005B0005F1720E030E040E251E40E94C31707FDDE
:1005C0009058112309F120E030E040E151E40E940D
:1005D000B91820E030E040EA50E40E94C31720E060
:1005E00030E040E052E40E945F170EC067E071E027
:1005F00084E093E00E94781620E030E040EC5FE772
:1006000005C09B01AC0102C09B01AC01B901CA014C
:10061000DF91CF911F910F91FF90EF90DF90CF90DE
:100620000895CF92DF92EF92FF92CF93DF93EC0188
:100630000E94E901882379F18F818B3029F158F1EB
:100640008551823040F5688170E080E090E00E9442
:100650002B1820E030E040E853E40E94B9186B0109
:100660007C01698170E080E090E00E942D189B0180
:10067000AC01C701B6010E945F1720E030E040E204
:1006800051E40E94C31711C0688170E080E090E0DF
:100690000E942B180AC067E071E084E093E00E949A
:1006A000781660E070E080EC9FE7DF91CF91FF90DB
:1006B000EF90DF90CF900895CF93DF9382E00E9478
:1006C0003015EC0183E00E9430158C239D230197A7
:1006D00019F481E080934C01DF91CF91089584E07B
:1006E000809368008BB381718BBB8CE080936D002D
:1006F000089548EE53E060E070E08EE292E00E94E0
:10070000870E2FEF3FEFA9016CE573E08EE292E0D8
:100710000E949D0E789408958EE292E00C948E0EC5
:100720001F920F920FB60F9211241F932F933F9396
:100730004F935F936F937F938F939F93AF93BF93E9
:10074000CF93DF93EF93FF9310914C011130E9F4B5
:1007500082E00E943015EC0183E00E9430158C1776
:100760009D071CF410934A010CC082E00E943015D2
:10077000EC0183E00E943015C817D90734F41092B9
:100780004A0110934B0110924C01FF91EF91DF91C0
:10079000CF91BF91AF919F918F917F916F915F9119
:1007A0004F913F912F911F910F900FBE0F901F906F
:1007B00018958AE491E00C946F03CF93DF93EC01DA
:1007C000862FE62FF0E0F983E88350E05B834A83CD
:1007D0002C831E821D8261E00E94C11461E08A8127
:1007E000DF91CF910C94C1141F93CF93DF93EC0151
:1007F00060E08A810E94FA148AE090E00E94D61399
:1008000014E061E08A810E94FA1460E08A810E940B
:10081000FA141150B1F7DF91CF911F910895FF9213
:100820000F931F93CF93DF93EC018B0190E1F92E8F
:10083000612F661F6627661F8A810E94FA148881CD
:100840000E94301561E0892B09F060E088810E94E8
:10085000FA14000F111FFA9459F7DF91CF911F91ED
:100860000F91FF900895EF92FF920F931F93CF93F4
:10087000DF93EC017B01CB0193709E838D8360E05D
:1008800070E0CE010E940F0400E010E08C8188230C
:1008900051F0C701002E02C0880F991F0A94E2F799
:1008A00091FF0DC009C0C701002E02C09695879523
:1008B0000A94E2F780FF03C06FEF70E002C060E0CF
:1008C00070E0CE010E940F040F5F1F4F0A30110528
:1008D000E9F660E070E0CE010E940F0460E070E095
:1008E000CE010E940F04CE01DF91CF911F910F9195
:1008F000FF90EF900C94F403FC0164836581768192
:100900000C9433046B3008F06AE02FEF3FEF02C025
:10091000220F331F6A95E2F720953095FC0136834C
:100920002583B9010C943304662321F06B3018F051
:100930006AE001C061E05FEF560FFC01258136815E
:1009400061E070E002C0660F771F5A95E2F744231A
:1009500019F0622B732B04C060957095622373238A
:10096000FC01768365830C943304662321F06B309D
:1009700018F06AE001C061E02FEF260F61E070E03F
:1009800002C0660F771F2A95E2F7FC0125813681A8
:1009900062277327768365830C943304FC01858179
:1009A00096810895FC0181E020813181232B09F497
:1009B00080E0089580915C0190915D010196909393
:1009C0005D0180935C0108950E947F13609376011E
:1009D00070937701809378019093790182E00E946F
:1009E00030159093650180936401892BA9F060E034
:1009F00088E00E94FA148091760190917701A0918D
:100A00007801B09179018093720190937301A09362
:100A10007401B093750114C08091760190917701B3
:100A2000A0917801B091790180936E0190936F014C
:100A3000A0937001B093710161E088E00E94FA1404
:100A40004091720150917301609174017091750130
:100A500080916E0190916F01A0917001B091710130
:100A600084179507A607B70740F5481B590B6A0B73
:100A70007B0B40936A0150936B0160936C01709300
:100A80006D0180917E0190917F01A0918001B091D4
:100A90008101840F951FA61FB71F80937E0190933D
:100AA0007F01A0938001B093810110927201109296
:100AB00073011092740110927501089564E070E062
:100AC00084E392E00E940A1164E27DE084E392E014
:100AD0000E940C116DE57DE084E392E00E9411110B
:100AE00041E050E064EE74E080E00C94AB12AF9211
:100AF000BF92CF92DF92EF92FF920F931F93CF930B
:100B0000DF93CDB7DEB728970FB6F894DEBF0FBEE0
:100B1000CDBF8091BA019091BB01049709F0BAC191
:100B20008091B8019091B901892B09F0B3C181E09E
:100B300090E09093B9018093B8018091BC019091AD
:100B4000BD018130910539F48091BE010E943015BC
:100B50008093B7019FC18230910539F46091C00143
:100B60008091BE010E94FA1495C183309105B1F4C1
:100B70008091BE010E941C1490938C0180938B0184
:100B80009C0197FF02C021503F4F3093A30160E0CA
:100B900071E00E941C198093A4017CC184309105EE
:100BA00049F46091C0017091C1018091BE010E9421
:100BB000391470C18530910539F46091C00180917C
:100BC000BE010E94C11466C18730910509F043C07F
:100BD0008091BE019091BF0180934F01909350018D
:100BE00061E00E94C11460E080914F010E94FA14FC
:100BF00082E090E00E94D61361E080914F010E9454
:100C0000FA1485E090E00E94D61360E080914F01D5
:100C10000E94FA1460E080914F010E94C11420E408
:100C200032E44FE050E061E080914F010E9459159D
:100C30002AE330E040E050E00E945219CA01B901B5
:100C400020E031E040E050E00E9452192093A301DF
:100C50006093A4011FC18830910551F481E0809315
:100C6000A30182E08093A40187E08093A50112C1D3
:100C70008832910509F05EC08091860190918701CC
:100C8000892B09F407C18091C0019091C10100979F
:100C900019F426E04BE00BC08130910519F426E0F1
:100CA00046E105C00297029740F426E045E16091D5
:100CB000BE0180E292E00E94D20160E080E292E018
:100CC0000E9497026D837E838F83988780E292E0F3
:100CD0000E94110369837A838B839C8310924E0157
:100CE00010924D01FE01359680E090E00196219131
:100CF000DC01A357BE4F2C9384309105BCF384E0F4
:100D000090E090934E0180934D010196DC01A35732
:100D1000BE4FE1E0F0E0EC0FFD1FE80FF91F359743
:100D200020812C938830910584F390934E01809319
:100D30004D015DC082339105D9F44091BE015091BF
:100D4000BF0121E08091C0019091C101892B09F47C
:100D500020E061E0640FFA01329737E03E9FC00166
:100D60003F9F900D11248A509E4F0E94DD0392C038
:100D7000C39709F041C02091BE013091BF012250BC
:100D8000310947E0429FC001439F900D11248A50D2
:100D90009E4F0E94D204811161C12EC08A309105FC
:100DA00009F0F5C58091860190918701019709F0BE
:100DB00071C0809166018093A20180917A01909127
:100DC0007B01A0917C01B0917D018093A301492F0B
:100DD0005A2F6B2F772740937A0150937B016093B2
:100DE0007C0170937D014093A401A093A501109212
:100DF0008701109286014EC08091BC019091BD0187
:100E0000C49709F406C18091BC019091BD01C597BA
:100E100091F42091BE013091BF012250310947E089
:100E2000429FC001439F900D11248A509E4F0E9403
:100E3000D20481112CC18091BC019091BD01C69753
:100E400009F440C18091BC019091BD01C79709F49C
:100E50005EC18091BC019091BD01C89709F484C125
:100E60008091BC019091BD018634910509F0A3C128
:100E70006091BE017091BF0141E0460F9B0122507D
:100E80003109C901880F991F820F931F8C519E4F02
:100E90000E94B80E8091680190916901892BD9F167
:100EA0000E947F130091820110918301209184019F
:100EB00030918501601B710B820B930B6133754779
:100EC0008105910540F181E090E090936701809366
:100ED000660180917E0190917F01A0918001B09187
:100EE000810180937A0190937B01A0937C01B09360
:100EF0007D0110927E0110927F011092800110926C
:100F000081010E947F13609382017093830180931B
:100F100084019093850180915E0190915F01892BFE
:100F200039F180914B01813019F520914A0180916E
:100F3000620190916301213049F401968931910554
:100F400054F0109263011092620109C0019797FF5B
:100F500002C088E190E0909363018093620181E098
:100F600080936001809162018093610110924B0136
:100F70008091580190915901892B09F454C50E9420
:100F80007F13009154011091550120915601309129
:100F90005701601B710B820B930B613D77408105FC
:100FA000910508F440C520915C0130915D014EE14E
:100FB000429FC001439F900D112469E470E00E949C
:100FC0001C19E62F472F60935A0170935B0181E053
:100FD00080935101862F972F60E071E00E941C19C9
:100FE000809352012E2F342F37FF02C021503F4FE4
:100FF0003093530110925D0110925C010E947F13A7
:10100000609354017093550180935601909357015A
:101010000AC52091BE013091BF012250310917E06D
:10102000129FC001139F900D11248A509E4F0E9461
:10103000D204882309F4E7CE2091BE013091BF018C
:1010400022503109129FC001139F900D112460910D
:10105000C0018A509E4F0E9482041CCF61E08091A3
:10106000C0019091C101892B09F460E02091BE017B
:101070003091BF012250310947E0429FC001439F98
:10108000900D11248A509E4F0E947C0403CF41E0B2
:101090008091C2019091C301892B09F440E0209115
:1010A000BE013091BF012250310957E0529FC0016B
:1010B000539F900D11246091C0018A509E4F0E9451
:1010C0009404E8CE2091BE013091BF012250310935
:1010D00017E0129FC001139F900D11248A509E4F5C
:1010E0000E94D204882309F4ADCE2091BE01309134
:1010F000BF0122503109129FC001139F900D11248E
:101100006091C0018A509E4F0E94B504C3CE2091C9
:10111000BE013091BF012250310917E0129FC0017A
:10112000139F900D11248A509E4F0E94D204882351
:1011300009F48FCE80E090E09091C2016091C001EF
:101140007091C101682779272091BE013091BF01BC
:1011500022503109129FC001139F900D11248A5013
:101160009E4F0E94330496CE2091BE013091BF0164
:101170002250310917E0129FC001139F900D1124D6
:101180008A509E4F0E94D204882309F469CE209190
:10119000BE013091BF0122503109129FC001139F3F
:1011A000900D11248A509E4F0E94CE048093A3017B
:1011B0009093A4016FCE8734910519F52091BE015B
:1011C0003091BF0122503109C901880F991F820F48
:1011D000931F8C519E4F0E942010882391F02091E4
:1011E000BE013091BF0122503109C901880F991FFA
:1011F000820F931F6091C0018C519E4F0E94CF0EB1
:1012000049CE8091BC019091BD018834910559F57A
:101210002091BE013091BF0122503109C901880FD0
:10122000991F820F931F8C519E4F0E94201088237C
:10123000D1F080E090E09091C2016091C001709186
:10124000C101682779272091BE013091BF0122504A
:101250003109C901880F991F820F931FE12C00E00B
:1012600024E040E05CC08091BC019091BD018934D4
:10127000910589F42091BE013091BF0122503109BE
:10128000C901880F991F820F931F8C519E4F0E9496
:10129000201081112BC08091BC019091BD018A3436
:1012A000910509F041C02091BE013091BF0122504B
:1012B0003109C901880F991F820F931F8C519E4FCE
:1012C0000E942010882381F12091BE013091BF013E
:1012D00022503109C901880F991F820F931F609115
:1012E000C2018C519E4F0E94191038C080E090E0DE
:1012F0009091C2016091C0017091C1016827792766
:101300002091BE013091BF0122503109C901880FDF
:10131000991F820F931FE12C00E024E041E08C51E3
:101320009E4F0E94A30FB6CD8091BC019091BD014C
:101330008B34910519F52091BE013091BF012250E7
:101340003109C901880F991F820F931F8C519E4F3D
:101350000E942010882391F08091C20189832091FE
:10136000BE013091BF0122503109C901880F991F78
:10137000820F931F2091C00141E00FC18091BC01F9
:101380009091BD018C34910509F075C02091BE018A
:101390003091BF0122503109C901880F991F820F76
:1013A000931F8C519E4F0E942010882309F463C024
:1013B0008091C0019091C1010AE010E0B8010E9443
:1013C0001C192091BE013091BF0122503109C90181
:1013D000880F991F820F931F8C519E4F0E941910E6
:1013E00089838091C0019091C101B8010E941C19AC
:1013F0002091BE013091BF0122503109A901440F53
:10140000551F420F531F682FCA018C519E4F0E94D7
:10141000191080688A838091C2019091C301B8013C
:101420000E941C192091BE013091BF012250310948
:10143000C901880F991F820F931F8C519E4F0E94E4
:1014400019108B838091C2019091C301B8010E9451
:101450001C192091BE013091BF0122503109A90110
:10146000440F551F420F531F682FCA018C519E4FC6
:101470000E94191067C08091BC019091BD018D340C
:10148000910589F42091BE013091BF0122503109AC
:10149000C901880F991F820F931F8C519E4F0E9484
:1014A000201081111EC08091BC019091BD018E342D
:1014B000910509F049C02091BE013091BF01225031
:1014C0003109C901880F991F820F931F8C519E4FBC
:1014D0000E9420108823C1F18FEF89838A838B8338
:1014E00031C01091C001A090C201B090C301AA0CFC
:1014F000BB1CAA0CBB1CC12CD12CCA14DB040CF0E5
:10150000C9CC812F0E941C14BC012091BE013091D6
:10151000BF0122503109C901880F991F820F931F03
:10152000E12C00E024E040E08C519E4F0E94A30F8C
:101530006AEF70E080E090E00E94AE132FEFC21AD5
:10154000D20ADBCF8C831CC08091BC019091BD017D
:101550008F34910551F52091BE013091BF01225089
:101560003109C901880F991F820F931F8C519E4F1B
:101570000E9420108823C9F019821A821B821C82C3
:101580002091BE013091BF0122503109C901880F5D
:10159000991F820F931F20E044E0BE016F5F7F4FD1
:1015A0008C519E4F0E94560F75CC8091BC0190913A
:1015B000BD018A35910569F48091BE01809388014F
:1015C0008091C001809389018091C20180938A013A
:1015D00061CC8B359105B1F46091BE017091BF0172
:1015E00041E0460F9B012250310955E0529FC00156
:1015F000539F900D11242091C0018A539E4F0E9449
:10160000A20148CC8C35910509F044C06091BE011F
:101610007091BF0141E0460F9B012250310955E016
:10162000529FC001539F900D11242091C0018A53F5
:101630009E4F0E94A2011091C20112FBDD24D0F83E
:10164000D19411FBCC24C0F8C19411701195E12CF8
:10165000F12CE5E0BE2E8091C0019091C101E81609
:10166000F9060CF017CC6091BE017091BF01625079
:101670007109B69EC001B79E900D1124012F2C2D2B
:101680004D2D6E2D8A539E4F0E9435013FEFE31A78
:10169000F30AE1CF8D35910509F074C02091C001A6
:1016A0003091C1018091BE019091BF01232BB1F413
:1016B0009C012250310945E0429FC001439F900D9B
:1016C000112400918A012091890140918801609143
:1016D000C2018A539E4F0E943501DCCB9C012250EF
:1016E000310945E0429FC001439F900D11248A5368
:1016F0009E4F0E94CF01E12CF12CC82ED12C15E079
:10170000EC14FD040CF0C6CB2091C0013091C10156
:101710002130310541F48091C2019091C301E81656
:10172000F906B1F42BC02230310541F48091C20199
:101730009091C3018E159F055CF420C023303105C4
:10174000E9F48091C2019091C301E816F906B4F062
:101750002091BE013091BF0122503109129FC0017A
:10176000139F900D112400918A01209189014091CD
:1017700088016E2D8A539E4F0E9435014FEFE41A67
:10178000F40ABECF8E35910509F052C08091C20196
:101790009091C3011816190634F081E090E09093FF
:1017A000C3018093C2012091BE013091BF0122503C
:1017B000310945E0429FC001439F900D11248A5397
:1017C0009E4F0E94CF01E090C001F090C101C82E51
:1017D000D12C15E0EC14FD040CF05CCB8091C00121
:1017E0009091C1019701281B390BC9016091C20179
:1017F0007091C3010E941C19892BB1F42091BE0184
:101800003091BF0122503109129FC001139F900DEA
:10181000112400918A0120918901409188016E2D47
:101820008A539E4F0E9435013FEFE31AF30AD2CF4D
:101830008F35910509F084C02091BE013091BF0120
:101840002250310945E0429FC001439F900D112471
:101850008A539E4F0E94CF01182F8091C201909110
:10186000C301C12ED12CE12CF12C892B99F515E067
:10187000EC14FD040CF00ECB2091C0013091C1019D
:101880008091BE019091BF01E216F3067CF49C01A9
:1018900022503109129FC001139F900D1124009115
:1018A0008A0120918901409188010BC09C0122503E
:1018B0003109129FC001139F900D112400E020E018
:1018C00040E06E2D8A539E4F0E9435014FEFE41A7F
:1018D000F40ACECF75E0B72E96012E193F0909F410
:1018E000D9CA8091C0019091C101A601481B590B32
:1018F000CA014091BE015091BF01612F6E19425043
:1019000051092817390764F0B49EC001B59E900DA7
:10191000112400918A01209189014091880108C019
:10192000B49EC001B59E900D112400E020E040E07F
:101930008A539E4F0E9435015FEFE51AF50ACCCF1E
:101940008E309105C1F441E050E064EE74E080E037
:101950000E94AB1281E090E090936901809368014E
:101960000E947F13609382017093830180938401AE
:101970009093850153C08F30910509F00FCA80E024
:101980000E94CB12109269011092680147C0803109
:10199000910559F48AE491E00E94790381E090E096
:1019A00090935F0180935E0139C08131910549F4C4
:1019B0008AE491E00E948C0310925F0110925E0114
:1019C00069CA8231910501F560E082E00E94C1148C
:1019D00043E050E06AED74E080E00E94AB121092A8
:1019E0005D0110925C010E947F136093540170931B
:1019F0005501809356019093570181E090E09093B8
:101A00005901809358010AC00D9709F043CA1092FA
:101A100059011092580180E00E94CB121092BD0132
:101A20001092BC0137CA28960FB6F894DEBF0FBEDD
:101A3000CDBFDF91CF911F910F91FF90EF90DF907D
:101A4000CF90BF90AF9008950F931F93CF93DF93E4
:101A500001E010E084E392E00E942710892B41F11D
:101A600084E392E00E942710049761F41092B90178
:101A70001092B8011092BB011092BA011093870125
:101A800000938601C091BA01D091BB01CE010196AD
:101A90009093BB018093BA0184E392E00E942F10DF
:101AA000FE01EE0FFF1FE454FE4F91838083D2CFDF
:101AB000DF91CF911F910F9108958091BC0190917A
:101AC000BD01019731F46091B70184E392E00E9477
:101AD000AE108091BC019091BD019C012B7F233001
:101AE000310511F0C89741F443E050E062EA71E03B
:101AF00084E392E00E9481108091BC019091BD012D
:101B00008830910511F0449741F444E050E062EAD6
:101B100071E084E392E00E9481108091BC01909179
:101B2000BD014E9741F449E050E062EA71E084E380
:101B300092E00E9481108091BC019091BD01889734
:101B400041F449E050E06DE871E084E392E00E94E6
:101B500081108091BC019091BD01459751F445E100
:101B600050E062EA71E084E392E00E9481101092FA
:101B7000A2018091BC019091BD010A9781F444E0DB
:101B800050E062EA71E084E392E00E9481101092DA
:101B90006701109266011092BD011092BC01809104
:101BA000BC019091BD010B9771F442E050E060E6FA
:101BB00071E084E392E00E94811010926001109223
:101BC000BD011092BC018091BC019091BD010C97A8
:101BD00071F443E050E061E571E084E392E00E943B
:101BE0008110109251011092BD011092BC01089514
:101BF0001F920F920FB60F9211242F933F934F9382
:101C00005F936F937F938F939F93AF93BF93EF9364
:101C1000FF93E0913202F09133020995FF91EF9129
:101C2000BF91AF919F918F917F916F915F914F91F4
:101C30003F912F910F900FBE0F901F901895FC01B0
:101C4000A3E0440F551F661F771FAA95D1F74115D2
:101C5000510581E06807710514F481E00EC033E09E
:101C600075956795579547953A95D1F74115510563
:101C700081E0680771051CF482E0828331C023E0B3
:101C800075956795579547952A95D1F74115510553
:101C900081E06807710514F483E0EFCF92E0759559
:101CA0006795579547959A95D1F74115510581E06C
:101CB0006807710514F484E0E0CF82E075956795BC
:101CC000579547958A95D1F785E08283411551054F
:101CD00081E06807710524F04FEF5FEF60E070E08E
:101CE0008FB78383F8945183408350938700409348
:101CF000860083818FBF80918100887F80938100DF
:101D0000809181009281892B8093810008951092A7
:101D1000800020E1209381000C941F0EEFE6F0E09C
:101D200080818E7F80830895E1E8F0E02081DC01EE
:101D300012968C91282B208308950F931F93CF9395
:101D4000DF93EC018B01BA01A901141615061606E2
:101D5000170614F40E941F0E1D830C8381E08093EC
:101D60006F00CE01DF91CF911F910F910C94940ED3
:101D7000CF93DF93EC01862F6883498360E00E9454
:101D8000C11460E089810E94C11460E088810E94D2
:101D9000FA1460E08981DF91CF910C94FA146830D5
:101DA00010F4685F01C06FE0FC016283089561E098
:101DB000FC0181810E94C11482E390E00C94D6134F
:101DC000CF93DF93EC0161E089810E94C11482E32B
:101DD00090E00E94D61360E088810E94C11482E3E3
:101DE00090E00E94D61360E089810E94C11482E3D2
:101DF00090E0DF91CF910C94D6130F931F93CF9364
:101E0000DF93EC01062F18E061E088810E94C11485
:101E100082E390E00E94D61300FF02C060E001C0A0
:101E200061E089810E94C11482E390E00E94D61390
:101E300060E088810E94C11482E390E00E94D61382
:101E40000695115009F761E088810E94C11460E095
:101E500089810E94C11482E390E00E94D61360E061
:101E600088810E94C11482E390E00E94D613898188
:101E70000E943015182F811104C061E089810E94F1
:101E8000C11482E390E00E94D61361E088810E9431
:101E9000C11482E390E00E94D61381E0111101C0C9
:101EA00080E0DF91CF911F910F910895AF92BF9283
:101EB000DF92EF92FF920F931F93CF93DF9300D0A7
:101EC000CDB7DEB75C01F62EE42E29837A830E941B
:101ED000D70E60E4C5010E94FD0EC5010E94E00E10
:101EE000C5010E94D70E2981622F63706054C5011D
:101EF0000E94FD0EDF2C0F2D7A81172F802F8D1958
:101F00008E1538F4F80161918F01C5010E94FD0E14
:101F1000F5CFC5010E94E00EC5010E94D70EF50164
:101F200062816058C5010E94FD0EC5010F900F909F
:101F3000DF91CF911F910F91FF90EF90DF90BF90B5
:101F4000AF900C94E00E4F925F926F927F928F92BF
:101F50009F92AF92BF92CF92DF92EF920F931F9317
:101F6000CF93DF9300D000D0CDB7DEB73C015B014B
:101F7000322F202F89E1882E81E0982ECE01019604
:101F80006C01FC0101E01FE3D4015E904E904D0115
:101F9000C501B2010E941C196115710561F441115E
:101FA00006C0002321F08E2F8C19833011F410838A
:101FB00013C0108211C0A62FAF70B0E0A75EBE4F55
:101FC0008C918083649DC001659D900D749D900DE2
:101FD0001124A81AB90A00E0EE2039F08E2F8C19CE
:101FE000813019F48081806880833196B1E18B164D
:101FF000B1E09B0649F664E070E0631B71096C0D6B
:102000007D1D432FC3010E94560F0F900F900F901C
:102010000F90DF91CF911F910F91EF90DF90CF90B4
:10202000BF90AF909F908F907F906F905F904F90F8
:1020300008956F70E62FF0E0E75EFE4F808108950F
:10204000FC0181E09081911101C080E008958091B0
:10205000670290E020916802821B91090895209107
:10206000680280916702281750F4E22FF0E0E759E8
:10207000FD4F808190E02F5F2093680208958FEFDD
:102080009FEF0895E091680280916702E81730F4AD
:10209000F0E0E759FD4F808190E008958FEF9FEFCA
:1020A00008950895E0914002F09141023097E1F0E7
:1020B00030916802209167023217B0F040E0242F7F
:1020C00030E02617370754F4DC01A20FB31F5C91F0
:1020D000D901A759BD4F5C934F5FF1CF10926802B1
:1020E00060936702CB0109940895E0914202F09158
:1020F0004302309729F0109246021092450209944B
:102100000895CF92DF92EF92FF920F931F93CF9398
:10211000DF937C01CB018A0120914402222389F0C4
:10212000EB016B01C40ED51ECC15DD0569F069917C
:10213000D701ED91FC910190F081E02DC701099547
:10214000F3CF642F0E943C11C801DF91CF911F9102
:102150000F91FF90EF90DF90CF900895CF93DF9392
:102160001F92CDB7DEB76983209144022223D1F0BC
:1021700020914502203240F021E030E0FC01338321
:10218000228380E090E015C080914602E82FF0E0C5
:10219000E95BFD4F998190838F5F80934602809326
:1021A000450205C061E0CE0101960E943C1181E02C
:1021B00090E00F90DF91CF910895FC01138212827D
:1021C00048EE53E060E070E0448355836683778394
:1021D0008DE291E0918380830895109268021092BD
:1021E000670210924602109245020C941A11CF9386
:1021F000DF93EC01862F0E94381185E790E10E9461
:10220000691182E590E10E946411CE01DF91CF91C6
:102210000C94ED100C94F7107093410260934002FF
:1022200008957093430260934202089584E392E01C
:102230000C94DD101092F60281E08093F40210926B
:10224000F30261E082E10E94FA1461E083E10E94FE
:10225000FA14E9EBF0E080818E7F808380818D7FAE
:10226000808388E48093B80085E48093BC0008955F
:10227000880F8093BA0008954091AB02262F30E07A
:10228000240F311D21323105DCF42091F602243077
:10229000C9F4FC0180E090E0861758F43091AB025D
:1022A0002191DC01A355BD4FA30FB11D2C930196C5
:1022B000F3CF8091AB02860F8093AB0280E008954C
:1022C00081E0089582E008959093F0028093EF02F8
:1022D00008959093F2028093F102089585ED809322
:1022E000BC008091BC0084FDFCCF1092F6020895E2
:1022F00085EC8093BC001092F60208951F920F9215
:102300000FB60F9211242F933F934F935F936F93C8
:102310007F938F939F93AF93BF93EF93FF9380919E
:10232000B900887F803609F49EC078F5883209F4B8
:102330005DC090F4803109F456C038F4882309F464
:10234000F5C0883009F44FC0F5C0883109F44EC09B
:10235000803209F45FC0EEC0803409F46AC058F4DA
:10236000803309F457C0883309F0E4C080938902B0
:102370000E947811DFC0803509F44FC0883509F418
:102380005DC0883409F0D6C0D3C0883909F4C4C010
:10239000A8F4883709F467C038F4883609F463C0B4
:1023A000803709F460C0C6C0883809F4B5C08039E8
:1023B00009F45FC0803809F0BDC05BC0803B09F400
:1023C00083C038F4803A09F466C0883A09F47CC0C6
:1023D000B1C0803C09F4A4C0883C09F4A1C0883B8A
:1023E00009F487C0A7C08091F50210C09091CE0279
:1023F0008091CD02981770F5E091CE0281E08E0FAA
:102400008093CE02F0E0E153FD4F80818093BB00CA
:1024100085EC83C0809389028BC0E091CE0281E07D
:102420008E0F8093CE028091BB00F0E0E153FD4F10
:1024300080839091CE028091CD026BC0E091CE025C
:1024400081E08E0F8093CE028091BB00F0E0E153DB
:10245000FD4F80838091F40281116AC081E08093F6
:10246000F30284EA5EC083E08093F60210928A024F
:10247000CFCF80918A02803208F04EC0E0918A026C
:1024800081E08E0F80938A028091BB00F0E0E557D7
:10249000FD4F8083BDCF0E94781180918A028032E7
:1024A00030F4E0918A02F0E0E557FD4F1082609130
:1024B0008A0270E0E091EF02F091F0028BE892E086
:1024C000099510928A0236C084E08093F602109239
:1024D000AC021092AB02E091F102F091F202099588
:1024E0008091AB02811105C081E08093AB02109214
:1024F000AD02E091AC0281E08E0F8093AC02F0E07F
:10250000E355FD4F80818093BB009091AC02809198
:10251000AB02981708F47CCF85E88093BC000AC012
:1025200085EC8093BC001092F60204C010928902E0
:102530000E946E11FF91EF91BF91AF919F918F918A
:102540007F916F915F914F913F912F910F900FBEAF
:102550000F901F9018958230E8F4E82FF0E0EE0F0E
:10256000FF1FE950FD4F71836083813041F08091FE
:1025700069008C7F842B80936900E89A089580918C
:102580006900440F551F440F551F837F842B809390
:102590006900E99A0895823068F4813011F0E89872
:1025A00001C0E998E82FF0E0EE0FFF1FE950FD4F62
:1025B0001182108208951F920F920FB60F9211246C
:1025C0002F933F934F935F936F937F938F939F933B
:1025D000AF93BF93EF93FF938091F7029091F8022E
:1025E000892B29F0E091F702F091F8020995FF910B
:1025F000EF91BF91AF919F918F917F916F915F917B
:102600004F913F912F910F900FBE0F901F901895F3
:102610001F920F920FB60F9211242F933F934F9357
:102620005F936F937F938F939F93AF93BF93EF933A
:10263000FF938091F9029091FA02892B29F0E091A1
:10264000F902F091FA020995FF91EF91BF91AF91D4
:102650009F918F917F916F915F914F913F912F91BA
:102660000F900FBE0F901F9018951F920F920FB6EC
:102670000F9211242F933F938F939F93AF93BF9308
:102680008091FC029091FD02A091FE02B091FF02A8
:102690003091FB0223E0230F2D3720F40196A11D7A
:1026A000B11D05C026E8230F0296A11DB11D209380
:1026B000FB028093FC029093FD02A093FE02B09374
:1026C000FF028091000390910103A0910203B09159
:1026D00003030196A11DB11D809300039093010394
:1026E000A0930203B0930303BF91AF919F918F9189
:1026F0003F912F910F900FBE0F901F9018952FB7FD
:10270000F8946091FC027091FD028091FE0290911C
:10271000FF022FBF08953FB7F89480910003909176
:102720000103A0910203B091030326B5A89B05C045
:102730002F3F19F00196A11DB11D3FBF6627782FCD
:10274000892F9A2F620F711D811D911D42E0660F26
:10275000771F881F991F4A95D1F70895CF92DF926E
:10276000EF92FF92CF93DF936B017C010E948B135A
:10277000EB01C114D104E104F10489F00E947A163E
:102780000E948B136C1B7D0B683E734090F381E0BD
:10279000C81AD108E108F108C851DC4FEACFDF912F
:1027A000CF91FF90EF90DF90CF9008958230910508
:1027B00038F0880F991F880F991F05970197F1F737
:1027C0000895789484B5826084BD84B5816084BDA9
:1027D00085B5826085BD85B5816085BDEEE6F0E09A
:1027E000808181608083E1E8F0E0108280818260F6
:1027F0008083808181608083E0E8F0E08081816077
:102800008083E1EBF0E0808184608083E0EBF0E0A6
:10281000808181608083EAE7F0E08081846080834A
:1028200080818260808380818160808380818068F4
:1028300080831092C10008958E3008F08E5087700A
:102840002091060190E4299F90011124822B80930E
:102850007C0080917A00806480937A0080917A0075
:1028600086FDFCCF809178002091790090E0922B3A
:1028700008951F93CF93DF93182FEB0161E00E941F
:10288000C114209711F460E004C0CF3FD10539F4A2
:1028900061E0812FDF91CF911F910C94FA14E12F09
:1028A000F0E0E859FF4FE491E330F9F048F4E1300B
:1028B000B9F0E230A1F584B5806284BDC8BD34C0F2
:1028C000E730E9F0E83019F1E43049F58091800013
:1028D000806280938000D0938B00C0938A0024C0D4
:1028E00084B5806884BDC7BD1FC0809180008068AA
:1028F00080938000D0938900C093880015C0809198
:10290000B00080688093B000C093B3000DC0809188
:10291000B00080628093B000C093B40005C0C0389E
:10292000D1050CF0B5CFAFCFDF91CF911F910895B6
:10293000833081F028F4813099F08230A1F008953D
:102940008730A9F08830B9F08430D1F480918000CC
:102950008F7D03C0809180008F77809380000895E1
:1029600084B58F7702C084B58F7D84BD0895809132
:10297000B0008F7703C08091B0008F7D8093B0004E
:102980000895CF93DF9390E0FC01E458FF4F24912A
:10299000FC01E057FF4F8491882349F190E0880FB4
:1029A000991FFC01E854FF4FA591B49182559F4FA8
:1029B000FC01C591D4919FB7611108C0F8948C9126
:1029C000209582238C93888182230AC0623051F43F
:1029D000F8948C91322F309583238C938881822BAD
:1029E000888304C0F8948C91822B8C939FBFDF91D5
:1029F000CF9108950F931F93CF93DF931F92CDB77D
:102A0000DEB7282F30E0F901E859FF4F8491F90132
:102A1000E458FF4F1491F901E057FF4F0491002350
:102A2000C9F0882321F069830E9498146981E02FFE
:102A3000F0E0EE0FFF1FE255FF4FA591B4919FB755
:102A4000F8948C91611103C01095812301C0812BF2
:102A50008C939FBF0F90DF91CF911F910F9108959D
:102A6000CF93DF93282F30E0F901E859FF4F84918D
:102A7000F901E458FF4FD491F901E057FF4FC49199
:102A8000CC2391F081110E949814EC2FF0E0EE0F0E
:102A9000FF1FEC55FF4FA591B4912C912D2381E0A0
:102AA00090E021F480E002C080E090E0DF91CF91DF
:102AB00008950F931F93762F90E0FC01E458FF4F89
:102AC0006491FC01E057FF4FE4917111762FF0E023
:102AD000EE0FFF1FEC55FF4F8591949189019A01EC
:102AE0003F70472F0E948E00611571058105910589
:102AF00031F06F5F7F4F8F4F9F4F9F7003C060E03B
:102B000070E0CB011F910F9108951F920F920FB6A5
:102B10000F9211242F938F939F93EF93FF93E09144
:102B20001403F09115038081E0911A03F0911B03C7
:102B300082FD12C0908180911D038F5F8F73209161
:102B40001E03821751F0E0911D03F0E0EC5FFC4F93
:102B5000958F80931D0301C08081FF91EF919F911C
:102B60008F912F910F900FBE0F901F9018951F926D
:102B70000F920FB60F9211242F933F934F935F93B1
:102B80006F937F938F939F93AF93BF93EF93FF9335
:102B900084E093E00E94B616FF91EF91BF91AF9150
:102BA0009F918F917F916F915F914F913F912F9165
:102BB0000F900FBE0F901F90189584E093E00E9435
:102BC0007B1621E0892B09F420E0822F08951092D2
:102BD00007031092060388EE93E0A0E0B0E0809334
:102BE000080390930903A0930A03B0930B038DE3AA
:102BF00091E0909305038093040385EC90E090931B
:102C000011038093100384EC90E09093130380935E
:102C1000120380EC90E0909315038093140381ECF1
:102C200090E0909317038093160382EC90E09093CA
:102C300019038093180386EC90E090931B03809314
:102C40001A0310921D0310921E0310921F0310927C
:102C50002003089508950E94E1130E942A160E94FD
:102C60005E05C8EAD6E10E9477052097E1F30E944D
:102C7000A816F9CFCF92DF92EF92FF920F931F9396
:102C8000CF93DF936C017A01EB01E60EF71E00E0B3
:102C900010E0CE15DF0561F06991D601ED91FC9150
:102CA0000190F081E02DC6010995080F191FF1CFA1
:102CB000C801DF91CF911F910F91FF90EF90DF90AE
:102CC000CF9008956115710581F0DB010D90002012
:102CD000E9F7AD0141505109461B570BDC01ED915D
:102CE000FC910280F381E02D099480E090E008954A
:102CF0000C9462160895FC01818D228D90E0805C19
:102D00009F4F821B91098F7399270895FC01918D24
:102D1000828D981731F0828DE80FF11D858D90E03E
:102D200008958FEF9FEF0895FC01918D828D981784
:102D300061F0828DDF01A80FB11D5D968C91928D9F
:102D40009F5F9F73928F90E008958FEF9FEF08959C
:102D50008DED95E1892B49F080E090E0892B29F0F9
:102D60000E94DD1581110C9400000895FC01848DF2
:102D7000DF01A80FB11DA35ABF4F2C91848D90E0A5
:102D800001968F739927848FA689B7892C93A08980
:102D9000B1898C9180648C93938D848D981306C037
:102DA0000288F389E02D80818F7D80830895CF9301
:102DB000DF93EC01888D8823C9F0EA89FB89808143
:102DC00085FD05C0A889B9898C9186FD0FC00FB615
:102DD00007FCF5CF808185FFF2CFA889B9898C9156
:102DE00085FFEDCFCE010E94B616E7CFDF91CF91E0
:102DF0000895CF92DF92FF920F931F93CF93DF93AB
:102E00001F92CDB7DEB76C0181E0D60158968C9346
:102E100058975B969C915B975C968C915C97981306
:102E200007C05096ED91FC915197808185FD2EC091
:102E3000F601038D10E00F5F1F4F0F731127F02E67
:102E4000F601848DF81211C00FB607FCF9CFD60138
:102E50005096ED91FC915197808185FFF1CFC6018D
:102E600069830E94B6166981EBCF838DE80FF11D4F
:102E7000E35AFF4F6083D6015B960C935B975296A3
:102E8000ED91FC915397808180620CC0D6015696DB
:102E9000ED91FC91579760835096ED91FC9151977D
:102EA00080818064808381E090E00F90DF91CF91FA
:102EB0001F910F91FF90DF90CF9008955058BB273E
:102EC000AA270ED01CC10DD130F012D120F031F460
:102ED0009F3F11F41EF402C10EF4E095E7FBF8C029
:102EE000E92F1ED180F3BA1762077307840795078D
:102EF00018F071F49EF536C10EF4E0950B2EBA2F42
:102F0000A02D0B01B90190010C01CA01A0011124EF
:102F1000FF27591B99F0593F50F4503E68F11A169B
:102F2000F040A22F232F342F4427585FF3CF46952C
:102F300037952795A795F0405395C9F77EF41F164E
:102F4000BA0B620B730B840BBAF09150A1F0FF0F18
:102F5000BB1F661F771F881FC2F70EC0BA0F621F04
:102F6000731F841F48F4879577956795B795F795F4
:102F70009E3F08F0B3CF9395880F08F09927EE0F86
:102F80009795879508950CD0BAC0B2D040F0A9D0DB
:102F900030F021F45F3F19F09BC05111E4C09EC096
:102FA000BFD098F39923C9F35523B1F3951B550B63
:102FB000BB27AA2762177307840738F09F5F5F4F0C
:102FC000220F331F441FAA1FA9F333D00E2E3AF04D
:102FD000E0E830D091505040E695001CCAF729D067
:102FE000FE2F27D0660F771F881FBB1F26173707B6
:102FF0004807AB07B0E809F0BB0B802DBF01FF27E6
:1030000093585F4F2AF09E3F510568F061C0ABC0F6
:103010005F3FECF3983EDCF3869577956795B7951F
:10302000F7959F5FC9F7880F911D9695879597F93A
:103030000895E1E0660F771F881FBB1F62177307B3
:103040008407BA0720F0621B730B840BBA0BEE1FC8
:1030500088F7E0950895E89409C097FB3EF49095B1
:103060008095709561957F4F8F4F9F4F9923A9F061
:10307000F92F96E9BB279395F695879577956795F0
:10308000B795F111F8CFFAF4BB0F11F460FF1BC034
:103090006F5F7F4F8F4F9F4F16C0882311F096E9C7
:1030A00011C0772321F09EE8872F762F05C0662375
:1030B00071F096E8862F70E060E02AF09A95660F2E
:1030C000771F881FDAF7880F9695879597F90895E7
:1030D00097F99F6780E870E060E008959FEF80ECCB
:1030E000089500240A94161617061806090608956E
:1030F00000240A9412161306140605060895092ED4
:103100000394000C11F4882352F0BB0F40F4BF2B42
:1031100011F460FF04C06F5F7F4F8F4F9F4F089582
:1031200057FD9058440F551F59F05F3F71F0479578
:10313000880F97FB991F61F09F3F79F0879508955D
:10314000121613061406551FF2CF4695F1DF08C07C
:10315000161617061806991FF1CF86957105610599
:1031600008940895E894BB2766277727CB0197F941
:1031700008950BD0C4CFB5DF28F0BADF18F095233F
:1031800009F0A6CFABCF1124EECFCADFA0F3959FF5
:10319000D1F3950F50E0551F629FF001729FBB273E
:1031A000F00DB11D639FAA27F00DB11DAA1F649FEA
:1031B0006627B00DA11D661F829F2227B00DA11D9D
:1031C000621F739FB00DA11D621F839FA00D611D23
:1031D000221F749F3327A00D611D231F849F600D44
:1031E000211D822F762F6A2F11249F5750408AF07D
:1031F000E1F088234AF0EE0FFF1FBB1F661F771F09
:10320000881F91505040A9F79E3F510570F060CF44
:10321000AACF5F3FECF3983EDCF3869577956795F0
:10322000B795F795E7959F5FC1F7FE2B880F911D26
:103230009695879597F9089597FB072E16F40094B5
:1032400007D077FD09D00E94711907FC05D03EF424
:10325000909581959F4F0895709561957F4F089542
:10326000A1E21A2EAA1BBB1BFD010DC0AA1FBB1F8A
:10327000EE1FFF1FA217B307E407F50720F0A21BFC
:10328000B30BE40BF50B661F771F881F991F1A9469
:1032900069F760957095809590959B01AC01BD0193
:1032A000CF010895052E97FB1EF400940E94691922
:1032B00057FD07D00E94301907FC03D04EF40C9440
:1032C000691950954095309521953F4F4F4F5F4F6D
:1032D000089590958095709561957F4F8F4F9F4F82
:1032E0000895AA1BBB1B51E107C0AA1FBB1FA6174D
:1032F000B70710F0A61BB70B881F991F5A95A9F79F
:1033000080959095BC01CD010895EE0FFF1F0590AB
:10331000F491E02D09940F931F93CF93DF93869F31
:103320008001879F100D969F100D1124C8010E94E7
:10333000A719EC01009729F0A80160E070E00E9455
:10334000CE1ACE01DF91CF911F910F910895CF93A7
:10335000DF938230910510F482E090E0E091A303C6
:10336000F091A40320E030E0A0E0B0E0309739F124
:103370004081518148175907B8F04817590771F42F
:1033800082819381109729F013969C938E931297C4
:103390002CC09093A4038093A30327C0211531056B
:1033A00031F04217530718F0A901DB0101C0EF010A
:1033B0009A01BD01DF010280F381E02DD7CF2115F5
:1033C0003105F9F0281B390B2430310580F48A814E
:1033D0009B816115710521F0FB019383828304C0F9
:1033E0009093A4038093A303FE01329644C0FE0190
:1033F000E20FF31F8193919322503109398328837F
:103400003AC02091A1033091A203232B41F42091D3
:103410000201309103013093A2032093A103209174
:103420000001309101012115310541F42DB73EB75E
:103430004091040150910501241B350BE091A1033B
:10344000F091A203E217F307A0F42E1B3F0B2817FD
:10345000390778F0AC014E5F5F4F2417350748F00D
:103460004E0F5F1F5093A2034093A103819391934A
:1034700002C0E0E0F0E0CF01DF91CF910895CF935B
:10348000DF93009709F487C0FC0132971382128200
:10349000C091A303D091A403209781F420813181AE
:1034A000280F391F8091A1039091A20382179307DF
:1034B00079F5F093A203E093A1036DC0DE0120E053
:1034C00030E0AE17BF0750F412964D915C91139700
:1034D0009D014115510509F1DA01F3CFB383A283B0
:1034E00040815181840F951F8A179B0771F48D913C
:1034F0009C911197840F951F029691838083129659
:103500008D919C911397938382832115310529F422
:10351000F093A403E093A3033EC0D9011396FC9358
:10352000EE9312974D915D91A40FB51FEA17FB071B
:1035300079F480819181840F951F0296D9011196AB
:103540009C938E938281938113969C938E93129772
:10355000E0E0F0E08A819B81009719F0FE01EC0128
:10356000F9CFCE01029628813981820F931F2091D5
:10357000A1033091A2032817390769F4309729F481
:103580001092A4031092A30302C013821282D0935C
:10359000A203C093A103DF91CF910895DC0101C084
:0E35A0006D9341505040E0F70895F894FFCF2E
:1035AE000000A50380000152656164206661696CAC
:1035BE000001000A006400E8033F065B4F666D7D64
:1035CE00077F6F777C395E797100000000AE108145
:1035DE001027102F104210511000000000F9163A5B
:0A35EE00167B1694168616D71600F9
:00000001FF

File diff suppressed because it is too large Load diff

4
Firmware/Source/grovepi/.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
.pioenvs
.piolibdeps
.clang_complete
.gcc-flags.json

View file

@ -0,0 +1,67 @@
# Continuous Integration (CI) is the practice, in software
# engineering, of merging all developer working copies with a shared mainline
# several times a day < http://docs.platformio.org/page/ci/index.html >
#
# Documentation:
#
# * Travis CI Embedded Builds with PlatformIO
# < https://docs.travis-ci.com/user/integration/platformio/ >
#
# * PlatformIO integration with Travis CI
# < http://docs.platformio.org/page/ci/travis.html >
#
# * User Guide for `platformio ci` command
# < http://docs.platformio.org/page/userguide/cmd_ci.html >
#
#
# Please choice one of the following templates (proposed below) and uncomment
# it (remove "# " before each line) or use own configuration according to the
# Travis CI documentation (see above).
#
#
# Template #1: General project. Test it using existing `platformio.ini`.
#
# language: python
# python:
# - "2.7"
#
# sudo: false
# cache:
# directories:
# - "~/.platformio"
#
# install:
# - pip install -U platformio
# - platformio update
#
# script:
# - platformio run
#
# Template #2: The project is intended to by used as a library with examples
#
# language: python
# python:
# - "2.7"
#
# sudo: false
# cache:
# directories:
# - "~/.platformio"
#
# env:
# - PLATFORMIO_CI_SRC=path/to/test/file.c
# - PLATFORMIO_CI_SRC=examples/file.ino
# - PLATFORMIO_CI_SRC=path/to/test/directory
#
# install:
# - pip install -U platformio
# - platformio update
#
# script:
# - platformio ci --lib="." --board=ID_1 --board=ID_2 --board=ID_N

View file

@ -0,0 +1,21 @@
# Import('env')
#
# env.Replace(FUSESCMD="avrdude -c usbtiny -p m328p -U lfuse:w:0xFF:m -U hfuse:w:0xDA:m -U efuse:w:0xfd:m -B 3")
from os.path import join
from SCons.Script import DefaultEnvironment
env = DefaultEnvironment()
env.Replace(
MYUPLOADERFLAGS=[
"-v",
"-p", "$BOARD_MCU",
"-c", "$UPLOAD_PROTOCOL",
"-b", "115200",
"-U", "lfuse:w:0xFF:m",
"-U", "hfuse:w:0xDA:m",
"-U", "efuse:w:0xFD:m"
],
UPLOADHEXCMD='"$UPLOADER" $MYUPLOADERFLAGS -U flash:w:$SOURCES:i'
)

View file

@ -0,0 +1,41 @@
This directory is intended for the project specific (private) libraries.
PlatformIO will compile them to static libraries and link to executable file.
The source code of each library should be placed in separate directory, like
"lib/private_lib/[here are source files]".
For example, see how can be organized `Foo` and `Bar` libraries:
|--lib
| |
| |--Bar
| | |--docs
| | |--examples
| | |--src
| | |- Bar.c
| | |- Bar.h
| | |- library.json (optional, custom build options, etc) http://docs.platformio.org/page/librarymanager/config.html
| |
| |--Foo
| | |- Foo.c
| | |- Foo.h
| |
| |- readme.txt --> THIS FILE
|
|- platformio.ini
|--src
|- main.c
Then in `src/main.c` you should use:
#include <Foo.h>
#include <Bar.h>
// rest H/C/CPP code
PlatformIO will find your libraries automatically, configure preprocessor's
include paths and build them.
More information about PlatformIO Library Dependency Finder
- http://docs.platformio.org/page/librarymanager/ldf.html

View file

@ -0,0 +1,17 @@
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html
[env:grovepi]
platform = atmelavr
framework = arduino
board = 328p16m
upload_protocol = usbtiny
upload_speed = 57600
extra_scripts = extra_script.py

View file

@ -0,0 +1,184 @@
/*
* Copyright (C) 2012 Paulo Marques (pjp.marques@gmail.com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* Information about the P9813 protocol obtained from:
* http://www.seeedstudio.com/wiki/index.php?title=Twig_-_Chainable_RGB_LED
*
* HSB to RGB routine adapted from:
* http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript
*/
// --------------------------------------------------------------------------------------
#include "ChainableLED.h"
// Forward declaration
// float hue2rgb(float p, float q, float t);
// --------------------------------------------------------------------------------------
void ChainableLED::begin(byte clk_pin, byte data_pin, byte number_of_leds)
{
_clk_pin = clk_pin;
_data_pin = data_pin;
_num_leds = number_of_leds;
pinMode(_clk_pin, OUTPUT);
pinMode(_data_pin, OUTPUT);
_led_state = (byte*) calloc(_num_leds*3, sizeof(byte));
for (byte i=0; i<_num_leds; i++)
setColorRGB(i, 0, 0, 0);
}
//ChainableLED::~begin()
//{
// free(_led_state);
//}
// --------------------------------------------------------------------------------------
void ChainableLED::clk(void)
{
digitalWrite(_clk_pin, LOW);
delayMicroseconds(_CLK_PULSE_DELAY);
digitalWrite(_clk_pin, HIGH);
delayMicroseconds(_CLK_PULSE_DELAY);
}
void ChainableLED::sendByte(byte b)
{
// Send one bit at a time, starting with the MSB
for (byte i=0; i<8; i++)
{
// If MSB is 1, write one and clock it, else write 0 and clock
if ((b & 0x80) != 0)
digitalWrite(_data_pin, HIGH);
else
digitalWrite(_data_pin, LOW);
clk();
// Advance to the next bit to send
b <<= 1;
}
}
void ChainableLED::sendColor(byte red, byte green, byte blue)
{
// Start by sending a byte with the format "1 1 /B7 /B6 /G7 /G6 /R7 /R6"
byte prefix = B11000000;
if ((blue & 0x80) == 0) prefix|= B00100000;
if ((blue & 0x40) == 0) prefix|= B00010000;
if ((green & 0x80) == 0) prefix|= B00001000;
if ((green & 0x40) == 0) prefix|= B00000100;
if ((red & 0x80) == 0) prefix|= B00000010;
if ((red & 0x40) == 0) prefix|= B00000001;
sendByte(prefix);
// Now must send the 3 colors
sendByte(blue);
sendByte(green);
sendByte(red);
}
void ChainableLED::setColorRGB(byte led, byte red, byte green, byte blue)
{
// Send data frame prefix (32x "0")
sendByte(0x00);
sendByte(0x00);
sendByte(0x00);
sendByte(0x00);
// Send color data for each one of the leds
for (byte i=0; i<_num_leds; i++)
{
if (i == led)
{
_led_state[i*3 + _CL_RED] = red;
_led_state[i*3 + _CL_GREEN] = green;
_led_state[i*3 + _CL_BLUE] = blue;
}
sendColor(_led_state[i*3 + _CL_RED],
_led_state[i*3 + _CL_GREEN],
_led_state[i*3 + _CL_BLUE]);
}
// Terminate data frame (32x "0")
sendByte(0x00);
sendByte(0x00);
sendByte(0x00);
sendByte(0x00);
}
//void ChainableLED::setColorHSB(byte led, float hue, float saturation, float brightness)
//{
// float r, g, b;
//
// constrain(hue, 0.0, 1.0);
// constrain(saturation, 0.0, 1.0);
// constrain(brightness, 0.0, 1.0);
//
// if(saturation == 0.0)
// {
// r = g = b = brightness;
// }
// else
// {
// float q = brightness < 0.5 ?
// brightness * (1.0 + saturation) : brightness + saturation - brightness * saturation;
// float p = 2.0 * brightness - q;
// r = hue2rgb(p, q, hue + 1.0/3.0);
// g = hue2rgb(p, q, hue);
// b = hue2rgb(p, q, hue - 1.0/3.0);
// }
//
// setColorRGB(led, (byte)(255.0*r), (byte)(255.0*g), (byte)(255.0*b));
//}
// --------------------------------------------------------------------------------------
//float hue2rgb(float p, float q, float t)
//{
// if (t < 0.0)
// t += 1.0;
// if(t > 1.0)
// t -= 1.0;
// if(t < 1.0/6.0)
// return p + (q - p) * 6.0 * t;
// if(t < 1.0/2.0)
// return q;
// if(t < 2.0/3.0)
// return p + (q - p) * (2.0/3.0 - t) * 6.0;
//
// return p;
//}
byte ChainableLED::getNumLeds()
{
return _num_leds;
}
bool ChainableLED::ready()
{
return _clk_pin != 0;
}

View file

@ -0,0 +1,68 @@
/*
Copyright (C) 2012 Paulo Marques (pjp.marques@gmail.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*
* Library for controlling a chain of RGB LEDs based on the P9813 protocol.
* E.g., supports the Grove Chainable RGB LED product.
*
* Information about the P9813 protocol obtained from:
* http://www.seeedstudio.com/wiki/index.php?title=Twig_-_Chainable_RGB_LED
*/
#ifndef __ChainableLED_h__
#define __ChainableLED_h__
#include "Arduino.h"
#define _CL_RED 0
#define _CL_GREEN 1
#define _CL_BLUE 2
#define _CLK_PULSE_DELAY 20
class ChainableLED
{
public:
// ChainableLED(byte clk_pin, byte data_pin, byte number_of_leds);
void begin(byte clk_pin, byte data_pin, byte number_of_leds);
// ~begin();
void setColorRGB(byte led, byte red, byte green, byte blue);
//void setColorHSB(byte led, float hue, float saturation, float brightness);
byte getNumLeds();
bool ready();
private:
byte _clk_pin;
byte _data_pin;
byte _num_leds;
byte* _led_state;
void clk(void);
void sendByte(byte b);
void sendColor(byte red, byte green, byte blue);
};
#endif

View file

@ -0,0 +1,201 @@
/* DHT library
MIT license
written by Adafruit Industries
*/
#include "DHT.h"
/*
DHT::DHT(uint8_t pin, uint8_t type, uint8_t count) {
_pin = pin;
_type = type;
_count = count;
firstreading = true;
}
*/
void DHT::begin(uint8_t pin, uint8_t type, uint8_t count) {
// set up the pins!
_pin = pin;
_type = type;
_count = count;
firstreading = true;
pinMode(_pin, INPUT);
digitalWrite(_pin, HIGH);
_lastreadtime = 0;
}
//boolean S == Scale. True == Farenheit; False == Celcius
float DHT::readTemperature(bool S) {
float f;
if (read()) {
switch (_type) {
case DHT11:
f = data[2];
if(S)
f = convertCtoF(f);
return f;
case DHT22:
case DHT21:
f = data[2] & 0x7F;
f *= 256;
f += data[3];
f /= 10;
if (data[2] & 0x80)
f *= -1;
if(S)
f = convertCtoF(f);
return f;
}
}
Serial.print("Read fail");
return NAN;
}
float DHT::convertCtoF(float c) {
return c * 9 / 5 + 32;
}
float DHT::readHumidity(void) {
float f;
if (read()) {
switch (_type) {
case DHT11:
f = data[0];
return f;
case DHT22:
case DHT21:
f = data[0];
f *= 256;
f += data[1];
f /= 10;
return f;
}
}
Serial.print("Read fail");
return NAN;
}
boolean DHT::read(void) {
uint8_t laststate = HIGH;
uint8_t counter = 0;
uint8_t j = 0, i;
unsigned long currenttime;
// pull the pin high and wait 250 milliseconds
digitalWrite(_pin, HIGH);
delay(250);
currenttime = millis();
if (currenttime < _lastreadtime) {
// ie there was a rollover
_lastreadtime = 0;
}
if (!firstreading && ((currenttime - _lastreadtime) < 2000)) {
return true; // return last correct measurement
//delay(2000 - (currenttime - _lastreadtime));
}
firstreading = false;
/*
Serial.print("Currtime: "); Serial.print(currenttime);
Serial.print(" Lasttime: "); Serial.print(_lastreadtime);
*/
_lastreadtime = millis();
data[0] = data[1] = data[2] = data[3] = data[4] = 0;
// now pull it low for ~20 milliseconds
pinMode(_pin, OUTPUT);
digitalWrite(_pin, LOW);
delay(20);
cli();
digitalWrite(_pin, HIGH);
delayMicroseconds(40);
pinMode(_pin, INPUT);
// read in timings
for ( i=0; i< MAXTIMINGS; i++) {
counter = 0;
while (digitalRead(_pin) == laststate) {
counter++;
delayMicroseconds(1);
if (counter == 255) {
break;
}
}
laststate = digitalRead(_pin);
if (counter == 255) break;
// ignore first 3 transitions
if ((i >= 4) && (i%2 == 0)) {
// shove each bit into the storage bytes
data[j/8] <<= 1;
if (counter > _count)
data[j/8] |= 1;
j++;
}
}
sei();
/*
Serial.println(j, DEC);
Serial.print(data[0], HEX); Serial.print(", ");
Serial.print(data[1], HEX); Serial.print(", ");
Serial.print(data[2], HEX); Serial.print(", ");
Serial.print(data[3], HEX); Serial.print(", ");
Serial.print(data[4], HEX); Serial.print(" =? ");
Serial.println(data[0] + data[1] + data[2] + data[3], HEX);
*/
// check we read 40 bits and that the checksum matches
if ((j >= 40) &&
(data[4] == ((data[0] + data[1] + data[2] + data[3]) & 0xFF)) ) {
return true;
}
return false;
}
float* DHT::readTempHum(bool scale)
{
if(!read())
return NULL;
switch(_type) {
case DHT11:
// temperature
buffer[0] = data[2];
if(scale)
buffer[0] = convertCtoF(buffer[0]);
// humidity
buffer[1] = data[0];
break;
case DHT22:
case DHT21:
// temperature
buffer[0] = data[2] & 0x7F;
buffer[0] *= 256;
buffer[0] += data[3];
buffer[0] /= 10;
if (data[2] & 0x80)
buffer[0] *= -1;
if(scale)
buffer[0] = convertCtoF(buffer[0]);
// humidity
buffer[1] = data[0];
buffer[1] *= 256;
buffer[1] += data[1];
buffer[1] /= 10;
break;
}
return &buffer[0];
}

View file

@ -0,0 +1,40 @@
#ifndef DHT_H
#define DHT_H
#if ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
/* DHT library
MIT license
written by Adafruit Industries
*/
// how many timing transitions we need to keep track of. 2 * number bits + extra
#define MAXTIMINGS 85
#define DHT11 11
#define DHT22 22
#define DHT21 21
#define AM2301 21
class DHT {
private:
uint8_t data[6];
uint8_t _pin, _type, _count;
boolean read(void);
unsigned long _lastreadtime;
boolean firstreading;
float buffer[2];
public:
//DHT(uint8_t pin, uint8_t type, uint8_t count=6);
void begin(uint8_t pin, uint8_t type, uint8_t count=6);
float readTemperature(bool S=false);
float convertCtoF(float);
float readHumidity(void);
float* readTempHum(bool scale = false);
};
#endif

View file

@ -0,0 +1,175 @@
/*
LED bar library V2.0
2010 Copyright (c) Seeed Technology Inc. All right reserved.
Original Author: LG
Modify: Loovee, 2014-2-26
User can choose which Io to be used.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <Arduino.h>
#include "Grove_LED_Bar.h"
// Initialise
//Grove_LED_Bar::Grove_LED_Bar(unsigned char pinClock, unsigned char pinData, bool greenToRed)
void Grove_LED_Bar::begin(unsigned char pinClock, unsigned char pinData, bool greenToRed)
{
__pinClock = pinClock;
__pinData = pinData;
__greenToRed = greenToRed; // ascending or decending
__state = 0x00; // persist state so individual leds can be toggled
pinMode(__pinClock, OUTPUT);
pinMode(__pinData, OUTPUT);
}
// Send the latch command
void Grove_LED_Bar::latchData()
{
digitalWrite(__pinData, LOW);
delayMicroseconds(10);
for (unsigned char i = 0; i < 4; i++)
{
digitalWrite(__pinData, HIGH);
digitalWrite(__pinData, LOW);
}
}
// Send 16 bits of data
void Grove_LED_Bar::sendData(unsigned int data)
{
for (unsigned char i = 0; i < 16; i++)
{
unsigned int state = (data & 0x8000) ? HIGH : LOW;
digitalWrite(__pinData, state);
state = digitalRead(__pinClock) ? LOW : HIGH;
digitalWrite(__pinClock, state);
data <<= 1;
}
}
// Change the orientation
// Green to red, or red to green
void Grove_LED_Bar::setGreenToRed(bool greenToRed)
{
__greenToRed = greenToRed;
setBits(__state);
}
// Set level (0-10)
// Level 0 means all leds off
// Level 10 means all leds on
void Grove_LED_Bar::setLevel(unsigned char level)
{
level = max(0, min(10, level));
// Set level number of bits from the left to 1
__state = ~(~0 << level);
setBits(__state);
}
// Set a single led
// led (1-10)
// state (0=off, 1=on)
void Grove_LED_Bar::setLed(unsigned char led, bool state)
{
led = max(1, min(10, led));
// Zero based index 0-9 for bitwise operations
led--;
// Bitwise OR or bitwise AND
__state = state ? (__state | (0x01<<led)) : (__state & ~(0x01<<led));
setBits(__state);
}
// Toggle a single led
// led (1-10)
void Grove_LED_Bar::toggleLed(unsigned char led)
{
led = max(1, min(10, led));
// Zero based index 0-9 for bitwise operations
led--;
// Bitwise XOR the leds current value
__state ^= (0x01<<led);
setBits(__state);
}
// Set the current state, one bit for each led
// 0 = 0x0 = 0b000000000000000 = all leds off
// 5 = 0x05 = 0b000000000000101 = leds 1 and 3 on, all others off
// 341 = 0x155 = 0b000000101010101 = leds 1,3,5,7,9 on, 2,4,6,8,10 off
// 1023 = 0x3ff = 0b000001111111111 = all leds on
// | |
// 10 1
void Grove_LED_Bar::setBits(unsigned int bits)
{
__state = bits & 0x3FF;
sendData(CMDMODE);
for (unsigned char i = 0; i < 10; i++)
{
if (__greenToRed)
{
// Bitwise AND the 10th bit (0x200) and left shift to cycle through all bits
sendData((bits << i) & 0x200 ? ON : OFF);
}
else
{
// Bitwise AND the 1st bit (0x01) and right shift to cycle through all bits
sendData((bits >> i) & 0x01 ? ON : OFF);
}
}
// Two extra empty bits for padding the command to the correct length
sendData(0x00);
sendData(0x00);
latchData();
}
// Return the current state
unsigned int Grove_LED_Bar::getBits()
{
return __state;
}
// Has this instance been initialised?
bool Grove_LED_Bar::ready()
{
return __pinClock != 0;
}

View file

@ -0,0 +1,59 @@
/*
LED bar library V2.0
2010 Copyright (c) Seeed Technology Inc. All right reserved.
Original Author: LG
Modify: Loovee, 2014-2-26
User can choose which Io to be used.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef Grove_LED_Bar_H
#define Grove_LED_Bar_H
#define CMDMODE 0x00 // Work on 8-bit mode
#define ON 0xff // 8-bit 1 data
#define OFF 0x00 // 8-bit 0 data
class Grove_LED_Bar
{
private:
unsigned int __pinClock; // Clock pin
unsigned int __pinData; // Data pin
bool __greenToRed; // Orientation (0 = red to green, 1 = green to red)
unsigned int __state; // Led state
void sendData(unsigned int data); // Send a word to led bar
void latchData(void); // Load data into the latch register
public:
//Grove_LED_Bar(unsigned char pinClock, unsigned char pinData, bool greenToRed); // Initialize
void begin(unsigned char pinClock, unsigned char pinData, bool greenToRed); // Initialize
void setGreenToRed(bool greenToRed); // (Re)set orientation
void setLevel(unsigned char level); // Set level
void setLed(unsigned char led, bool state); // Set a single led
void toggleLed(unsigned char led); // Toggle a single led
void setBits(unsigned int bits); // Toggle leds to match given bits
unsigned int getBits(); // Get the current state
bool ready(); // Has this instance been initialised?
};
#endif

View file

@ -0,0 +1,38 @@
// /*
// * IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv
// * An IR detector/demodulator must be connected to the input RECV_PIN.
// * Version 0.1 July, 2009
// * Copyright 2009 Ken Shirriff
// * http://arcfn.com
// */
//
// #include <IRremote.h>
//
// int RECV_PIN = 3;
// int BLINK_PIN = 2;
//
// IRrecv irrecv(RECV_PIN, BLINK_PIN);
//
// decode_results results;
//
// void setup()
// {
// Serial.begin(9600);
// // In case the interrupt driver crashes on setup, give a clue
// // to the user what's going on.
// Serial.println("Enabling IRin");
// irrecv.enableIRIn(); // Start the receiver
// Serial.println("Enabled IRin");
// }
//
// void loop() {
// if (irrecv.decode(&results)) {
// Serial.print(results.decode_type);
// Serial.print(" ");
// Serial.print(results.address, HEX);
// Serial.print(" ");
// Serial.println(results.value, HEX);
// irrecv.resume(); // Receive the next value
// }
// delay(100);
// }

View file

@ -0,0 +1,200 @@
//******************************************************************************
// IRremote
// Version 2.0.1 June, 2015
// Copyright 2009 Ken Shirriff
// For details, see http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.html
//
// Modified by Paul Stoffregen <paul@pjrc.com> to support other boards and timers
// Modified by Mitra Ardron <mitra@mitra.biz>
// Added Sanyo and Mitsubishi controllers
// Modified Sony to spot the repeat codes that some Sony's send
//
// Interrupt code based on NECIRrcv by Joe Knapp
// http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1210243556
// Also influenced by http://zovirl.com/2008/11/12/building-a-universal-remote-with-an-arduino/
//
// JVC and Panasonic protocol added by Kristian Lauszus (Thanks to zenwheel and other people at the original blog post)
// LG added by Darryl Smith (based on the JVC protocol)
// Whynter A/C ARC-110WD added by Francesco Meschia
//******************************************************************************
// Defining IR_GLOBAL here allows us to declare the instantiation of global variables
#define IR_GLOBAL
# include "IRremote.h"
# include "IRremoteInt.h"
#undef IR_GLOBAL
#ifndef IR_TIMER_USE_ESP32
#include <avr/interrupt.h>
#endif
//+=============================================================================
// The match functions were (apparently) originally MACROs to improve code speed
// (although this would have bloated the code) hence the names being CAPS
// A later release implemented debug output and so they needed to be converted
// to functions.
// I tried to implement a dual-compile mode (DEBUG/non-DEBUG) but for some
// reason, no matter what I did I could not get them to function as macros again.
// I have found a *lot* of bugs in the Arduino compiler over the last few weeks,
// and I am currently assuming that one of these bugs is my problem.
// I may revisit this code at a later date and look at the assembler produced
// in a hope of finding out what is going on, but for now they will remain as
// functions even in non-DEBUG mode
//
int MATCH (int measured, int desired)
{
DBG_PRINT(F("Testing: "));
DBG_PRINT(TICKS_LOW(desired), DEC);
DBG_PRINT(F(" <= "));
DBG_PRINT(measured, DEC);
DBG_PRINT(F(" <= "));
DBG_PRINT(TICKS_HIGH(desired), DEC);
bool passed = ((measured >= TICKS_LOW(desired)) && (measured <= TICKS_HIGH(desired)));
if (passed)
DBG_PRINTLN(F("?; passed"));
else
DBG_PRINTLN(F("?; FAILED"));
return passed;
}
//+========================================================
// Due to sensor lag, when received, Marks tend to be 100us too long
//
int MATCH_MARK (int measured_ticks, int desired_us)
{
DBG_PRINT(F("Testing mark (actual vs desired): "));
DBG_PRINT(measured_ticks * USECPERTICK, DEC);
DBG_PRINT(F("us vs "));
DBG_PRINT(desired_us, DEC);
DBG_PRINT("us");
DBG_PRINT(": ");
DBG_PRINT(TICKS_LOW(desired_us + MARK_EXCESS) * USECPERTICK, DEC);
DBG_PRINT(F(" <= "));
DBG_PRINT(measured_ticks * USECPERTICK, DEC);
DBG_PRINT(F(" <= "));
DBG_PRINT(TICKS_HIGH(desired_us + MARK_EXCESS) * USECPERTICK, DEC);
bool passed = ((measured_ticks >= TICKS_LOW (desired_us + MARK_EXCESS))
&& (measured_ticks <= TICKS_HIGH(desired_us + MARK_EXCESS)));
if (passed)
DBG_PRINTLN(F("?; passed"));
else
DBG_PRINTLN(F("?; FAILED"));
return passed;
}
//+========================================================
// Due to sensor lag, when received, Spaces tend to be 100us too short
//
int MATCH_SPACE (int measured_ticks, int desired_us)
{
DBG_PRINT(F("Testing space (actual vs desired): "));
DBG_PRINT(measured_ticks * USECPERTICK, DEC);
DBG_PRINT(F("us vs "));
DBG_PRINT(desired_us, DEC);
DBG_PRINT("us");
DBG_PRINT(": ");
DBG_PRINT(TICKS_LOW(desired_us - MARK_EXCESS) * USECPERTICK, DEC);
DBG_PRINT(F(" <= "));
DBG_PRINT(measured_ticks * USECPERTICK, DEC);
DBG_PRINT(F(" <= "));
DBG_PRINT(TICKS_HIGH(desired_us - MARK_EXCESS) * USECPERTICK, DEC);
bool passed = ((measured_ticks >= TICKS_LOW (desired_us - MARK_EXCESS))
&& (measured_ticks <= TICKS_HIGH(desired_us - MARK_EXCESS)));
if (passed)
DBG_PRINTLN(F("?; passed"));
else
DBG_PRINTLN(F("?; FAILED"));
return passed;
}
//+=============================================================================
// Interrupt Service Routine - Fires every 50uS
// TIMER2 interrupt code to collect raw data.
// Widths of alternating SPACE, MARK are recorded in rawbuf.
// Recorded in ticks of 50uS [microseconds, 0.000050 seconds]
// 'rawlen' counts the number of entries recorded so far.
// First entry is the SPACE between transmissions.
// As soon as a the first [SPACE] entry gets long:
// Ready is set; State switches to IDLE; Timing of SPACE continues.
// As soon as first MARK arrives:
// Gap width is recorded; Ready is cleared; New logging starts
//
#ifdef IR_TIMER_USE_ESP32
void IRTimer()
#else
ISR (TIMER_INTR_NAME)
#endif
{
TIMER_RESET;
// Read if IR Receiver -> SPACE [xmt LED off] or a MARK [xmt LED on]
// digitalRead() is very slow. Optimisation is possible, but makes the code unportable
uint8_t irdata = (uint8_t)digitalRead(irparams.recvpin);
irparams.timer++; // One more 50uS tick
if (irparams.rawlen >= RAWBUF) irparams.rcvstate = STATE_OVERFLOW ; // Buffer overflow
switch(irparams.rcvstate) {
//......................................................................
case STATE_IDLE: // In the middle of a gap
if (irdata == MARK) {
if (irparams.timer < GAP_TICKS) { // Not big enough to be a gap.
irparams.timer = 0;
} else {
// Gap just ended; Record duration; Start recording transmission
irparams.overflow = false;
irparams.rawlen = 0;
irparams.rawbuf[irparams.rawlen++] = irparams.timer;
irparams.timer = 0;
irparams.rcvstate = STATE_MARK;
}
}
break;
//......................................................................
case STATE_MARK: // Timing Mark
if (irdata == SPACE) { // Mark ended; Record time
irparams.rawbuf[irparams.rawlen++] = irparams.timer;
irparams.timer = 0;
irparams.rcvstate = STATE_SPACE;
}
break;
//......................................................................
case STATE_SPACE: // Timing Space
if (irdata == MARK) { // Space just ended; Record time
irparams.rawbuf[irparams.rawlen++] = irparams.timer;
irparams.timer = 0;
irparams.rcvstate = STATE_MARK;
} else if (irparams.timer > GAP_TICKS) { // Space
// A long Space, indicates gap between codes
// Flag the current code as ready for processing
// Switch to STOP
// Don't reset timer; keep counting Space width
irparams.rcvstate = STATE_STOP;
}
break;
//......................................................................
case STATE_STOP: // Waiting; Measuring Gap
if (irdata == MARK) irparams.timer = 0 ; // Reset gap timer
break;
//......................................................................
case STATE_OVERFLOW: // Flag up a read overflow; Stop the State Machine
irparams.overflow = true;
irparams.rcvstate = STATE_STOP;
break;
}
// If requested, flash LED while receiving IR data
if (irparams.blinkflag) {
if (irdata == MARK)
if (irparams.blinkpin) digitalWrite(irparams.blinkpin, HIGH); // Turn user defined pin LED on
else BLINKLED_ON() ; // if no user defined LED pin, turn default LED pin for the hardware on
else if (irparams.blinkpin) digitalWrite(irparams.blinkpin, LOW); // Turn user defined pin LED on
else BLINKLED_OFF() ; // if no user defined LED pin, turn default LED pin for the hardware on
}
}

View file

@ -0,0 +1,347 @@
//******************************************************************************
// IRremote
// Version 2.0.1 June, 2015
// Copyright 2009 Ken Shirriff
// For details, see http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.html
// Edited by Mitra to add new controller SANYO
//
// Interrupt code based on NECIRrcv by Joe Knapp
// http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1210243556
// Also influenced by http://zovirl.com/2008/11/12/building-a-universal-remote-with-an-arduino/
//
// JVC and Panasonic protocol added by Kristian Lauszus (Thanks to zenwheel and other people at the original blog post)
// LG added by Darryl Smith (based on the JVC protocol)
// Whynter A/C ARC-110WD added by Francesco Meschia
//******************************************************************************
#ifndef IRremote_h
#define IRremote_h
//------------------------------------------------------------------------------
// The ISR header contains several useful macros the user may wish to use
//
#include "IRremoteInt.h"
//------------------------------------------------------------------------------
// Supported IR protocols
// Each protocol you include costs memory and, during decode, costs time
// Disable (set to 0) all the protocols you do not need/want!
//
#define DECODE_RC5 1
#define SEND_RC5 1
#define DECODE_RC6 1
#define SEND_RC6 1
#define DECODE_NEC 1
#define SEND_NEC 1
#define DECODE_SONY 1
#define SEND_SONY 1
#define DECODE_PANASONIC 1
#define SEND_PANASONIC 1
#define DECODE_JVC 1
#define SEND_JVC 1
#define DECODE_SAMSUNG 1
#define SEND_SAMSUNG 1
#define DECODE_WHYNTER 1
#define SEND_WHYNTER 1
#define DECODE_AIWA_RC_T501 1
#define SEND_AIWA_RC_T501 1
#define DECODE_LG 1
#define SEND_LG 1
#define DECODE_SANYO 1
#define SEND_SANYO 0 // NOT WRITTEN
#define DECODE_MITSUBISHI 1
#define SEND_MITSUBISHI 0 // NOT WRITTEN
#define DECODE_DISH 0 // NOT WRITTEN
#define SEND_DISH 1
#define DECODE_SHARP 0 // NOT WRITTEN
#define SEND_SHARP 1
#define DECODE_DENON 1
#define SEND_DENON 1
#define DECODE_PRONTO 0 // This function doe not logically make sense
#define SEND_PRONTO 1
#define DECODE_LEGO_PF 0 // NOT WRITTEN
#define SEND_LEGO_PF 1
//------------------------------------------------------------------------------
// When sending a Pronto code we request to send either the "once" code
// or the "repeat" code
// If the code requested does not exist we can request to fallback on the
// other code (the one we did not explicitly request)
//
// I would suggest that "fallback" will be the standard calling method
// The last paragraph on this page discusses the rationale of this idea:
// http://www.remotecentral.com/features/irdisp2.htm
//
#define PRONTO_ONCE false
#define PRONTO_REPEAT true
#define PRONTO_FALLBACK true
#define PRONTO_NOFALLBACK false
//------------------------------------------------------------------------------
// An enumerated list of all supported formats
// You do NOT need to remove entries from this list when disabling protocols!
//
typedef
enum {
UNKNOWN = -1,
UNUSED = 0,
RC5,
RC6,
NEC,
SONY,
PANASONIC,
JVC,
SAMSUNG,
WHYNTER,
AIWA_RC_T501,
LG,
SANYO,
MITSUBISHI,
DISH,
SHARP,
DENON,
PRONTO,
LEGO_PF,
}
decode_type_t;
//------------------------------------------------------------------------------
// Set DEBUG to 1 for lots of lovely debug output
//
#define DEBUG 0
//------------------------------------------------------------------------------
// Debug directives
//
#if DEBUG
# define DBG_PRINT(...) Serial.print(__VA_ARGS__)
# define DBG_PRINTLN(...) Serial.println(__VA_ARGS__)
#else
# define DBG_PRINT(...)
# define DBG_PRINTLN(...)
#endif
//------------------------------------------------------------------------------
// Mark & Space matching functions
//
int MATCH (int measured, int desired) ;
int MATCH_MARK (int measured_ticks, int desired_us) ;
int MATCH_SPACE (int measured_ticks, int desired_us) ;
//------------------------------------------------------------------------------
// Results returned from the decoder
//
class decode_results
{
public:
decode_type_t decode_type; // UNKNOWN, NEC, SONY, RC5, ...
unsigned int address; // Used by Panasonic & Sharp [16-bits]
unsigned long value; // Decoded value [max 32-bits]
int bits; // Number of bits in decoded value
volatile unsigned int *rawbuf; // Raw intervals in 50uS ticks
int rawlen; // Number of records in rawbuf
int overflow; // true iff IR raw code too long
};
//------------------------------------------------------------------------------
// Decoded value for NEC when a repeat code is received
//
#define REPEAT 0xFFFFFFFF
//------------------------------------------------------------------------------
// Main class for receiving IR
//
class IRrecv
{
public:
IRrecv () ;
IRrecv (int recvpin) ;
IRrecv (int recvpin, int blinkpin);
void blink13 (int blinkflag) ;
int decode (decode_results *results) ;
void enableIRIn ( ) ;
bool isIdle ( ) ;
void resume ( ) ;
void disableIR ( ) ;
void setRecvpin (int recvpin) ;
private:
long decodeHash (decode_results *results) ;
int compare (unsigned int oldval, unsigned int newval) ;
//......................................................................
# if (DECODE_RC5 || DECODE_RC6)
// This helper function is shared by RC5 and RC6
int getRClevel (decode_results *results, int *offset, int *used, int t1) ;
# endif
# if DECODE_RC5
bool decodeRC5 (decode_results *results) ;
# endif
# if DECODE_RC6
bool decodeRC6 (decode_results *results) ;
# endif
//......................................................................
# if DECODE_NEC
bool decodeNEC (decode_results *results) ;
# endif
//......................................................................
# if DECODE_SONY
bool decodeSony (decode_results *results) ;
# endif
//......................................................................
# if DECODE_PANASONIC
bool decodePanasonic (decode_results *results) ;
# endif
//......................................................................
# if DECODE_JVC
bool decodeJVC (decode_results *results) ;
# endif
//......................................................................
# if DECODE_SAMSUNG
bool decodeSAMSUNG (decode_results *results) ;
# endif
//......................................................................
# if DECODE_WHYNTER
bool decodeWhynter (decode_results *results) ;
# endif
//......................................................................
# if DECODE_AIWA_RC_T501
bool decodeAiwaRCT501 (decode_results *results) ;
# endif
//......................................................................
# if DECODE_LG
bool decodeLG (decode_results *results) ;
# endif
//......................................................................
# if DECODE_SANYO
bool decodeSanyo (decode_results *results) ;
# endif
//......................................................................
# if DECODE_MITSUBISHI
bool decodeMitsubishi (decode_results *results) ;
# endif
//......................................................................
# if DECODE_DISH
bool decodeDish (decode_results *results) ; // NOT WRITTEN
# endif
//......................................................................
# if DECODE_SHARP
bool decodeSharp (decode_results *results) ; // NOT WRITTEN
# endif
//......................................................................
# if DECODE_DENON
bool decodeDenon (decode_results *results) ;
# endif
//......................................................................
# if DECODE_LEGO_PF
bool decodeLegoPowerFunctions (decode_results *results) ;
# endif
} ;
//------------------------------------------------------------------------------
// Main class for sending IR
//
class IRsend
{
public:
IRsend () { }
void custom_delay_usec (unsigned long uSecs);
void enableIROut (int khz) ;
void mark (unsigned int usec) ;
void space (unsigned int usec) ;
void sendRaw (const unsigned int buf[], unsigned int len, unsigned int hz) ;
//......................................................................
# if SEND_RC5
void sendRC5 (unsigned long data, int nbits) ;
# endif
# if SEND_RC6
void sendRC6 (unsigned long data, int nbits) ;
# endif
//......................................................................
# if SEND_NEC
void sendNEC (unsigned long data, int nbits) ;
# endif
//......................................................................
# if SEND_SONY
void sendSony (unsigned long data, int nbits) ;
# endif
//......................................................................
# if SEND_PANASONIC
void sendPanasonic (unsigned int address, unsigned long data) ;
# endif
//......................................................................
# if SEND_JVC
// JVC does NOT repeat by sending a separate code (like NEC does).
// The JVC protocol repeats by skipping the header.
// To send a JVC repeat signal, send the original code value
// and set 'repeat' to true
void sendJVC (unsigned long data, int nbits, bool repeat) ;
# endif
//......................................................................
# if SEND_SAMSUNG
void sendSAMSUNG (unsigned long data, int nbits) ;
# endif
//......................................................................
# if SEND_WHYNTER
void sendWhynter (unsigned long data, int nbits) ;
# endif
//......................................................................
# if SEND_AIWA_RC_T501
void sendAiwaRCT501 (int code) ;
# endif
//......................................................................
# if SEND_LG
void sendLG (unsigned long data, int nbits) ;
# endif
//......................................................................
# if SEND_SANYO
void sendSanyo ( ) ; // NOT WRITTEN
# endif
//......................................................................
# if SEND_MISUBISHI
void sendMitsubishi ( ) ; // NOT WRITTEN
# endif
//......................................................................
# if SEND_DISH
void sendDISH (unsigned long data, int nbits) ;
# endif
//......................................................................
# if SEND_SHARP
void sendSharpRaw (unsigned long data, int nbits) ;
void sendSharp (unsigned int address, unsigned int command) ;
# endif
//......................................................................
# if SEND_DENON
void sendDenon (unsigned long data, int nbits) ;
# endif
//......................................................................
# if SEND_PRONTO
void sendPronto (char* code, bool repeat, bool fallback) ;
# endif
//......................................................................
# if SEND_LEGO_PF
void sendLegoPowerFunctions (uint16_t data, bool repeat = true) ;
# endif
} ;
#endif

View file

@ -0,0 +1,113 @@
//******************************************************************************
// IRremote
// Version 2.0.1 June, 2015
// Copyright 2009 Ken Shirriff
// For details, see http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.html
//
// Modified by Paul Stoffregen <paul@pjrc.com> to support other boards and timers
//
// Interrupt code based on NECIRrcv by Joe Knapp
// http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1210243556
// Also influenced by http://zovirl.com/2008/11/12/building-a-universal-remote-with-an-arduino/
//
// JVC and Panasonic protocol added by Kristian Lauszus (Thanks to zenwheel and other people at the original blog post)
// Whynter A/C ARC-110WD added by Francesco Meschia
//******************************************************************************
#ifndef IRremoteint_h
#define IRremoteint_h
//------------------------------------------------------------------------------
// Include the right Arduino header
//
#if defined(ARDUINO) && (ARDUINO >= 100)
# include <Arduino.h>
#else
# if !defined(IRPRONTO)
# include <WProgram.h>
# endif
#endif
//------------------------------------------------------------------------------
// This handles definition and access to global variables
//
#ifdef IR_GLOBAL
# define EXTERN
#else
# define EXTERN extern
#endif
//------------------------------------------------------------------------------
// Information for the Interrupt Service Routine
//
#define RAWBUF 101 // Maximum length of raw duration buffer
typedef
struct {
// The fields are ordered to reduce memory over caused by struct-padding
uint8_t rcvstate; // State Machine state
uint8_t recvpin; // Pin connected to IR data from detector
uint8_t blinkpin;
uint8_t blinkflag; // true -> enable blinking of pin on IR processing
uint8_t rawlen; // counter of entries in rawbuf
unsigned int timer; // State timer, counts 50uS ticks.
unsigned int rawbuf[RAWBUF]; // raw data
uint8_t overflow; // Raw buffer overflow occurred
}
irparams_t;
// ISR State-Machine : Receiver States
#define STATE_IDLE 2
#define STATE_MARK 3
#define STATE_SPACE 4
#define STATE_STOP 5
#define STATE_OVERFLOW 6
// Allow all parts of the code access to the ISR data
// NB. The data can be changed by the ISR at any time, even mid-function
// Therefore we declare it as "volatile" to stop the compiler/CPU caching it
EXTERN volatile irparams_t irparams;
//------------------------------------------------------------------------------
// Defines for setting and clearing register bits
//
#ifndef cbi
# define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
#endif
#ifndef sbi
# define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
#endif
//------------------------------------------------------------------------------
// Pulse parms are ((X*50)-100) for the Mark and ((X*50)+100) for the Space.
// First MARK is the one after the long gap
// Pulse parameters in uSec
//
// Due to sensor lag, when received, Marks tend to be 100us too long and
// Spaces tend to be 100us too short
#define MARK_EXCESS 100
// Upper and Lower percentage tolerances in measurements
#define TOLERANCE 25
#define LTOL (1.0 - (TOLERANCE/100.))
#define UTOL (1.0 + (TOLERANCE/100.))
// Minimum gap between IR transmissions
#define _GAP 5000
#define GAP_TICKS (_GAP/USECPERTICK)
#define TICKS_LOW(us) ((int)(((us)*LTOL/USECPERTICK)))
#define TICKS_HIGH(us) ((int)(((us)*UTOL/USECPERTICK + 1)))
//------------------------------------------------------------------------------
// IR detector output is active low
//
#define MARK 0
#define SPACE 1
// All board specific stuff has been moved to its own file, included here.
#include "boarddefs.h"
#endif

View file

@ -0,0 +1,205 @@
// Author: avishorp@gmail.com
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
extern "C" {
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
}
#include "TM1637.h"
#include <Arduino.h>
#define TM1637_I2C_COMM1 0x40
#define TM1637_I2C_COMM2 0xC0
#define TM1637_I2C_COMM3 0x80
//
// A
// ---
// F | | B
// -G-
// E | | C
// ---
// D
const uint8_t digitToSegment[] = {
//XGFEDCBA <- one bit for each segment above and X is the colon
0b00111111, // 0
0b00000110, // 1
0b01011011, // 2
0b01001111, // 3
0b01100110, // 4
0b01101101, // 5
0b01111101, // 6
0b00000111, // 7
0b01111111, // 8
0b01101111, // 9
0b01110111, // A
0b01111100, // b
0b00111001, // C
0b01011110, // d
0b01111001, // E
0b01110001 // F
};
//TM1637::TM1637(uint8_t pinClk, uint8_t pinDIO)
void TM1637::begin(uint8_t pinClk, uint8_t pinDIO)
{
// Copy the pin numbers
m_pinClk = pinClk;
m_pinDIO = pinDIO;
// Set the pin direction and default value.
// Both pins are set as inputs, allowing the pull-up resistors to pull them up
pinMode(m_pinClk, INPUT);
pinMode(m_pinDIO, INPUT);
digitalWrite(m_pinClk, LOW);
digitalWrite(m_pinDIO, LOW);
}
void TM1637::setBrightness(uint8_t brightness)
{
m_brightness = constrain(brightness, 0, 7) + 8;
}
void TM1637::setSegments(const uint8_t segments[], uint8_t length, uint8_t pos)
{
// Write COMM1
start();
writeByte(TM1637_I2C_COMM1);
stop();
// Write COMM2 + first digit address
start();
writeByte(TM1637_I2C_COMM2 + (pos & 0x03));
// Write the data bytes
for (uint8_t k = 0; k < length; k++)
writeByte(segments[k]);
stop();
// Write COMM3 + brightness
start();
writeByte(TM1637_I2C_COMM3 + m_brightness);
stop();
}
void TM1637::showNumberDec(int num, bool leading_zero, uint8_t length, uint8_t pos, bool colon)
{
uint8_t digits[4];
const static int divisors[] = { 1, 10, 100, 1000 };
bool leading = true;
for (int8_t k = 0; k < 4; k++) {
int divisor = divisors[4 - 1 - k];
int d = num / divisor;
if (d == 0) {
if (leading_zero || !leading || (k == 3))
digits[k] = encodeDigit(d);
else
digits[k] = 0;
}
else {
digits[k] = encodeDigit(d);
num -= d * divisor;
leading = false;
}
if (colon && k == 1) {
digits[k] |= 0x80;
}
}
setSegments(digits + (4 - length), length, pos);
}
void TM1637::bitDelay()
{
delayMicroseconds(50);
}
void TM1637::start()
{
pinMode(m_pinDIO, OUTPUT);
bitDelay();
}
void TM1637::stop()
{
pinMode(m_pinDIO, OUTPUT);
bitDelay();
pinMode(m_pinClk, INPUT);
bitDelay();
pinMode(m_pinDIO, INPUT);
bitDelay();
}
bool TM1637::writeByte(uint8_t b)
{
uint8_t data = b;
// 8 Data Bits
for (uint8_t i = 0; i < 8; i++) {
// CLK low
pinMode(m_pinClk, OUTPUT);
bitDelay();
// Set data bit
if (data & 0x01)
pinMode(m_pinDIO, INPUT);
else
pinMode(m_pinDIO, OUTPUT);
bitDelay();
// CLK high
pinMode(m_pinClk, INPUT);
bitDelay();
data = data >> 1;
}
// Wait for acknowledge
// CLK to zero
pinMode(m_pinClk, OUTPUT);
pinMode(m_pinDIO, INPUT);
bitDelay();
// CLK to high
pinMode(m_pinClk, INPUT);
bitDelay();
uint8_t ack = digitalRead(m_pinDIO);
if (ack == 0)
pinMode(m_pinDIO, OUTPUT);
bitDelay();
pinMode(m_pinClk, OUTPUT);
bitDelay();
return ack;
}
uint8_t TM1637::encodeDigit(uint8_t digit)
{
return digitToSegment[digit & 0x0f];
}
// Has this instance been initialised?
bool TM1637::ready()
{
return m_pinClk != 0;
}

View file

@ -0,0 +1,99 @@
// Author: avishorp@gmail.com
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#ifndef __TM1637__
#define __TM1637__
#include <inttypes.h>
#define SEG_A 0b00000001
#define SEG_B 0b00000010
#define SEG_C 0b00000100
#define SEG_D 0b00001000
#define SEG_E 0b00010000
#define SEG_F 0b00100000
#define SEG_G 0b01000000
class TM1637 {
public:
//! Initialize a TM1637 object, setting the clock and data pins.
//!
//! @param pinClk - The number of the digital pin connected to the clock pin of the module
//! @param pinDIO - The number of the digital pin connected to the DIO pin of the module
//TM1637(uint8_t pinClk, uint8_t pinDIO);
void begin(uint8_t pinClk, uint8_t pinDIO);
//! Sets the brightness of the display.
//!
//! The setting takes effect when a command is given to change the data being displayed.
//!
//! @param brightness A number from 0 (lowest brightness) to 7 (highest brightness)
void setBrightness(uint8_t brightness);
//! Display arbitrary data on the module
//!
//! This function receives raw segment values as input and displays them. The segment data
//! is given as a byte array, each byte corresponding to a single digit. Within each byte,
//! bit 0 is segment A, bit 1 is segment B etc.
//! The function may either set the entire display or any desirable part on its own. The first
//! digit is given by the @ref pos argument with 0 being the leftmost digit. The @ref length
//! argument is the number of digits to be set. Other digits are not affected.
//!
//! @param segments An array of size @ref length containing the raw segment values
//! @param length The number of digits to be modified
//! @param pos The position from which to start the modification (0 - leftmost, 3 - rightmost)
void setSegments(const uint8_t segments[], uint8_t length = 4, uint8_t pos = 0);
//! Displays a decimal number
//!
//! Displays the given argument as a decimal number
//!
//! @param num The number to be shown
//! @param leading_zero When true, leading zeros are displayed. Otherwise unnecessary digits are blank
//! @param length The number of digits to set. The user must ensure that the number to be shown
//! fits to the number of digits requested (for example, if two digits are to be displayed,
//! the number must be between 0 to 99)
//! @param pos The position least significant digit (0 - leftmost, 3 - rightmost)
//! @param colon When true, displays two dots between the 2nd and 3rd segments
void showNumberDec(int num, bool leading_zero = false, uint8_t length = 4, uint8_t pos = 0, bool colon = false);
//! Translate a single digit into 7 segment code
//!
//! The method accepts a number between 0 - 15 and converts it to the
//! code required to display the number on a 7 segment display.
//! Numbers between 10-15 are converted to hexadecimal digits (A-F)
//!
//! @param digit A number between 0 to 15
//! @return A code representing the 7 segment image of the digit (LSB - segment A;
//! bit 6 - segment G; bit 7 - always zero)
uint8_t encodeDigit(uint8_t digit);
bool ready();
protected:
void bitDelay();
void start();
void stop();
bool writeByte(uint8_t b);
private:
uint8_t m_pinClk;
uint8_t m_pinDIO;
uint8_t m_brightness;
};
#endif // __TM1637__

View file

@ -0,0 +1,208 @@
/*
* Interrupt and PWM utilities for 16 bit Timer1 on ATmega168/328
* Original code by Jesse Tane for http://labs.ideo.com August 2008
* Modified March 2009 by Jérôme Despatis and Jesse Tane for ATmega328 support
* Modified June 2009 by Michael Polli and Jesse Tane to fix a bug in setPeriod() which caused the timer to stop
* Modified June 2011 by Lex Talionis to add a function to read the timer
* Modified Oct 2011 by Andrew Richards to avoid certain problems:
* - Add (long) assignments and casts to TimerOne::read() to ensure calculations involving tmp, ICR1 and TCNT1 aren't truncated
* - Ensure 16 bit registers accesses are atomic - run with interrupts disabled when accessing
* - Remove global enable of interrupts (sei())- could be running within an interrupt routine)
* - Disable interrupts whilst TCTN1 == 0. Datasheet vague on this, but experiment shows that overflow interrupt
* flag gets set whilst TCNT1 == 0, resulting in a phantom interrupt. Could just set to 1, but gets inaccurate
* at very short durations
* - startBottom() added to start counter at 0 and handle all interrupt enabling.
* - start() amended to enable interrupts
* - restart() amended to point at startBottom()
* Modiied 7:26 PM Sunday, October 09, 2011 by Lex Talionis
* - renamed start() to resume() to reflect it's actual role
* - renamed startBottom() to start(). This breaks some old code that expects start to continue counting where it left off
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* See Google Code project http://code.google.com/p/arduino-timerone/ for latest
*/
#ifndef TIMERONE_cpp
#define TIMERONE_cpp
#include "TimerOne.h"
TimerOne Timer1; // preinstatiate
ISR(TIMER1_OVF_vect) // interrupt service routine that wraps a user defined function supplied by attachInterrupt
{
Timer1.isrCallback();
}
void TimerOne::initialize(long microseconds)
{
TCCR1A = 0; // clear control register A
TCCR1B = _BV(WGM13); // set mode 8: phase and frequency correct pwm, stop the timer
setPeriod(microseconds);
}
void TimerOne::setPeriod(long microseconds) // AR modified for atomic access
{
long cycles = (F_CPU / 10000) * microseconds; // the counter runs backwards after TOP, interrupt is at BOTTOM so divide microseconds by 2
if(cycles < RESOLUTION) clockSelectBits = _BV(CS10); // no prescale, full xtal
else if((cycles >>= 3) < RESOLUTION) clockSelectBits = _BV(CS11); // prescale by /8
else if((cycles >>= 3) < RESOLUTION) clockSelectBits = _BV(CS11) | _BV(CS10); // prescale by /64
else if((cycles >>= 2) < RESOLUTION) clockSelectBits = _BV(CS12); // prescale by /256
else if((cycles >>= 2) < RESOLUTION) clockSelectBits = _BV(CS12) | _BV(CS10); // prescale by /1024
else cycles = RESOLUTION - 1, clockSelectBits = _BV(CS12) | _BV(CS10); // request was out of bounds, set as maximum
oldSREG = SREG;
cli(); // Disable interrupts for 16 bit register access
ICR1 = pwmPeriod = cycles; // ICR1 is TOP in p & f correct pwm mode
SREG = oldSREG;
TCCR1B &= ~(_BV(CS10) | _BV(CS11) | _BV(CS12));
TCCR1B |= clockSelectBits; // reset clock select register, and starts the clock
}
void TimerOne::setPwmDuty(char pin, int duty)
{
unsigned long dutyCycle = pwmPeriod;
dutyCycle *= duty;
dutyCycle >>= 10;
oldSREG = SREG;
cli();
if(pin == 1 || pin == 9) OCR1A = dutyCycle;
else if(pin == 2 || pin == 10) OCR1B = dutyCycle;
SREG = oldSREG;
}
void TimerOne::pwm(char pin, int duty, long microseconds) // expects duty cycle to be 10 bit (1024)
{
if(microseconds > 0) setPeriod(microseconds);
if(pin == 1 || pin == 9) {
DDRB |= _BV(PORTB1); // sets data direction register for pwm output pin
TCCR1A |= _BV(COM1A1); // activates the output pin
}
else if(pin == 2 || pin == 10) {
DDRB |= _BV(PORTB2);
TCCR1A |= _BV(COM1B1);
}
setPwmDuty(pin, duty);
resume(); // Lex - make sure the clock is running. We don't want to restart the count, in case we are starting the second WGM
// and the first one is in the middle of a cycle
}
void TimerOne::disablePwm(char pin)
{
if(pin == 1 || pin == 9) TCCR1A &= ~_BV(COM1A1); // clear the bit that enables pwm on PB1
else if(pin == 2 || pin == 10) TCCR1A &= ~_BV(COM1B1); // clear the bit that enables pwm on PB2
}
void TimerOne::attachInterrupt(void (*isr)(), long microseconds)
{
if(microseconds > 0) setPeriod(microseconds);
isrCallback = isr; // register the user's callback with the real ISR
TIMSK1 = _BV(TOIE1); // sets the timer overflow interrupt enable bit
// AR - remove sei() - might be running with interrupts disabled (eg inside an ISR), so leave unchanged
// sei(); // ensures that interrupts are globally enabled
resume();
}
void TimerOne::detachInterrupt()
{
TIMSK1 &= ~_BV(TOIE1); // clears the timer overflow interrupt enable bit
}
void TimerOne::resume() // AR suggested
{
TCCR1B |= clockSelectBits;
}
void TimerOne::restart() // Depricated - Public interface to start at zero - Lex 10/9/2011
{
start();
}
void TimerOne::start() // AR addition, renamed by Lex to reflect it's actual role
{
unsigned int tcnt1;
TIMSK1 &= ~_BV(TOIE1); // AR added
GTCCR |= _BV(PSRSYNC); // AR added - reset prescaler (NB: shared with all 16 bit timers);
oldSREG = SREG; // AR - save status register
cli(); // AR - Disable interrupts
TCNT1 = 0;
SREG = oldSREG; // AR - Restore status register
do { // Nothing -- wait until timer moved on from zero - otherwise get a phantom interrupt
oldSREG = SREG;
cli();
tcnt1 = TCNT1;
SREG = oldSREG;
} while (tcnt1==0);
// TIFR1 = 0xff; // AR - Clear interrupt flags
// TIMSK1 = _BV(TOIE1); // sets the timer overflow interrupt enable bit
}
void TimerOne::stop()
{
TCCR1B &= ~(_BV(CS10) | _BV(CS11) | _BV(CS12)); // clears all clock selects bits
}
unsigned long TimerOne::read() //returns the value of the timer in microseconds
{ //rember! phase and freq correct mode counts up to then down again
unsigned long tmp; // AR amended to hold more than 65536 (could be nearly double this)
unsigned int tcnt1; // AR added
oldSREG= SREG;
cli();
tmp=TCNT1;
SREG = oldSREG;
char scale=0;
switch (clockSelectBits)
{
case 1:// no prescalse
scale=0;
break;
case 2:// x8 prescale
scale=3;
break;
case 3:// x64
scale=6;
break;
case 4:// x256
scale=8;
break;
case 5:// x1024
scale=10;
break;
}
do { // Nothing -- max delay here is ~1023 cycles. AR modified
oldSREG = SREG;
cli();
tcnt1 = TCNT1;
SREG = oldSREG;
} while (tcnt1==tmp); //if the timer has not ticked yet
//if we are counting down add the top value to how far we have counted down
tmp = ( (tcnt1>tmp) ? (tmp) : (long)(ICR1-tcnt1)+(long)ICR1 ); // AR amended to add casts and reuse previous TCNT1
return ((tmp*1000L)/(F_CPU /1000L))<<scale;
}
#endif

View file

@ -0,0 +1,70 @@
/*
* Interrupt and PWM utilities for 16 bit Timer1 on ATmega168/328
* Original code by Jesse Tane for http://labs.ideo.com August 2008
* Modified March 2009 by Jérôme Despatis and Jesse Tane for ATmega328 support
* Modified June 2009 by Michael Polli and Jesse Tane to fix a bug in setPeriod() which caused the timer to stop
* Modified June 2011 by Lex Talionis to add a function to read the timer
* Modified Oct 2011 by Andrew Richards to avoid certain problems:
* - Add (long) assignments and casts to TimerOne::read() to ensure calculations involving tmp, ICR1 and TCNT1 aren't truncated
* - Ensure 16 bit registers accesses are atomic - run with interrupts disabled when accessing
* - Remove global enable of interrupts (sei())- could be running within an interrupt routine)
* - Disable interrupts whilst TCTN1 == 0. Datasheet vague on this, but experiment shows that overflow interrupt
* flag gets set whilst TCNT1 == 0, resulting in a phantom interrupt. Could just set to 1, but gets inaccurate
* at very short durations
* - startBottom() added to start counter at 0 and handle all interrupt enabling.
* - start() amended to enable interrupts
* - restart() amended to point at startBottom()
* Modiied 7:26 PM Sunday, October 09, 2011 by Lex Talionis
* - renamed start() to resume() to reflect it's actual role
* - renamed startBottom() to start(). This breaks some old code that expects start to continue counting where it left off
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* See Google Code project http://code.google.com/p/arduino-timerone/ for latest
*/
#ifndef TIMERONE_h
#define TIMERONE_h
#include <avr/io.h>
#include <avr/interrupt.h>
#define RESOLUTION 65536 // Timer1 is 16 bit
class TimerOne
{
public:
// properties
unsigned int pwmPeriod;
unsigned char clockSelectBits;
char oldSREG; // To hold Status Register while ints disabled
// methods
void initialize(long microseconds=1000000);
void start();
void stop();
void restart();
void resume();
unsigned long read();
void pwm(char pin, int duty, long microseconds=-1);
void disablePwm(char pin);
void attachInterrupt(void (*isr)(), long microseconds=-1);
void detachInterrupt();
void setPeriod(long microseconds);
void setPwmDuty(char pin, int duty);
void (*isrCallback)();
};
extern TimerOne Timer1;
#endif

View file

@ -0,0 +1,595 @@
//******************************************************************************
// IRremote
// Version 2.0.1 June, 2015
// Copyright 2009 Ken Shirriff
// For details, see http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.html
// This file contains all board specific information. It was previously contained within
// IRremoteInt.h
// Modified by Paul Stoffregen <paul@pjrc.com> to support other boards and timers
//
// Interrupt code based on NECIRrcv by Joe Knapp
// http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1210243556
// Also influenced by http://zovirl.com/2008/11/12/building-a-universal-remote-with-an-arduino/
//
// JVC and Panasonic protocol added by Kristian Lauszus (Thanks to zenwheel and other people at the original blog post)
// Whynter A/C ARC-110WD added by Francesco Meschia
// Sparkfun Pro Micro support by Alastair McCormack
//******************************************************************************
#ifndef boarddefs_h
#define boarddefs_h
//------------------------------------------------------------------------------
// Defines for blinking the LED
//
#if defined(CORE_LED0_PIN)
# define BLINKLED CORE_LED0_PIN
# define BLINKLED_ON() (digitalWrite(CORE_LED0_PIN, HIGH))
# define BLINKLED_OFF() (digitalWrite(CORE_LED0_PIN, LOW))
#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
# define BLINKLED 13
# define BLINKLED_ON() (PORTB |= B10000000)
# define BLINKLED_OFF() (PORTB &= B01111111)
#elif defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644__)
# define BLINKLED 0
# define BLINKLED_ON() (PORTD |= B00000001)
# define BLINKLED_OFF() (PORTD &= B11111110)
// No system LED on ESP32, disable blinking
#elif defined(ESP32)
# define BLINKLED 255
# define BLINKLED_ON() 1
# define BLINKLED_OFF() 1
#else
# define BLINKLED 13
# define BLINKLED_ON() (PORTB |= B00100000)
# define BLINKLED_OFF() (PORTB &= B11011111)
#endif
//------------------------------------------------------------------------------
// CPU Frequency
//
#ifdef F_CPU
# define SYSCLOCK F_CPU // main Arduino clock
#else
# define SYSCLOCK 16000000 // main Arduino clock
#endif
// microseconds per clock interrupt tick
#define USECPERTICK 50
//------------------------------------------------------------------------------
// Define which timer to use
//
// Uncomment the timer you wish to use on your board.
// If you are using another library which uses timer2, you have options to
// switch IRremote to use a different timer.
//
// Sparkfun Pro Micro
#if defined(ARDUINO_AVR_PROMICRO)
//#define IR_USE_TIMER1 // tx = pin 9
#define IR_USE_TIMER3 // tx = pin 5
//#define IR_USE_TIMER4_HS // tx = pin 5
// Arduino Mega
#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
//#define IR_USE_TIMER1 // tx = pin 11
#define IR_USE_TIMER2 // tx = pin 9
//#define IR_USE_TIMER3 // tx = pin 5
//#define IR_USE_TIMER4 // tx = pin 6
//#define IR_USE_TIMER5 // tx = pin 46
// Teensy 1.0
#elif defined(__AVR_AT90USB162__)
#define IR_USE_TIMER1 // tx = pin 17
// Teensy 2.0
#elif defined(__AVR_ATmega32U4__)
//#define IR_USE_TIMER1 // tx = pin 14
//#define IR_USE_TIMER3 // tx = pin 9
#define IR_USE_TIMER4_HS // tx = pin 10
// Teensy 3.0 / Teensy 3.1
#elif defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__)
#define IR_USE_TIMER_CMT // tx = pin 5
// Teensy-LC
#elif defined(__MKL26Z64__)
#define IR_USE_TIMER_TPM1 // tx = pin 16
// Teensy++ 1.0 & 2.0
#elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)
//#define IR_USE_TIMER1 // tx = pin 25
#define IR_USE_TIMER2 // tx = pin 1
//#define IR_USE_TIMER3 // tx = pin 16
// MightyCore - ATmega1284
#elif defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)
//#define IR_USE_TIMER1 // tx = pin 13
#define IR_USE_TIMER2 // tx = pin 14
//#define IR_USE_TIMER3 // tx = pin 6
// MightyCore - ATmega164, ATmega324, ATmega644
#elif defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) \
|| defined(__AVR_ATmega324P__) || defined(__AVR_ATmega324A__) \
|| defined(__AVR_ATmega324PA__) || defined(__AVR_ATmega164A__) \
|| defined(__AVR_ATmega164P__)
//#define IR_USE_TIMER1 // tx = pin 13
#define IR_USE_TIMER2 // tx = pin 14
//MegaCore - ATmega64, ATmega128
#elif defined(__AVR_ATmega64__) || defined(__AVR_ATmega128__)
#define IR_USE_TIMER1 // tx = pin 13
// MightyCore - ATmega8535, ATmega16, ATmega32
#elif defined(__AVR_ATmega8535__) || defined(__AVR_ATmega16__) || defined(__AVR_ATmega32__)
#define IR_USE_TIMER1 // tx = pin 13
// Atmega8
#elif defined(__AVR_ATmega8__)
#define IR_USE_TIMER1 // tx = pin 9
// ATtiny84
#elif defined(__AVR_ATtiny84__)
#define IR_USE_TIMER1 // tx = pin 6
//ATtiny85
#elif defined(__AVR_ATtiny85__)
#define IR_USE_TIMER_TINY0 // tx = pin 1
#elif defined(ESP32)
#define IR_TIMER_USE_ESP32
#else
// Arduino Duemilanove, Diecimila, LilyPad, Mini, Fio, Nano, etc
// ATmega48, ATmega88, ATmega168, ATmega328
//#define IR_USE_TIMER1 // tx = pin 9
#define IR_USE_TIMER2 // tx = pin 3
#endif
//------------------------------------------------------------------------------
// Defines for Timer
//---------------------------------------------------------
// Timer2 (8 bits)
//
#if defined(IR_USE_TIMER2)
#define TIMER_RESET
#define TIMER_ENABLE_PWM (TCCR2A |= _BV(COM2B1))
#define TIMER_DISABLE_PWM (TCCR2A &= ~(_BV(COM2B1)))
#define TIMER_ENABLE_INTR (TIMSK2 = _BV(OCIE2A))
#define TIMER_DISABLE_INTR (TIMSK2 = 0)
#define TIMER_INTR_NAME TIMER2_COMPA_vect
#define TIMER_CONFIG_KHZ(val) ({ \
const uint8_t pwmval = SYSCLOCK / 2000 / (val); \
TCCR2A = _BV(WGM20); \
TCCR2B = _BV(WGM22) | _BV(CS20); \
OCR2A = pwmval; \
OCR2B = pwmval / 3; \
})
#define TIMER_COUNT_TOP (SYSCLOCK * USECPERTICK / 1000000)
//-----------------
#if (TIMER_COUNT_TOP < 256)
# define TIMER_CONFIG_NORMAL() ({ \
TCCR2A = _BV(WGM21); \
TCCR2B = _BV(CS20); \
OCR2A = TIMER_COUNT_TOP; \
TCNT2 = 0; \
})
#else
# define TIMER_CONFIG_NORMAL() ({ \
TCCR2A = _BV(WGM21); \
TCCR2B = _BV(CS21); \
OCR2A = TIMER_COUNT_TOP / 8; \
TCNT2 = 0; \
})
#endif
//-----------------
#if defined(CORE_OC2B_PIN)
# define TIMER_PWM_PIN CORE_OC2B_PIN // Teensy
#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
# define TIMER_PWM_PIN 9 // Arduino Mega
#elif defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) \
|| defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) \
|| defined(__AVR_ATmega324P__) || defined(__AVR_ATmega324A__) \
|| defined(__AVR_ATmega324PA__) || defined(__AVR_ATmega164A__) \
|| defined(__AVR_ATmega164P__)
# define TIMER_PWM_PIN 14 // MightyCore
#else
# define TIMER_PWM_PIN 3 // Arduino Duemilanove, Diecimila, LilyPad, etc
#endif // ATmega48, ATmega88, ATmega168, ATmega328
//---------------------------------------------------------
// Timer1 (16 bits)
//
#elif defined(IR_USE_TIMER1)
#define TIMER_RESET
#define TIMER_ENABLE_PWM (TCCR1A |= _BV(COM1A1))
#define TIMER_DISABLE_PWM (TCCR1A &= ~(_BV(COM1A1)))
//-----------------
#if defined(__AVR_ATmega8__) || defined(__AVR_ATmega8535__) \
|| defined(__AVR_ATmega16__) || defined(__AVR_ATmega32__) \
|| defined(__AVR_ATmega64__) || defined(__AVR_ATmega128__)
# define TIMER_ENABLE_INTR (TIMSK |= _BV(OCIE1A))
# define TIMER_DISABLE_INTR (TIMSK &= ~_BV(OCIE1A))
#else
# define TIMER_ENABLE_INTR (TIMSK1 = _BV(OCIE1A))
# define TIMER_DISABLE_INTR (TIMSK1 = 0)
#endif
//-----------------
#define TIMER_INTR_NAME TIMER1_COMPA_vect
#define TIMER_CONFIG_KHZ(val) ({ \
const uint16_t pwmval = SYSCLOCK / 2000 / (val); \
TCCR1A = _BV(WGM11); \
TCCR1B = _BV(WGM13) | _BV(CS10); \
ICR1 = pwmval; \
OCR1A = pwmval / 3; \
})
#define TIMER_CONFIG_NORMAL() ({ \
TCCR1A = 0; \
TCCR1B = _BV(WGM12) | _BV(CS10); \
OCR1A = SYSCLOCK * USECPERTICK / 1000000; \
TCNT1 = 0; \
})
//-----------------
#if defined(CORE_OC1A_PIN)
# define TIMER_PWM_PIN CORE_OC1A_PIN // Teensy
#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
# define TIMER_PWM_PIN 11 // Arduino Mega
#elif defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) \
|| defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) \
|| defined(__AVR_ATmega324P__) || defined(__AVR_ATmega324A__) \
|| defined(__AVR_ATmega324PA__) || defined(__AVR_ATmega164A__) \
|| defined(__AVR_ATmega164P__) || defined(__AVR_ATmega32__) \
|| defined(__AVR_ATmega16__) || defined(__AVR_ATmega8535__) \
|| defined(__AVR_ATmega64__) || defined(__AVR_ATmega128__)
# define TIMER_PWM_PIN 13 // MightyCore, MegaCore
#elif defined(__AVR_ATtiny84__)
# define TIMER_PWM_PIN 6
#else
# define TIMER_PWM_PIN 9 // Arduino Duemilanove, Diecimila, LilyPad, Sparkfun Pro Micro etc
#endif // ATmega48, ATmega88, ATmega168, ATmega328
//---------------------------------------------------------
// Timer3 (16 bits)
//
#elif defined(IR_USE_TIMER3)
#define TIMER_RESET
#define TIMER_ENABLE_PWM (TCCR3A |= _BV(COM3A1))
#define TIMER_DISABLE_PWM (TCCR3A &= ~(_BV(COM3A1)))
#define TIMER_ENABLE_INTR (TIMSK3 = _BV(OCIE3A))
#define TIMER_DISABLE_INTR (TIMSK3 = 0)
#define TIMER_INTR_NAME TIMER3_COMPA_vect
#define TIMER_CONFIG_KHZ(val) ({ \
const uint16_t pwmval = SYSCLOCK / 2000 / (val); \
TCCR3A = _BV(WGM31); \
TCCR3B = _BV(WGM33) | _BV(CS30); \
ICR3 = pwmval; \
OCR3A = pwmval / 3; \
})
#define TIMER_CONFIG_NORMAL() ({ \
TCCR3A = 0; \
TCCR3B = _BV(WGM32) | _BV(CS30); \
OCR3A = SYSCLOCK * USECPERTICK / 1000000; \
TCNT3 = 0; \
})
//-----------------
#if defined(CORE_OC3A_PIN)
# define TIMER_PWM_PIN CORE_OC3A_PIN // Teensy
#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(ARDUINO_AVR_PROMICRO)
# define TIMER_PWM_PIN 5 // Arduino Mega, Sparkfun Pro Micro
#elif defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__)
# define TIMER_PWM_PIN 6 // MightyCore
#else
# error "Please add OC3A pin number here\n"
#endif
//---------------------------------------------------------
// Timer4 (10 bits, high speed option)
//
#elif defined(IR_USE_TIMER4_HS)
#define TIMER_RESET
#if defined(ARDUINO_AVR_PROMICRO) // Sparkfun Pro Micro
#define TIMER_ENABLE_PWM (TCCR4A |= _BV(COM4A0)) // Use complimentary O̅C̅4̅A̅ output on pin 5
#define TIMER_DISABLE_PWM (TCCR4A &= ~(_BV(COM4A0))) // (Pro Micro does not map PC7 (32/ICP3/CLK0/OC4A)
// of ATmega32U4 )
#else
#define TIMER_ENABLE_PWM (TCCR4A |= _BV(COM4A1))
#define TIMER_DISABLE_PWM (TCCR4A &= ~(_BV(COM4A1)))
#endif
#define TIMER_ENABLE_INTR (TIMSK4 = _BV(TOIE4))
#define TIMER_DISABLE_INTR (TIMSK4 = 0)
#define TIMER_INTR_NAME TIMER4_OVF_vect
#define TIMER_CONFIG_KHZ(val) ({ \
const uint16_t pwmval = SYSCLOCK / 2000 / (val); \
TCCR4A = (1<<PWM4A); \
TCCR4B = _BV(CS40); \
TCCR4C = 0; \
TCCR4D = (1<<WGM40); \
TCCR4E = 0; \
TC4H = pwmval >> 8; \
OCR4C = pwmval; \
TC4H = (pwmval / 3) >> 8; \
OCR4A = (pwmval / 3) & 255; \
})
#define TIMER_CONFIG_NORMAL() ({ \
TCCR4A = 0; \
TCCR4B = _BV(CS40); \
TCCR4C = 0; \
TCCR4D = 0; \
TCCR4E = 0; \
TC4H = (SYSCLOCK * USECPERTICK / 1000000) >> 8; \
OCR4C = (SYSCLOCK * USECPERTICK / 1000000) & 255; \
TC4H = 0; \
TCNT4 = 0; \
})
//-----------------
#if defined(CORE_OC4A_PIN)
# define TIMER_PWM_PIN CORE_OC4A_PIN // Teensy
#elif defined(ARDUINO_AVR_PROMICRO)
# define TIMER_PWM_PIN 5 // Sparkfun Pro Micro
#elif defined(__AVR_ATmega32U4__)
# define TIMER_PWM_PIN 13 // Leonardo
#else
# error "Please add OC4A pin number here\n"
#endif
//---------------------------------------------------------
// Timer4 (16 bits)
//
#elif defined(IR_USE_TIMER4)
#define TIMER_RESET
#define TIMER_ENABLE_PWM (TCCR4A |= _BV(COM4A1))
#define TIMER_DISABLE_PWM (TCCR4A &= ~(_BV(COM4A1)))
#define TIMER_ENABLE_INTR (TIMSK4 = _BV(OCIE4A))
#define TIMER_DISABLE_INTR (TIMSK4 = 0)
#define TIMER_INTR_NAME TIMER4_COMPA_vect
#define TIMER_CONFIG_KHZ(val) ({ \
const uint16_t pwmval = SYSCLOCK / 2000 / (val); \
TCCR4A = _BV(WGM41); \
TCCR4B = _BV(WGM43) | _BV(CS40); \
ICR4 = pwmval; \
OCR4A = pwmval / 3; \
})
#define TIMER_CONFIG_NORMAL() ({ \
TCCR4A = 0; \
TCCR4B = _BV(WGM42) | _BV(CS40); \
OCR4A = SYSCLOCK * USECPERTICK / 1000000; \
TCNT4 = 0; \
})
//-----------------
#if defined(CORE_OC4A_PIN)
# define TIMER_PWM_PIN CORE_OC4A_PIN
#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
# define TIMER_PWM_PIN 6 // Arduino Mega
#else
# error "Please add OC4A pin number here\n"
#endif
//---------------------------------------------------------
// Timer5 (16 bits)
//
#elif defined(IR_USE_TIMER5)
#define TIMER_RESET
#define TIMER_ENABLE_PWM (TCCR5A |= _BV(COM5A1))
#define TIMER_DISABLE_PWM (TCCR5A &= ~(_BV(COM5A1)))
#define TIMER_ENABLE_INTR (TIMSK5 = _BV(OCIE5A))
#define TIMER_DISABLE_INTR (TIMSK5 = 0)
#define TIMER_INTR_NAME TIMER5_COMPA_vect
#define TIMER_CONFIG_KHZ(val) ({ \
const uint16_t pwmval = SYSCLOCK / 2000 / (val); \
TCCR5A = _BV(WGM51); \
TCCR5B = _BV(WGM53) | _BV(CS50); \
ICR5 = pwmval; \
OCR5A = pwmval / 3; \
})
#define TIMER_CONFIG_NORMAL() ({ \
TCCR5A = 0; \
TCCR5B = _BV(WGM52) | _BV(CS50); \
OCR5A = SYSCLOCK * USECPERTICK / 1000000; \
TCNT5 = 0; \
})
//-----------------
#if defined(CORE_OC5A_PIN)
# define TIMER_PWM_PIN CORE_OC5A_PIN
#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
# define TIMER_PWM_PIN 46 // Arduino Mega
#else
# error "Please add OC5A pin number here\n"
#endif
//---------------------------------------------------------
// Special carrier modulator timer
//
#elif defined(IR_USE_TIMER_CMT)
#define TIMER_RESET ({ \
uint8_t tmp __attribute__((unused)) = CMT_MSC; \
CMT_CMD2 = 30; \
})
#define TIMER_ENABLE_PWM do { \
CORE_PIN5_CONFIG = PORT_PCR_MUX(2) | PORT_PCR_DSE | PORT_PCR_SRE; \
} while(0)
#define TIMER_DISABLE_PWM do { \
CORE_PIN5_CONFIG = PORT_PCR_MUX(1) | PORT_PCR_DSE | PORT_PCR_SRE; \
} while(0)
#define TIMER_ENABLE_INTR NVIC_ENABLE_IRQ(IRQ_CMT)
#define TIMER_DISABLE_INTR NVIC_DISABLE_IRQ(IRQ_CMT)
#define TIMER_INTR_NAME cmt_isr
//-----------------
#ifdef ISR
# undef ISR
#endif
#define ISR(f) void f(void)
//-----------------
#define CMT_PPS_DIV ((F_BUS + 7999999) / 8000000)
#if F_BUS < 8000000
#error IRremote requires at least 8 MHz on Teensy 3.x
#endif
//-----------------
#define TIMER_CONFIG_KHZ(val) ({ \
SIM_SCGC4 |= SIM_SCGC4_CMT; \
SIM_SOPT2 |= SIM_SOPT2_PTD7PAD; \
CMT_PPS = CMT_PPS_DIV - 1; \
CMT_CGH1 = ((F_BUS / CMT_PPS_DIV / 3000) + ((val)/2)) / (val); \
CMT_CGL1 = ((F_BUS / CMT_PPS_DIV / 1500) + ((val)/2)) / (val); \
CMT_CMD1 = 0; \
CMT_CMD2 = 30; \
CMT_CMD3 = 0; \
CMT_CMD4 = 0; \
CMT_OC = 0x60; \
CMT_MSC = 0x01; \
})
#define TIMER_CONFIG_NORMAL() ({ \
SIM_SCGC4 |= SIM_SCGC4_CMT; \
CMT_PPS = CMT_PPS_DIV - 1; \
CMT_CGH1 = 1; \
CMT_CGL1 = 1; \
CMT_CMD1 = 0; \
CMT_CMD2 = 30; \
CMT_CMD3 = 0; \
CMT_CMD4 = (F_BUS / 160000 + CMT_PPS_DIV / 2) / CMT_PPS_DIV - 31; \
CMT_OC = 0; \
CMT_MSC = 0x03; \
})
#define TIMER_PWM_PIN 5
// defines for TPM1 timer on Teensy-LC
#elif defined(IR_USE_TIMER_TPM1)
#define TIMER_RESET FTM1_SC |= FTM_SC_TOF;
#define TIMER_ENABLE_PWM CORE_PIN16_CONFIG = PORT_PCR_MUX(3)|PORT_PCR_DSE|PORT_PCR_SRE
#define TIMER_DISABLE_PWM CORE_PIN16_CONFIG = PORT_PCR_MUX(1)|PORT_PCR_SRE
#define TIMER_ENABLE_INTR NVIC_ENABLE_IRQ(IRQ_FTM1)
#define TIMER_DISABLE_INTR NVIC_DISABLE_IRQ(IRQ_FTM1)
#define TIMER_INTR_NAME ftm1_isr
#ifdef ISR
#undef ISR
#endif
#define ISR(f) void f(void)
#define TIMER_CONFIG_KHZ(val) ({ \
SIM_SCGC6 |= SIM_SCGC6_TPM1; \
FTM1_SC = 0; \
FTM1_CNT = 0; \
FTM1_MOD = (F_PLL/2000) / val - 1; \
FTM1_C0V = (F_PLL/6000) / val - 1; \
FTM1_SC = FTM_SC_CLKS(1) | FTM_SC_PS(0); \
})
#define TIMER_CONFIG_NORMAL() ({ \
SIM_SCGC6 |= SIM_SCGC6_TPM1; \
FTM1_SC = 0; \
FTM1_CNT = 0; \
FTM1_MOD = (F_PLL/40000) - 1; \
FTM1_C0V = 0; \
FTM1_SC = FTM_SC_CLKS(1) | FTM_SC_PS(0) | FTM_SC_TOF | FTM_SC_TOIE; \
})
#define TIMER_PWM_PIN 16
// defines for timer_tiny0 (8 bits)
#elif defined(IR_USE_TIMER_TINY0)
#define TIMER_RESET
#define TIMER_ENABLE_PWM (TCCR0A |= _BV(COM0B1))
#define TIMER_DISABLE_PWM (TCCR0A &= ~(_BV(COM0B1)))
#define TIMER_ENABLE_INTR (TIMSK |= _BV(OCIE0A))
#define TIMER_DISABLE_INTR (TIMSK &= ~(_BV(OCIE0A)))
#define TIMER_INTR_NAME TIMER0_COMPA_vect
#define TIMER_CONFIG_KHZ(val) ({ \
const uint8_t pwmval = SYSCLOCK / 2000 / (val); \
TCCR0A = _BV(WGM00); \
TCCR0B = _BV(WGM02) | _BV(CS00); \
OCR0A = pwmval; \
OCR0B = pwmval / 3; \
})
#define TIMER_COUNT_TOP (SYSCLOCK * USECPERTICK / 1000000)
#if (TIMER_COUNT_TOP < 256)
#define TIMER_CONFIG_NORMAL() ({ \
TCCR0A = _BV(WGM01); \
TCCR0B = _BV(CS00); \
OCR0A = TIMER_COUNT_TOP; \
TCNT0 = 0; \
})
#else
#define TIMER_CONFIG_NORMAL() ({ \
TCCR0A = _BV(WGM01); \
TCCR0B = _BV(CS01); \
OCR0A = TIMER_COUNT_TOP / 8; \
TCNT0 = 0; \
})
#endif
#define TIMER_PWM_PIN 1 /* ATtiny85 */
//---------------------------------------------------------
// ESP32 (ESP8266 should likely be added here too)
//
// ESP32 has it own timer API and does not use these macros, but to avoid ifdef'ing
// them out in the common code, they are defined to no-op. This allows the code to compile
// (which it wouldn't otherwise) but irsend will not work until ESP32 specific code is written
// for that -- merlin
// As a warning, sending timing specific code from an ESP32 can be challenging if you need 100%
// reliability because the arduino code may be interrupted and cause your sent waveform to be the
// wrong length. This is specifically an issue for neopixels which require 800Khz resolution.
// IR may just work as is with the common code since it's lower frequency, but if not, the other
// way to do this on ESP32 is using the RMT built in driver like in this incomplete library below
// https://github.com/ExploreEmbedded/ESP32_RMT
#elif defined(IR_TIMER_USE_ESP32)
#define TIMER_RESET
#define TIMER_ENABLE_PWM
#define TIMER_DISABLE_PWM Serial.println("IRsend not implemented for ESP32 yet");
#define TIMER_ENABLE_INTR
#define TIMER_DISABLE_INTR
#define TIMER_INTR_NAME
//---------------------------------------------------------
// Unknown Timer
//
#else
# error "Internal code configuration error, no known IR_USE_TIMER# defined\n"
#endif
#endif // ! boarddefs_h

View file

@ -0,0 +1,862 @@
#include "ChainableLED.h"
#include "DHT.h"
#include "Grove_LED_Bar.h"
#include "TM1637.h"
#include "TimerOne.h"
#include <IRremote.h>
#include <Wire.h>
#include <YetAnotherPcInt.h>
DHT dht;
Grove_LED_Bar ledbar[6]; // 7 instances for D2-D8, however, max 4 bars, you; can't use adjacent sockets, 4 pin display
TM1637 fourdigit[6]; // 7 instances for D2-D8, however, max 4 displays, you; can't use adjacent sockets, 4 pin display
ChainableLED rgbled[6]; // 7 instances for D2-D8
IRrecv irrecv; // object to interface with the IR receiver
decode_results results; // results for the IR receiver
#define SLAVE_ADDRESS 0x04
// #define dust_sensor_read_cmd 10
// #define dust_sensor_en_cmd 14
// #define dust_sensor_dis_cmd 15
// #define dust_sensor_int_cmd 9
// #define dust_sensor_read_int_cmd 6
// #define encoder_read_cmd 11
// #define encoder_en_cmd 16
// #define encoder_dis_cmd 17
// #define flow_read_cmd 12
// #define flow_en_cmd 18
// #define flow_dis_cmd 13
#define ir_read_cmd 21
#define ir_recv_pin_cmd 22
#define ir_read_isdata 24
#define isr_set_cmd 6
#define isr_unset_cmd 9
#define isr_read_cmd 10
#define isr_clear_cmd 11
#define isr_active_cmd 12
#define encoder_read_cmd 13
#define encoder_en_cmd 14
#define encoder_dis_cmd 15
#define data_not_available 23
volatile uint8_t cmd[5];
volatile int index = 0;
volatile int flag = 0;
volatile byte b[21], float_array[4], dht_b[21];
volatile bool need_extra_loop = false;
int pin;
// for interrupt stuff
const uint8_t total_ports = 9;
enum ISR_Type {
COUNT_CHANGES, COUNT_LOW_DURATION
};
typedef struct {
volatile unsigned long period, last_update;
} Tracked_time;
typedef struct {
volatile unsigned long counted_duration, pulse_end, pulse_start;
} Pulse_counter;
volatile uint8_t pins[total_ports]; // to track the available pins (passes the address to PcInt attachInterrupt method)
volatile bool set_pcint[total_ports]; // to see which ports are being watched
volatile uint8_t func_type[total_ports]; // type of counting function - COUNT_CHANGES or COUNT_LOW_DURATION
Tracked_time tracked_time[total_ports]; // for tracking the time
Pulse_counter pulse_counter[total_ports]; // for counting pulses
volatile unsigned long change_counter[total_ports]; // for counting changes
volatile uint32_t buffer[total_ports]; // to store the calculated values for transmission
// for encoders
typedef struct {
volatile uint8_t LOW_PIN, HIGH_PIN;
volatile int32_t value;
volatile uint8_t MAX_VAL = 32;
} GroveEncoder;
GroveEncoder ge[total_ports];
volatile int run_once;
unsigned char dta[21];
int length, i;
int aRead = 0;
byte accFlag = 0, clkFlag = 0;
int8_t accv[3];
byte rgb[] = {0, 0, 0};
// all user-defined functions
void processIO();
void flushI2C();
void receiveData();
void sendData();
void detachISRPin(const uint8_t);
void isr_buffer_filler();
void isr_handler(uint8_t, bool);
void setup() {
// Start serial
Serial.begin(38400);
// Start I2C
Wire.begin(SLAVE_ADDRESS);
Wire.onReceive(receiveData);
Wire.onRequest(sendData);
// Set port 4 to output and set it to LOW
DDRD |= 0x10;
PORTD &= ~0x10;
// initialize the pins array with the ports itself
for(int i = 0; i < total_ports; i++) {
pins[i] = i;
}
Timer1.attachInterrupt(isr_buffer_filler, 1000); // Buffer maintenance.
}
void processIO() {
// Handles incoming data.
// Updates sensors.
// Sets output pins.
if (index == 4 && flag == 0) {
flag = 1;
// Digital Read
if (cmd[0] == 1)
{
b[0] = cmd[0];
b[1] = digitalRead(cmd[1]);
}
// Digital Write
else if (cmd[0] == 2)
digitalWrite(cmd[1], cmd[2]);
// Analog Read
else if (cmd[0] == 3) {
aRead = analogRead(cmd[1]);
b[0] = cmd[0];
b[1] = aRead / 256;
b[2] = aRead % 256;
}
// Set up Analog Write
else if (cmd[0] == 4)
analogWrite(cmd[1], cmd[2]);
// Set up pinMode
else if (cmd[0] == 5)
pinMode(cmd[1], cmd[2]);
// Ultrasonic Read
else if (cmd[0] == 7) {
pin = cmd[1];
pinMode(pin, OUTPUT);
digitalWrite(pin, LOW);
delayMicroseconds(2);
digitalWrite(pin, HIGH);
delayMicroseconds(5);
digitalWrite(pin, LOW);
pinMode(pin, INPUT);
// setting timeout to 75000 microseconds
// which is roughly the equivalent of time needed for the sound
// to travel 10 meters from the sensor to the target
// and backwards - where the speed of sound is 343m/s
long dur = pulseIn(pin, HIGH, 75000);
long RangeCm = dur / 29 / 2;
b[0] = cmd[0];
b[1] = RangeCm / 256;
b[2] = RangeCm % 256;
// Serial.println(b[1] * 256 + b[2]);
// Serial.println(b[1]);
// Serial.println(b[2]);
}
// Firmware version
else if (cmd[0] == 8) {
b[0] = cmd[0];
b[1] = 1;
b[2] = 4;
b[3] = 0;
}
// Grove temp and humidity sensor pro
// 40- Temperature
else if (cmd[0] == 40) {
if (run_once) {
if (cmd[2] == 0)
dht.begin(cmd[1], DHT11);
else if (cmd[2] == 1)
dht.begin(cmd[1], DHT22);
else if (cmd[2] == 2)
dht.begin(cmd[1], DHT21);
else if (cmd[2] == 3)
dht.begin(cmd[1], AM2301);
float *buffer;
buffer = dht.readTempHum();
byte *b1 = (byte *)buffer;
byte *b2 = (byte *)(buffer + 1);
dht_b[0] = cmd[0];
for (uint8_t j = 1; j < 5; j++)
dht_b[j] = b1[j - 1];
for (uint8_t j = 5; j < 9; j++)
dht_b[j] = b2[j - 5];
run_once = 0;
}
}
// Grove LED Bar
// http://www.seeedstudio.com/wiki/Grove_-_LED_Bar
// pins: data,clock,vcc,gnd
// Commands
// [50, pin, greenToRed, unused] initialise a LED Bar
// [51, pin, greenToRed, unused] setGreenToRed(bool greenToRed)
// [52, pin, level, unused] setLevel(unsigned char level)
// [53, pin, led, state] setLed(unsigned char led, bool state)
// [54, pin, led, unused] toggleLed(unsigned char led)
// [55, pin, bits 1-8, bits 9-10] setBits(unsigned int bits)
// [56, pin, unused, unused] getBits()
// Initialise
// [50, pin, orientation, unused]
else if (cmd[0] == 50) {
// clock pin is always next to the data pin
ledbar[cmd[1] - 2].begin(cmd[1] + 1, cmd[1],
cmd[2]); // clock, data, orientation
}
// Change the orientation
// Green to red, or red to green
// [51, pin, greenToRed, unused]
else if (cmd[0] == 51 && ledbar[cmd[1] - 2].ready()) {
ledbar[cmd[1] - 2].setGreenToRed(cmd[2]);
}
// Set level (0-10)
// Level 0 means all leds off
// Level 10 means all leds on
// [52, pin, level, unused]
else if (cmd[0] == 52 && ledbar[cmd[1] - 2].ready()) {
ledbar[cmd[1] - 2].setLevel(cmd[2]);
}
// Set a single led
// led (1-10)
// state (0=off, 1=on)
// [53, pin, led, state]
else if (cmd[0] == 53 && ledbar[cmd[1] - 2].ready()) {
ledbar[cmd[1] - 2].setLed(cmd[2], cmd[3]);
}
// Toggle a single led
// led (1-10)
// [54, pin, led, unused]
else if (cmd[0] == 54 && ledbar[cmd[1] - 2].ready()) {
ledbar[cmd[1] - 2].toggleLed(cmd[2]);
}
// Set the current state, one bit for each led
// 0 = 0x0 = 0b000000000000000 = all leds off
// 5 = 0x05 = 0b000000000000101 = leds 1 and 3 on, all others off
// 341 = 0x155 = 0b000000101010101 = leds 1,3,5,7,9 on, 2,4,6,8,10 off
// 1023 = 0x3ff = 0b000001111111111 = all leds on
// | |
// 10 1
// [55, pin, bits 1-8, bits 9-10]
else if (cmd[0] == 55 && ledbar[cmd[1] - 2].ready()) {
ledbar[cmd[1] - 2].setBits(cmd[2] ^ (cmd[3] << 8));
}
// Return the current state
// [56, pin, unused, unused]
else if (cmd[0] == 56 && ledbar[cmd[1] - 2].ready()) {
unsigned int state = ledbar[cmd[1] - 2].getBits();
b[0] = cmd[0];
b[1] = state & 0xFF;
b[2] = state >> 8;
}
// end Grove LED Bar
// Grove 4 Digit Display (7 segment)
// http://www.seeedstudio.com/wiki/Grove_-_4-Digit_Display
// pins: clock,data,vcc,gnd
// Commands
// [70, pin, unused, unused] initialise a 4 digit display
// [71, pin, brightness, unused] set brightness
// [72, pin, bits 1-8, bits 9-16] right aligned decimal value without
// leading zeros [73, pin, bits 1-8, bits 9-16] right aligned decimal value
// with leading zeros [74, pin, index, dec] set individual digit
// [75, pin, index, binary] set individual segment
// [76, pin, left, right] set left and right values with colon
// [77, pin, analog pin, seconds] display analog read for n seconds
// [78, pin, unused, unused] display on
// [79, pin, unused, unused] display off
// initialise a 4 digit display
// [70, pin, unused, unused]
else if (cmd[0] == 70) {
// clock pin is always next to the data pin
fourdigit[cmd[1] - 2].begin(cmd[1], cmd[1] + 1); // clock, data
}
// set brightness
// [71, pin, brightness, unused]
else if (cmd[0] == 71 && fourdigit[cmd[1] - 2].ready()) {
fourdigit[cmd[1] - 2].setBrightness(cmd[2]); // setBrightness(brightness)
}
// show right aligned decimal value without leading zeros
// [72, pin, bits 1-8, bits 9-16]
else if (cmd[0] == 72 && fourdigit[cmd[1] - 2].ready()) {
fourdigit[cmd[1] - 2].showNumberDec(
cmd[2] ^ (cmd[3] << 8), false); // showNumberDec(number, leading_zero)
}
// show right aligned decimal value with leading zeros
// [73, pin, bits 1-8, bits 9-16]
else if (cmd[0] == 73 && fourdigit[cmd[1] - 2].ready()) {
fourdigit[cmd[1] - 2].showNumberDec(
cmd[2] ^ (cmd[3] << 8), true); // showNumberDec(number, leading_zero)
}
// set individual digit
// [74, pin, index, dec]
else if (cmd[0] == 74 && fourdigit[cmd[1] - 2].ready()) {
uint8_t data[] = {};
data[0] =
fourdigit[cmd[1] - 2].encodeDigit(cmd[3]); // encodeDigit(number)
fourdigit[cmd[1] - 2].setSegments(
data, 1, cmd[2]); // setSegments(segments[], length, position)
}
// set individual segment
// [75, pin, index, binary]
else if (cmd[0] == 75 && fourdigit[cmd[1] - 2].ready()) {
// 0xFF = 0b11111111 = Colon,G,F,E,D,C,B,A
// Colon only works on 2nd segment (index 1)
// -A-
// F | | B
// -G-
// E | | C
// -D-
uint8_t data[] = {};
data[0] = cmd[3]; // byte
fourdigit[cmd[1] - 2].setSegments(
data, 1, cmd[2]); // setSegments(segments[], length, position)
}
// set left and right with colon separator
// [76, pin, left, right]
else if (cmd[0] == 76 && fourdigit[cmd[1] - 2].ready()) {
uint8_t data[] = {};
// 1st segment
data[0] =
fourdigit[cmd[1] - 2].encodeDigit(cmd[2] / 10); // encodeDigit(number)
// 2nd segment
data[1] =
fourdigit[cmd[1] - 2].encodeDigit(cmd[2] % 10); // encodeDigit(number)
// colon
data[1] |= 0x80;
// 3rd segment
data[2] =
fourdigit[cmd[1] - 2].encodeDigit(cmd[3] / 10); // encodeDigit(number)
// 4th segment
data[3] =
fourdigit[cmd[1] - 2].encodeDigit(cmd[3] % 10); // encodeDigit(number)
// send
fourdigit[cmd[1] - 2].setSegments(
data, 4, 0); // setSegments(segments[], length, position)
}
// analog read
// [77, pin, analog pin, seconds]
else if (cmd[0] == 77 && fourdigit[cmd[1] - 2].ready()) {
int pin = cmd[2];
int reads = 4 * cmd[3]; // 1000/250 * cmd[3]
// reading analog pin 4x per second
for (int i = 0; i < reads; i++) {
fourdigit[cmd[1] - 2].showNumberDec(
analogRead(pin), false); // showNumberDec(number, leading_zero)
}
}
// display on
// [78, pin, unused, unused]
else if (cmd[0] == 78 && fourdigit[cmd[1] - 2].ready()) {
uint8_t data[] = {0xFF, 0xFF, 0xFF, 0xFF};
fourdigit[cmd[1] - 2].setSegments(
data, 4, 0); // setSegments(segments[], length, position)
}
// display off
// [79, pin, unused, unused]
else if (cmd[0] == 79 && fourdigit[cmd[1] - 2].ready()) {
uint8_t data[] = {0x00, 0x00, 0x00, 0x00};
fourdigit[cmd[1] - 2].setSegments(
data, 4, 0); // setSegments(segments[], length, position)
}
// end Grove 4 Digit Display
// Grove Chainable RGB LED
// http://www.seeedstudio.com/wiki/Grove_-_Chainable_RGB_LED
// pins: ci,di,vcc,gnd and co,do,vcc,gnd
// Commands
// [90, red, green, blue] store color for later use
// [91, pin, num leds, unused] initialise a chain of leds
// [92, pin, num leds, unused] initialise a chain of leds and set
// all to a test color [93, pin, pattern, which led] set one or more
// leds to the stored color by pattern [94, pin, led offset, modulo divisor]
// set one or more leds to the stored color by modulo [95, pin, level,
// reverse] sets leds similar to a bar graph, reversible
// Store RGB color for later use
// [90, red, green, blue]
else if (cmd[0] == 90) {
rgb[0] = cmd[1];
rgb[1] = cmd[2];
rgb[2] = cmd[3];
}
// Initialise a RGB LED chain
// [91, pin, num leds, unused]
else if (cmd[0] == 91) {
rgbled[cmd[1] - 2].begin(cmd[1], cmd[1] + 1,
cmd[2]); // clock, data, num leds
}
// Test colors, repeating red green blue
// color code: 0 black (off), 1 blue, 2 green, 3 cyan, 4 red, 5 magenta, 6
// yellow, 7 white [92, pin, num leds, color code]
else if (cmd[0] == 92) {
rgbled[cmd[1] - 2].begin(cmd[1], cmd[1] + 1, cmd[2]);
// figure out which color to display, a single bit for each rgb led
byte rr = ((cmd[3] & 4) >> 2) * 255, gg = ((cmd[3] & 2) >> 1) * 255,
bb = ((cmd[3] & 1)) * 255;
// set each led to the specified color
for (int i = 0; i < cmd[2]; i++) {
rgbled[cmd[1] - 2].setColorRGB(i, rr, gg, bb);
}
}
// Set one or more leds to the stored color using pattern
// pattern: 0 = this led only, 1 all leds except this led, 2 this led and
// all leds inwards, 3 this led and all leds outwards which led: 0 = led
// closest to the GrovePi, 1 = second led counting outwards [93, pin,
// pattern, which led]
else if (cmd[0] == 93) {
if (cmd[2] == 0) {
// set an individual led to the stored color
rgbled[cmd[1] - 2].setColorRGB(cmd[3], rgb[0], rgb[1],
rgb[2]); // which led, red, green, blue
} else {
// set all leds to stored color
byte num_leds = rgbled[cmd[1] - 2].getNumLeds();
for (int i = 0; i < num_leds; i++) {
// cmd[2] == 1: set all leds other than this one to the stored color
// cmd[2] == 2: this led and all previous leds, inwards
// cmd[2] == 3: this led and all next leds, outwards
if ((cmd[2] == 1 && i != cmd[3]) || (cmd[2] == 2 && i <= cmd[3]) ||
(cmd[2] == 3 && i >= cmd[3])) {
rgbled[cmd[1] - 2].setColorRGB(
i, rgb[0], rgb[1], rgb[2]); // which led, red, green, blue
}
}
}
}
// Set one or more leds to the stored color using modulo
// led offset: 0 = led closest to the GrovePi, counting outwards
// modulo divisor: when 1 (default) sets stored color on all leds >= offset,
// when 2 sets every 2nd led >= offset and so on [94, pin, led offset,
// modulo divisor]
else if (cmd[0] == 94) {
// modulo divisor must be >= 1
if (cmd[3] < 1) {
cmd[3] = 1;
}
// get the chain length
byte num_leds = rgbled[cmd[1] - 2].getNumLeds();
// starting at the offset, step through each led and if the result of the
// modulo operator results in zero, set the stored color on the led
for (int i = cmd[2]; i < num_leds; i++) {
// use modulo to set every n led
if ((i - cmd[2]) % cmd[3] == 0) {
rgbled[cmd[1] - 2].setColorRGB(i, rgb[0], rgb[1],
rgb[2]); // which led, red, green, blue
}
}
}
// Set level (0 to num leds), counting outwards from the GrovePi, 0 = all
// off, 1 = first led, reversible to count inwards [95, pin, level, reverse]
else if (cmd[0] == 95) {
// get the chain length
byte num_leds = rgbled[cmd[1] - 2].getNumLeds();
if (cmd[3] == 0) {
// outwards
for (int i = 0; i < num_leds; i++) {
if (cmd[2] > i) {
rgbled[cmd[1] - 2].setColorRGB(
i, rgb[0], rgb[1], rgb[2]); // which led, red, green, blue
} else {
rgbled[cmd[1] - 2].setColorRGB(i, 0, 0,
0); // which led, red, green, blue
}
}
} else {
// inwards
for (int i = num_leds; i > 0; i--) {
if ((num_leds - cmd[2]) <= i) {
rgbled[cmd[1] - 2].setColorRGB(
i, rgb[0], rgb[1], rgb[2]); // which led, red, green, blue
} else {
rgbled[cmd[1] - 2].setColorRGB(i, 0, 0,
0); // which led, red, green, blue
}
}
}
} else if (cmd[0] == ir_recv_pin_cmd) {
Serial.print(cmd[1]);
irrecv.setRecvpin(cmd[1]);
irrecv.enableIRIn();
cmd[0] = 0;
} else if (cmd[0] == ir_read_cmd) {
if (irrecv.decode(&results)) {
b[0] = cmd[0];
b[1] = results.decode_type;
b[2] = results.address & 0xFF;
b[3] = results.address >> 8;
b[4] = results.value & 0xFF;
b[5] = (results.value >> 8) & 0xFF;
b[6] = (results.value >> 16) & 0xFF;
b[7] = (results.value >> 24) & 0xFF;
irrecv.resume(); // Receive the next value
} else {
b[0] = cmd[0];
b[1] = results.decode_type;
}
} else if (cmd[0] == ir_read_isdata) {
b[0] = cmd[0];
b[1] = irrecv.decode(&results);
}
} else if (cmd[0] == isr_set_cmd) {
if (run_once == 1) {
uint8_t pin = cmd[1] & 0x0f; // 1st 4 bits to determine pin (D2->D8)
const uint8_t ftype = (cmd[1] >> 4) & 0x03; // take 5th & 6th bits
const uint8_t interrupt_mode = (cmd[1] >> 6) & 0x03; // take 7th and 8th bit
const uint16_t period = (cmd[2] << 8) + cmd[3]; // get period in ms (maximum 65535 sms)
// detach pin if it's already set
if (set_pcint[pin]) {
detachISRPin(pin);
}
pinMode(pin, INPUT_PULLUP);
set_pcint[pin] = true;
func_type[pin] = ftype;
tracked_time[pin] = Tracked_time({period, 0});
if (ftype == COUNT_CHANGES) {
PcInt::attachInterrupt<uint8_t>(pin, isr_handler, (uint8_t*)&pins[pin], interrupt_mode, true);
} else if (ftype == COUNT_LOW_DURATION) {
pulse_counter[pin] = Pulse_counter({0, 0, 0});
PcInt::attachInterrupt<uint8_t>(pin, isr_handler, (uint8_t*)&pins[pin], CHANGE, false);
}
run_once = 0;
}
} else if (cmd[0] == isr_unset_cmd) {
if (run_once == 1) {
// detach pin from PCINT
const uint8_t pin = cmd[1];
detachISRPin(pin);
run_once = 0;
}
} else if (cmd[0] == isr_read_cmd) {
if (run_once == 1) {
const uint8_t pin = cmd[1]; // from pin D2->D8
const uint32_t val = buffer[pin];
b[0] = cmd[0];
b[1] = val & 0xff;
b[2] = (val >> 8) & 0xff;
b[3] = (val >> 16) & 0xff;
b[4] = (val >> 24) & 0xff;
run_once = 0;
}
} else if (cmd[0] == isr_clear_cmd) {
if (run_once == 1) {
// detach all pins from PCINT
for (int idx = 0; idx < total_ports; idx++) {
if (set_pcint[idx]) {
detachISRPin(idx);
}
}
}
} else if (cmd[0] == isr_active_cmd) {
if (run_once == 1) {
const uint8_t pin = cmd[1];
if (pin > total_ports) {
uint16_t ports = 0;
for (int idx = 0; idx < total_ports; idx++) {
ports += (set_pcint[idx] & 0x01) << idx;
}
b[0] = cmd[0];
b[1] = ports & 0xff;
b[2] = (ports >> 8) & 0xff;
} else {
b[0] = cmd[0];
b[1] = 0;
b[2] = (set_pcint[pin] & 0x01) << pin;
}
run_once = 0;
}
} else if (cmd[0] == encoder_en_cmd) {
if (run_once == 1) {
const uint8_t pin = cmd[1];
const uint8_t steps = cmd[2];
if (pin < total_ports - 1) {
// detach pin if it's already set
if (set_pcint[pin]) {
detachISRPin(pin);
detachISRPin(pin + 1);
}
ge[pin].LOW_PIN = pin;
ge[pin].HIGH_PIN = pin + 1;
ge[pin].value = 0;
ge[pin].MAX_VAL = steps;
pinMode(ge[pin].LOW_PIN, INPUT_PULLUP);
pinMode(ge[pin].HIGH_PIN, INPUT_PULLUP);
set_pcint[pin] = set_pcint[pin + 1] = true;
PcInt::attachInterrupt<GroveEncoder>(ge[pin].LOW_PIN, grove_encoder_handler, &ge[pin], FALLING, false);
PcInt::attachInterrupt<GroveEncoder>(ge[pin].HIGH_PIN, grove_encoder_handler, &ge[pin], FALLING, false);
}
run_once = 0;
}
} else if (cmd[0] == encoder_read_cmd) {
if (run_once == 1) {
const uint8_t pin = cmd[1];
const int value = ge[pin].value;
Serial.print(value);
Serial.print("\n");
b[0] = cmd[0];
b[1] = value & 0xff;
b[2] = (value >> 8) & 0xff;
b[3] = (value >> 16) & 0xff;
b[4] = (value >> 24) & 0xff;
run_once = 0;
}
} else if (cmd[0] == encoder_dis_cmd) {
if (run_once == 1) {
const uint8_t pin = cmd[1];
if (pin < total_ports - 1) {
detachISRPin(pin);
detachISRPin(pin + 1);
}
run_once = 0;
}
}
}
void loop() {
if (need_extra_loop == true) {
processIO();
need_extra_loop = false;
} else {
processIO();
}
}
void receiveData(int byteCount) {
if (!need_extra_loop) {
while (Wire.available()) {
if (Wire.available() == 4) {
flag = 0;
index = 0;
run_once = 1;
}
cmd[index++] = Wire.read();
}
need_extra_loop = true;
} else {
flushI2C();
}
}
void flushI2C() {
while (Wire.available())
Wire.read();
}
// Callback for sending data
void sendData() {
if (need_extra_loop == false) {
if (cmd[0] == 1)
Wire.write((byte *)b, 2);
if (cmd[0] == 3 || cmd[0] == 7 || cmd[0] == 56)
Wire.write((byte *)b, 3);
if (cmd[0] == 8 || cmd[0] == 20)
Wire.write((byte *)b, 4);
if (cmd[0] == 30)
Wire.write((byte *)b, 9);
if (cmd[0] == 40)
Wire.write((byte *)dht_b, 9);
if (cmd[0] == isr_read_cmd)
Wire.write((byte *)b, 5);
if (cmd[0] == isr_active_cmd)
Wire.write((byte *)b, 3);
if (cmd[0] == ir_read_cmd) {
Wire.write((byte *)b, 8);
b[0] = 0;
}
if (cmd[0] == encoder_read_cmd) {
Wire.write((byte *)b, 5);
}
if (cmd[0] == ir_read_isdata)
Wire.write((byte *)b, 2);
}
// otherwise just reply the Pi telling
// there's no data available yet
else {
Wire.write(data_not_available);
}
}
// detaching an PCINT interrupt from a given pin
void detachISRPin(const uint8_t pin) {
// detach pin from PCINT
if (set_pcint[pin]) {
PcInt::detachInterrupt(pin);
pinMode(pin, OUTPUT);
set_pcint[pin] = false;
}
}
// repeatedly called ISR to update values on each interrupt-enabled pin
void isr_buffer_filler() {
// PORTD |= 0x10;
const unsigned long current = micros() / 1000;
// iterate over all possible interrupted pins
for (int idx = 0; idx < total_ports; idx++) {
// if the pin has been attached to an interrupt
if (set_pcint[idx]) {
const unsigned long elapsed_time = current - tracked_time[idx].last_update;
// if more time than the associated period has passed
if (elapsed_time >= tracked_time[idx].period) {
// save and reset depending on the selected function
switch (func_type[idx]) {
case COUNT_CHANGES:
buffer[idx] = change_counter[idx];
change_counter[idx] = 0;
break;
case COUNT_LOW_DURATION:
buffer[idx] = pulse_counter[idx].counted_duration * tracked_time[idx].period / elapsed_time;
pulse_counter[idx].counted_duration = 0;
break;
}
// update time
tracked_time[idx].last_update = current;
}
}
}
// PORTD &= ~0x10;
}
// interrupt handler for COUNT_CHANGES & COUNT_LOW_DURATION operations
void isr_handler(uint8_t *userdata, bool newstate) {
// PORTD |= 0x10;
// const uint8_t pin = *((uint8_t*)userdata);
const uint8_t pin = *userdata;
if (func_type[pin] == COUNT_CHANGES) {
// count changes
change_counter[pin] ++;
} else if (func_type[pin] == COUNT_LOW_DURATION) {
// count duration
if (newstate == 0) {
pulse_counter[pin].pulse_start = micros();
} else {
pulse_counter[pin].pulse_end = micros();
}
const unsigned long pulse_end = pulse_counter[pin].pulse_end;
const unsigned long pulse_start = pulse_counter[pin].pulse_start;
if(pulse_end > pulse_start) {
const unsigned long duration = int((pulse_end - pulse_start) / 1000); // to get ms
pulse_counter[pin].counted_duration += duration;
pulse_counter[pin].pulse_end = 0;
}
}
// PORTD &= ~0x10;
}
// interrupt handler for grove encoders
void grove_encoder_handler(GroveEncoder *ge) {
// PORTD |= 0x10;
const uint8_t valA = digitalRead(ge->LOW_PIN);
const uint8_t valB = digitalRead(ge->HIGH_PIN);
if (valA + valB > 0 && valA + valB < 2) {
if (valA < valB) {
ge->value += 1;
} else {
ge->value -= 1;
}
}
if (ge->value < 0)
ge->value = 0;
else if (ge->value > ge->MAX_VAL)
ge->value = ge->MAX_VAL;
Serial.println(ge->LOW_PIN);
Serial.println(ge->HIGH_PIN);
// PORTD &= ~0x10;
}

View file

@ -0,0 +1,203 @@
// #include <Wire.h>
// #include "DHT.h"
// #include "Grove_LED_Bar.h"
// #include "TM1637.h"
// #include "ChainableLED.h"
// #include "Encoder.h"
// #include "TimerOne.h"
// #include "Queue.h"
//
// #define SLAVE_ADDRESS 0x04
// #define MAX_PAYLOAD 10
//
// enum Command : uint8_t {
// DIGITALREAD = 1,
// DIGITALWRITE = 2,
// ANALOGREAD = 3,
// ANALOGWRITE = 4,
// PINMODE = 5,
// ULTRASONICREAD = 7,
// VERSION = 8,
//
// DUSTSENSOR_READ = 10,
// DUSTSENSOR_EN = 14,
// DUSTSENSOR_DIS = 15,
// ENCODER_READ = 11,
// ENCODER_EN = 16,
// ENCODER_DIS = 17,
// FLOW_READ = 12,
// FLOW_EN = 18,
// FLOW_DIS = 13,
// IR_READ = 21,
// IR_SET_PIN = 22,
//
// ACC_XYZ = 20,
// RTC_GETTIME = 30,
// DHT_TEMP = 40,
//
// LEDBAR_INIT = 50,
// LEDBAR_ORIENT = 51,
// LEDBAR_LEVEL = 52,
// LEDBAR_SETTONE = 53,
// LEDBAR_TOGGLEONE = 54,
// LEDBAR_SETALL = 55,
// LEDBAR_GETALL = 56,
//
// F4DIGIT_INIT = 70,
// F4DIGIT_SET_BRIGHTNESS = 71,
// F4DIGIT_VALUE_SET = 72,
// F4DIGIT_VALUE_SET_WZEROS = 73,
// F4DIGIT_INDIVID_DIGITS = 74,
// F4DIGIT_INDIVID_LEDS = 75,
// F4DIGIT_SCORE = 76,
// F4DIGIT_ANALOGREAD_SECONDS = 77,
// F4DIGIT_ALLON = 78,
// F4DIGIT_ALLOFF = 79,
//
// STORE_COLOR = 90,
// CHAINRGB_INIT = 91,
// CHAINRGB_TEST = 92,
// CHAINRGB_SET_PATTN = 93,
// CHAINRGB_SET_MOD = 94,
// CHAINRGB_SET_LVL = 95
// };
//
// struct Request{
// uint8_t command_id;
// uint8_t no_bytes;
// uint8_t payload[MAX_PAYLOAD];
//
// Request& operator=(const Request &d)
// {
// this->command_id = d.command_id;
// this->no_bytes = d.no_bytes;
// for(uint8_t i = 0; i < this->no_bytes; i++)
// this->payload[i] = d.payload[i];
//
// return *this;
// }
// };
//
// volatile Request request, response;
// uint8_t main_counter = 0;
// volatile uint8_t receive_counter = 0, send_counter = 0;
// volatile bool busy_loop = false;
// volatile bool new_request = false;
// volatile bool new_response = false;
// bool stage_response = false;
//
// uint8_t pin;
// uint8_t value8;
// uint16_t value16;
//
// void flushI2C();
//
// void setup()
// {
// Serial.begin(38400); // start serial for output
//
// Wire.begin(SLAVE_ADDRESS);
// Wire.onReceive(receiveData);
// Wire.onRequest(sendData);
// }
//
// void loop()
// {
// if(new_request == true)
// {
// busy_loop = true;
// new_response = false;
//
// Serial.print("CID=" + String(request.command_id) + "+Bytes=" + String(request.no_bytes) + "+List=");
// main_counter = 0;
// while(main_counter < request.no_bytes)
// {
// Serial.print("" + String(request.payload[main_counter]));
// main_counter++;
// }
// Serial.println();
//
// stage_response = false;
// response.command_id = request.command_id;
// switch(request.command_id)
// {
// case DIGITALREAD:
// response.no_bytes = 1;
// response.payload[0] = digitalRead(request.payload[0]);
// stage_response = true;
// break;
// case DIGITALWRITE:
// pin = request.payload[0];
// value8 = request.payload[1];
// digitalWrite(pin, value8);
// break;
// case ANALOGREAD:
// response.no_bytes = 2;
// value16 = analogRead(request.payload[0]);
// response.payload[0] = value16 >> 8;
// response.payload[1] = value16 & 0xFF;
// stage_response = true;
// break;
// case ANALOGWRITE:
// pin = request.payload[0];
// value8 = request.payload[1];
// analogWrite(pin, value8);
// break;
// }
//
// new_request = false;
// busy_loop = false;
// new_response = stage_response;
// }
// }
//
// void receiveData(int byteCount)
// {
// // discard any incoming data if the main loop is busy
// if(busy_loop == true) flushI2C();
// else
// {
// if(byteCount >= 2)
// {
// request.command_id = Wire.read();
// request.no_bytes = Wire.read();
// byteCount -= 2;
//
// if(byteCount == request.no_bytes)
// {
// receive_counter = 0;
// while(receive_counter < byteCount)
// {
// request.payload[receive_counter] = Wire.read();
// receive_counter++;
// }
// new_request = true;
// }
// else flushI2C();
// }
// else flushI2C();
// }
// }
//
// void sendData()
// {
// if(new_response == true)
// {
// Wire.write(response.command_id);
// Wire.write(response.no_bytes);
// send_counter = 0;
// while(send_counter < response.no_bytes)
// {
// Wire.write(response.payload[send_counter]);
// send_counter++;
// }
//
// new_response = false;
// }
// }
//
// void flushI2C()
// {
// while(Wire.available())
// Wire.read();
// }

View file

@ -0,0 +1,513 @@
#define TEST 0
#if TEST
# define SEND_PRONTO 1
# define PRONTO_ONCE false
# define PRONTO_REPEAT true
# define PRONTO_FALLBACK true
# define PRONTO_NOFALLBACK false
#endif
#if SEND_PRONTO
//******************************************************************************
#if TEST
# include <stdio.h>
void enableIROut (int freq) { printf("\nFreq = %d KHz\n", freq); }
void mark (int t) { printf("+%d," , t); }
void space (int t) { printf("-%d, ", t); }
#else
# include "IRremote.h"
#endif // TEST
//+=============================================================================
// Check for a valid hex digit
//
bool ishex (char ch)
{
return ( ((ch >= '0') && (ch <= '9')) ||
((ch >= 'A') && (ch <= 'F')) ||
((ch >= 'a') && (ch <= 'f')) ) ? true : false ;
}
//+=============================================================================
// Check for a valid "blank" ... '\0' is a valid "blank"
//
bool isblank (char ch)
{
return ((ch == ' ') || (ch == '\t') || (ch == '\0')) ? true : false ;
}
//+=============================================================================
// Bypass spaces
//
bool byp (char** pcp)
{
while (isblank(**pcp)) (*pcp)++ ;
}
//+=============================================================================
// Hex-to-Byte : Decode a hex digit
// We assume the character has already been validated
//
uint8_t htob (char ch)
{
if ((ch >= '0') && (ch <= '9')) return ch - '0' ;
if ((ch >= 'A') && (ch <= 'F')) return ch - 'A' + 10 ;
if ((ch >= 'a') && (ch <= 'f')) return ch - 'a' + 10 ;
}
//+=============================================================================
// Hex-to-Word : Decode a block of 4 hex digits
// We assume the string has already been validated
// and the pointer being passed points at the start of a block of 4 hex digits
//
uint16_t htow (char* cp)
{
return ( (htob(cp[0]) << 12) | (htob(cp[1]) << 8) |
(htob(cp[2]) << 4) | (htob(cp[3]) ) ) ;
}
//+=============================================================================
//
bool sendPronto (char* s, bool repeat, bool fallback)
{
int i;
int len;
int skip;
char* cp;
uint16_t freq; // Frequency in KHz
uint8_t usec; // pronto uSec/tick
uint8_t once;
uint8_t rpt;
// Validate the string
for (cp = s; *cp; cp += 4) {
byp(&cp);
if ( !ishex(cp[0]) || !ishex(cp[1]) ||
!ishex(cp[2]) || !ishex(cp[3]) || !isblank(cp[4]) ) return false ;
}
// We will use cp to traverse the string
cp = s;
// Check mode = Oscillated/Learned
byp(&cp);
if (htow(cp) != 0000) return false;
cp += 4;
// Extract & set frequency
byp(&cp);
freq = (int)(1000000 / (htow(cp) * 0.241246)); // Rounding errors will occur, tolerance is +/- 10%
usec = (int)(((1.0 / freq) * 1000000) + 0.5); // Another rounding error, thank Cod for analogue electronics
freq /= 1000; // This will introduce a(nother) rounding error which we do not want in the usec calcualtion
cp += 4;
// Get length of "once" code
byp(&cp);
once = htow(cp);
cp += 4;
// Get length of "repeat" code
byp(&cp);
rpt = htow(cp);
cp += 4;
// Which code are we sending?
if (fallback) { // fallback on the "other" code if "this" code is not present
if (!repeat) { // requested 'once'
if (once) len = once * 2, skip = 0 ; // if once exists send it
else len = rpt * 2, skip = 0 ; // else send repeat code
} else { // requested 'repeat'
if (rpt) len = rpt * 2, skip = 0 ; // if rpt exists send it
else len = once * 2, skip = 0 ; // else send once code
}
} else { // Send what we asked for, do not fallback if the code is empty!
if (!repeat) len = once * 2, skip = 0 ; // 'once' starts at 0
else len = rpt * 2, skip = once ; // 'repeat' starts where 'once' ends
}
// Skip to start of code
for (i = 0; i < skip; i++, cp += 4) byp(&cp) ;
// Send code
enableIROut(freq);
for (i = 0; i < len; i++) {
byp(&cp);
if (i & 1) space(htow(cp) * usec);
else mark (htow(cp) * usec);
cp += 4;
}
}
//+=============================================================================
#if TEST
int main ( )
{
char prontoTest[] =
"0000 0070 0000 0032 0080 0040 0010 0010 0010 0030 " // 10
"0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 20
"0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 30
"0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 " // 40
"0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 50
"0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 " // 60
"0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 70
"0010 0010 0010 0030 0010 0010 0010 0030 0010 0010 " // 80
"0010 0010 0010 0030 0010 0010 0010 0010 0010 0030 " // 90
"0010 0010 0010 0030 0010 0010 0010 0010 0010 0030 " // 100
"0010 0030 0010 0aa6"; // 104
sendPronto(prontoTest, PRONTO_ONCE, PRONTO_FALLBACK); // once code
sendPronto(prontoTest, PRONTO_REPEAT, PRONTO_FALLBACK); // repeat code
sendPronto(prontoTest, PRONTO_ONCE, PRONTO_NOFALLBACK); // once code
sendPronto(prontoTest, PRONTO_REPEAT, PRONTO_NOFALLBACK); // repeat code
return 0;
}
#endif // TEST
#endif // SEND_PRONTO
#if 0
//******************************************************************************
// Sources:
// http://www.remotecentral.com/features/irdisp2.htm
// http://www.hifi-remote.com/wiki/index.php?title=Working_With_Pronto_Hex
//******************************************************************************
#include <stdint.h>
#include <stdio.h>
#define IRPRONTO
#include "IRremoteInt.h" // The Arduino IRremote library defines USECPERTICK
//------------------------------------------------------------------------------
// Source: https://www.google.co.uk/search?q=DENON+MASTER+IR+Hex+Command+Sheet
// -> http://assets.denon.com/documentmaster/us/denon%20master%20ir%20hex.xls
//
char prontoTest[] =
"0000 0070 0000 0032 0080 0040 0010 0010 0010 0030 " // 10
"0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 20
"0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 30
"0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 " // 40
"0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 50
"0010 0010 0010 0030 0010 0010 0010 0010 0010 0010 " // 60
"0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 " // 70
"0010 0010 0010 0030 0010 0010 0010 0030 0010 0010 " // 80
"0010 0010 0010 0030 0010 0010 0010 0010 0010 0030 " // 90
"0010 0010 0010 0030 0010 0010 0010 0010 0010 0030 " // 100
"0010 0030 0010 0aa6"; // 104
//------------------------------------------------------------------------------
// This is the longest code we can support
#define CODEMAX 200
//------------------------------------------------------------------------------
// This is the data we pull out of the pronto code
typedef
struct {
int freq; // Carrier frequency (in Hz)
int usec; // uSec per tick (based on freq)
int codeLen; // Length of code
uint16_t code[CODEMAX]; // Code in hex
int onceLen; // Length of "once" transmit
uint16_t* once; // Pointer to start within 'code'
int rptLen; // Length of "repeat" transmit
uint16_t* rpt; // Pointer to start within 'code'
}
pronto_t;
//------------------------------------------------------------------------------
// From what I have seen, the only time we go over 8-bits is the 'space'
// on the end which creates the lead-out/inter-code gap. Assuming I'm right,
// we can code this up as a special case and otherwise halve the size of our
// data!
// Ignoring the first four values (the config data) and the last value
// (the lead-out), if you find a protocol that uses values greater than 00fe
// we are going to have to revisit this code!
//
//
// So, the 0th byte will be the carrier frequency in Khz (NOT Hz)
// " 1st " " " " length of the "once" code
// " 2nd " " " " length of the "repeat" code
//
// Thereafter, odd bytes will be Mark lengths as a multiple of USECPERTICK uS
// even " " " Space " " " " " " "
//
// Any occurence of "FF" in either a Mark or a Space will indicate
// "Use the 16-bit FF value" which will also be a multiple of USECPERTICK uS
//
//
// As a point of comparison, the test code (prontoTest[]) is 520 bytes
// (yes, more than 0.5KB of our Arduino's precious 32KB) ... after conversion
// to pronto hex that goes down to ((520/5)*2) = 208 bytes ... once converted to
// our format we are down to ((208/2) -1 -1 +2) = 104 bytes
//
// In fariness this is still very memory-hungry
// ...As a rough guide:
// 10 codes cost 1K of memory (this will vary depending on the protocol).
//
// So if you're building a complex remote control, you will probably need to
// keep the codes on an external memory device (not in the Arduino sketch) and
// load them as you need them. Hmmm.
//
// This dictates that "Oscillated Pronto Codes" are probably NOT the way forward
//
// For example, prontoTest[] happens to be: A 48-bit IR code in Denon format
// So we know it starts with 80/40 (Denon header)
// and ends with 10/aa6 (Denon leadout)
// and all (48) bits in between are either 10/10 (Denon 0)
// or 10/30 (Denon 1)
// So we could easily store this data in 1-byte ("Denon")
// + 1-byte (Length=48)
// + 6-bytes (IR code)
// At 8-bytes per code, we can store 128 codes in 1KB or memory - that's a lot
// better than the 2 (two) we started off with!
//
// And serendipitously, by reducing the amount of data, our program will run
// a LOT faster!
//
// Again, I repeat, even after you have spent time converting the "Oscillated
// Pronto Codes" in to IRremote format, it will be a LOT more memory-hungry
// than using sendDenon() (or whichever) ...BUT these codes are easily
// available on the internet, so we'll support them!
//
typedef
struct {
uint16_t FF;
uint8_t code[CODEMAX];
}
irCode_t;
//------------------------------------------------------------------------------
#define DEBUGF(...) printf(__VA_ARGS__)
//+=============================================================================
// String must be block of 4 hex digits separated with blanks
//
bool validate (char* cp, int* len)
{
for (*len = 0; *cp; (*len)++, cp += 4) {
byp(&cp);
if ( !ishex(cp[0]) || !ishex(cp[1]) ||
!ishex(cp[2]) || !ishex(cp[3]) || !isblank(cp[4]) ) return false ;
}
return true;
}
//+=============================================================================
// Hex-to-Byte : Decode a hex digit
// We assume the character has already been validated
//
uint8_t htob (char ch)
{
if ((ch >= '0') && (ch <= '9')) return ch - '0' ;
if ((ch >= 'A') && (ch <= 'F')) return ch - 'A' + 10 ;
if ((ch >= 'a') && (ch <= 'f')) return ch - 'a' + 10 ;
}
//+=============================================================================
// Hex-to-Word : Decode a block of 4 hex digits
// We assume the string has already been validated
// and the pointer being passed points at the start of a block of 4 hex digits
//
uint16_t htow (char* cp)
{
return ( (htob(cp[0]) << 12) | (htob(cp[1]) << 8) |
(htob(cp[2]) << 4) | (htob(cp[3]) ) ) ;
}
//+=============================================================================
// Convert the pronto string in to data
//
bool decode (char* s, pronto_t* p, irCode_t* ir)
{
int i, len;
char* cp;
// Validate the Pronto string
if (!validate(s, &p->codeLen)) {
DEBUGF("Invalid pronto string\n");
return false ;
}
DEBUGF("Found %d hex codes\n", p->codeLen);
// Allocate memory to store the decoded string
//if (!(p->code = malloc(p->len))) {
// DEBUGF("Memory allocation failed\n");
// return false ;
//}
// Check in case our code is too long
if (p->codeLen > CODEMAX) {
DEBUGF("Code too long, edit CODEMAX and recompile\n");
return false ;
}
// Decode the string
cp = s;
for (i = 0; i < p->codeLen; i++, cp += 4) {
byp(&cp);
p->code[i] = htow(cp);
}
// Announce our findings
DEBUGF("Input: |%s|\n", s);
DEBUGF("Found: |");
for (i = 0; i < p->codeLen; i++) DEBUGF("%04x ", p->code[i]) ;
DEBUGF("|\n");
DEBUGF("Form [%04X] : ", p->code[0]);
if (p->code[0] == 0x0000) DEBUGF("Oscillated (Learned)\n");
else if (p->code[0] == 0x0100) DEBUGF("Unmodulated\n");
else DEBUGF("Unknown\n");
if (p->code[0] != 0x0000) return false ; // Can only handle Oscillated
// Calculate the carrier frequency (+/- 10%) & uSecs per pulse
// Pronto uses a crystal which generates a timeabse of 0.241246
p->freq = (int)(1000000 / (p->code[1] * 0.241246));
p->usec = (int)(((1.0 / p->freq) * 1000000) + 0.5);
ir->code[0] = p->freq / 1000;
DEBUGF("Freq [%04X] : %d Hz (%d uS/pluse) -> %d KHz\n",
p->code[1], p->freq, p->usec, ir->code[0]);
// Set the length & start pointer for the "once" code
p->onceLen = p->code[2];
p->once = &p->code[4];
ir->code[1] = p->onceLen;
DEBUGF("Once [%04X] : %d\n", p->code[2], p->onceLen);
// Set the length & start pointer for the "repeat" code
p->rptLen = p->code[3];
p->rpt = &p->code[4 + p->onceLen];
ir->code[2] = p->rptLen;
DEBUGF("Rpt [%04X] : %d\n", p->code[3], p->rptLen);
// Check everything tallies
if (1 + 1 + 1 + 1 + (p->onceLen * 2) + (p->rptLen * 2) != p->codeLen) {
DEBUGF("Bad code length\n");
return false;
}
// Convert the IR data to our new format
ir->FF = p->code[p->codeLen - 1];
len = (p->onceLen * 2) + (p->rptLen * 2);
DEBUGF("Encoded: |");
for (i = 0; i < len; i++) {
if (p->code[i+4] == ir->FF) {
ir->code[i+3] = 0xFF;
} else if (p->code[i+4] > 0xFE) {
DEBUGF("\n%04X : Mark/Space overflow\n", p->code[i+4]);
return false;
} else {
ir->code[i+3] = (p->code[i+4] * p->usec) / USECPERTICK;
}
DEBUGF("%s%d", !i ? "" : (i&1 ? "," : ", "), ir->code[i+3]);
}
DEBUGF("|\n");
ir->FF = (ir->FF * p->usec) / USECPERTICK;
DEBUGF("FF -> %d\n", ir->FF);
return true;
}
//+=============================================================================
//
void irDump (irCode_t* ir)
{
int i, len;
printf("uint8_t buttonName[%d] = {", len);
printf("%d,%d, ", (ir->FF >> 8), ir->FF & 0xFF);
printf("%d,%d,%d, ", ir->code[0], ir->code[1], ir->code[2]);
len = (ir->code[1] * 2) + (ir->code[2] * 2);
for (i = 0; i < len; i++) {
printf("%s%d", !i ? "" : (i&1 ? "," : ", "), ir->code[i+3]);
}
printf("};\n");
}
//+=============================================================================
//
int main ( )
{
pronto_t pCode;
irCode_t irCode;
decode(prontoTest, &pCode, &irCode);
irDump(&irCode);
return 0;
}
#endif //0

View file

@ -0,0 +1,258 @@
#include "IRremote.h"
#include "IRremoteInt.h"
#ifdef IR_TIMER_USE_ESP32
hw_timer_t *timer;
void IRTimer(); // defined in IRremote.cpp
#endif
//+=============================================================================
// Decodes the received IR message
// Returns 0 if no data ready, 1 if data ready.
// Results of decoding are stored in results
//
int IRrecv::decode (decode_results *results)
{
results->rawbuf = irparams.rawbuf;
results->rawlen = irparams.rawlen;
results->overflow = irparams.overflow;
if (irparams.rcvstate != STATE_STOP) return false ;
#if DECODE_NEC
DBG_PRINTLN("Attempting NEC decode");
if (decodeNEC(results)) return true ;
#endif
#if DECODE_SONY
DBG_PRINTLN("Attempting Sony decode");
if (decodeSony(results)) return true ;
#endif
#if DECODE_SANYO
DBG_PRINTLN("Attempting Sanyo decode");
if (decodeSanyo(results)) return true ;
#endif
#if DECODE_MITSUBISHI
DBG_PRINTLN("Attempting Mitsubishi decode");
if (decodeMitsubishi(results)) return true ;
#endif
#if DECODE_RC5
DBG_PRINTLN("Attempting RC5 decode");
if (decodeRC5(results)) return true ;
#endif
#if DECODE_RC6
DBG_PRINTLN("Attempting RC6 decode");
if (decodeRC6(results)) return true ;
#endif
#if DECODE_PANASONIC
DBG_PRINTLN("Attempting Panasonic decode");
if (decodePanasonic(results)) return true ;
#endif
#if DECODE_LG
DBG_PRINTLN("Attempting LG decode");
if (decodeLG(results)) return true ;
#endif
#if DECODE_JVC
DBG_PRINTLN("Attempting JVC decode");
if (decodeJVC(results)) return true ;
#endif
#if DECODE_SAMSUNG
DBG_PRINTLN("Attempting SAMSUNG decode");
if (decodeSAMSUNG(results)) return true ;
#endif
#if DECODE_WHYNTER
DBG_PRINTLN("Attempting Whynter decode");
if (decodeWhynter(results)) return true ;
#endif
#if DECODE_AIWA_RC_T501
DBG_PRINTLN("Attempting Aiwa RC-T501 decode");
if (decodeAiwaRCT501(results)) return true ;
#endif
#if DECODE_DENON
DBG_PRINTLN("Attempting Denon decode");
if (decodeDenon(results)) return true ;
#endif
#if DECODE_LEGO_PF
DBG_PRINTLN("Attempting Lego Power Functions");
if (decodeLegoPowerFunctions(results)) return true ;
#endif
// decodeHash returns a hash on any input.
// Thus, it needs to be last in the list.
// If you add any decodes, add them before this.
if (decodeHash(results)) return true ;
// Throw away and start over
resume();
return false;
}
//+=============================================================================
IRrecv::IRrecv ()
{
irparams.recvpin = 2; // set the port by default to 2
irparams.blinkflag = 0;
}
IRrecv::IRrecv (int recvpin)
{
irparams.recvpin = recvpin;
irparams.blinkflag = 0;
}
IRrecv::IRrecv (int recvpin, int blinkpin)
{
irparams.recvpin = recvpin;
irparams.blinkpin = blinkpin;
pinMode(blinkpin, OUTPUT);
irparams.blinkflag = 0;
}
//+=============================================================================
// initialization
//
void IRrecv::enableIRIn ( )
{
// Interrupt Service Routine - Fires every 50uS
#ifdef ESP32
// ESP32 has a proper API to setup timers, no weird chip macros needed
// simply call the readable API versions :)
// 3 timers, choose #1, 80 divider nanosecond precision, 1 to count up
timer = timerBegin(1, 80, 1);
timerAttachInterrupt(timer, &IRTimer, 1);
// every 50ns, autoreload = true
timerAlarmWrite(timer, 50, true);
timerAlarmEnable(timer);
#else
cli();
// Setup pulse clock timer interrupt
// Prescale /8 (16M/8 = 0.5 microseconds per tick)
// Therefore, the timer interval can range from 0.5 to 128 microseconds
// Depending on the reset value (255 to 0)
TIMER_CONFIG_NORMAL();
// Timer2 Overflow Interrupt Enable
TIMER_ENABLE_INTR;
TIMER_RESET;
sei(); // enable interrupts
#endif
// Initialize state machine variables
irparams.rcvstate = STATE_IDLE;
irparams.rawlen = 0;
// Set pin modes
pinMode(irparams.recvpin, INPUT);
}
//+=============================================================================
// Enable/disable blinking of pin 13 on IR processing
//
void IRrecv::blink13 (int blinkflag)
{
irparams.blinkflag = blinkflag;
if (blinkflag) pinMode(BLINKLED, OUTPUT) ;
}
//+=============================================================================
// Return if receiving new IR signals
//
bool IRrecv::isIdle ( )
{
return (irparams.rcvstate == STATE_IDLE || irparams.rcvstate == STATE_STOP) ? true : false;
}
//+=============================================================================
// Restart the ISR state machine
//
void IRrecv::resume ( )
{
irparams.rcvstate = STATE_IDLE;
irparams.rawlen = 0;
}
//+=============================================================================
// Shutdown the ISR
//
void IRrecv::disableIR ( )
{
#ifdef ESP32
#else
TIMER_DISABLE_INTR;
#endif
}
//+=============================================================================
// Set the receive pin for the IR sensor
//
void IRrecv::setRecvpin(int recvpin)
{
irparams.recvpin = recvpin;
}
//+=============================================================================
// hashdecode - decode an arbitrary IR code.
// Instead of decoding using a standard encoding scheme
// (e.g. Sony, NEC, RC5), the code is hashed to a 32-bit value.
//
// The algorithm: look at the sequence of MARK signals, and see if each one
// is shorter (0), the same length (1), or longer (2) than the previous.
// Do the same with the SPACE signals. Hash the resulting sequence of 0's,
// 1's, and 2's to a 32-bit value. This will give a unique value for each
// different code (probably), for most code systems.
//
// http://arcfn.com/2010/01/using-arbitrary-remotes-with-arduino.html
//
// Compare two tick values, returning 0 if newval is shorter,
// 1 if newval is equal, and 2 if newval is longer
// Use a tolerance of 20%
//
int IRrecv::compare (unsigned int oldval, unsigned int newval)
{
if (newval < oldval * .8) return 0 ;
else if (oldval < newval * .8) return 2 ;
else return 1 ;
}
//+=============================================================================
// Use FNV hash algorithm: http://isthe.com/chongo/tech/comp/fnv/#FNV-param
// Converts the raw code values into a 32-bit hash code.
// Hopefully this code is unique for each button.
// This isn't a "real" decoding, just an arbitrary value.
//
#define FNV_PRIME_32 16777619
#define FNV_BASIS_32 2166136261
long IRrecv::decodeHash (decode_results *results)
{
long hash = FNV_BASIS_32;
// Require at least 6 samples to prevent triggering on noise
if (results->rawlen < 6) return false ;
for (int i = 1; (i + 2) < results->rawlen; i++) {
int value = compare(results->rawbuf[i], results->rawbuf[i+2]);
// Add value into the hash
hash = (hash * FNV_PRIME_32) ^ value;
}
results->value = hash;
results->bits = 32;
results->decode_type = UNKNOWN;
return true;
}

View file

@ -0,0 +1,90 @@
#include "IRremote.h"
#include "IRremoteInt.h"
//+=============================================================================
void IRsend::sendRaw (const unsigned int buf[], unsigned int len, unsigned int hz)
{
// Set IR carrier frequency
enableIROut(hz);
for (unsigned int i = 0; i < len; i++) {
if (i & 1) space(buf[i]) ;
else mark (buf[i]) ;
}
space(0); // Always end with the LED off
}
//+=============================================================================
// Sends an IR mark for the specified number of microseconds.
// The mark output is modulated at the PWM frequency.
//
void IRsend::mark (unsigned int time)
{
TIMER_ENABLE_PWM; // Enable pin 3 PWM output
if (time > 0) custom_delay_usec(time);
}
//+=============================================================================
// Leave pin off for time (given in microseconds)
// Sends an IR space for the specified number of microseconds.
// A space is no output, so the PWM output is disabled.
//
void IRsend::space (unsigned int time)
{
TIMER_DISABLE_PWM; // Disable pin 3 PWM output
if (time > 0) IRsend::custom_delay_usec(time);
}
//+=============================================================================
// Enables IR output. The khz value controls the modulation frequency in kilohertz.
// The IR output will be on pin 3 (OC2B).
// This routine is designed for 36-40KHz; if you use it for other values, it's up to you
// to make sure it gives reasonable results. (Watch out for overflow / underflow / rounding.)
// TIMER2 is used in phase-correct PWM mode, with OCR2A controlling the frequency and OCR2B
// controlling the duty cycle.
// There is no prescaling, so the output frequency is 16MHz / (2 * OCR2A)
// To turn the output on and off, we leave the PWM running, but connect and disconnect the output pin.
// A few hours staring at the ATmega documentation and this will all make sense.
// See my Secrets of Arduino PWM at http://arcfn.com/2009/07/secrets-of-arduino-pwm.html for details.
//
void IRsend::enableIROut (int khz)
{
// FIXME: implement ESP32 support, see IR_TIMER_USE_ESP32 in boarddefs.h
#ifndef ESP32
// Disable the Timer2 Interrupt (which is used for receiving IR)
TIMER_DISABLE_INTR; //Timer2 Overflow Interrupt
pinMode(TIMER_PWM_PIN, OUTPUT);
digitalWrite(TIMER_PWM_PIN, LOW); // When not sending PWM, we want it low
// COM2A = 00: disconnect OC2A
// COM2B = 00: disconnect OC2B; to send signal set to 10: OC2B non-inverted
// WGM2 = 101: phase-correct PWM with OCRA as top
// CS2 = 000: no prescaling
// The top value for the timer. The modulation frequency will be SYSCLOCK / 2 / OCR2A.
TIMER_CONFIG_KHZ(khz);
#endif
}
//+=============================================================================
// Custom delay function that circumvents Arduino's delayMicroseconds limit
void IRsend::custom_delay_usec(unsigned long uSecs) {
if (uSecs > 4) {
unsigned long start = micros();
unsigned long endMicros = start + uSecs - 4;
if (endMicros < start) { // Check if overflow
while ( micros() > start ) {} // wait until overflow
}
while ( micros() < endMicros ) {} // normal wait
}
//else {
// __asm__("nop\n\t"); // must have or compiler optimizes out
//}
}

View file

@ -0,0 +1,105 @@
#include "IRremote.h"
#include "IRremoteInt.h"
//==============================================================================
// AAA IIIII W W AAA
// A A I W W A A
// AAAAA I W W W AAAAA
// A A I W W W A A
// A A IIIII WWW A A
//==============================================================================
// Based off the RC-T501 RCU
// Lirc file http://lirc.sourceforge.net/remotes/aiwa/RC-T501
#define AIWA_RC_T501_HZ 38
#define AIWA_RC_T501_BITS 15
#define AIWA_RC_T501_PRE_BITS 26
#define AIWA_RC_T501_POST_BITS 1
#define AIWA_RC_T501_SUM_BITS (AIWA_RC_T501_PRE_BITS + AIWA_RC_T501_BITS + AIWA_RC_T501_POST_BITS)
#define AIWA_RC_T501_HDR_MARK 8800
#define AIWA_RC_T501_HDR_SPACE 4500
#define AIWA_RC_T501_BIT_MARK 500
#define AIWA_RC_T501_ONE_SPACE 600
#define AIWA_RC_T501_ZERO_SPACE 1700
//+=============================================================================
#if SEND_AIWA_RC_T501
void IRsend::sendAiwaRCT501 (int code)
{
unsigned long pre = 0x0227EEC0; // 26-bits
// Set IR carrier frequency
enableIROut(AIWA_RC_T501_HZ);
// Header
mark(AIWA_RC_T501_HDR_MARK);
space(AIWA_RC_T501_HDR_SPACE);
// Send "pre" data
for (unsigned long mask = 1UL << (26 - 1); mask; mask >>= 1) {
mark(AIWA_RC_T501_BIT_MARK);
if (pre & mask) space(AIWA_RC_T501_ONE_SPACE) ;
else space(AIWA_RC_T501_ZERO_SPACE) ;
}
//-v- THIS CODE LOOKS LIKE IT MIGHT BE WRONG - CHECK!
// it only send 15bits and ignores the top bit
// then uses TOPBIT which is 0x80000000 to check the bit code
// I suspect TOPBIT should be changed to 0x00008000
// Skip first code bit
code <<= 1;
// Send code
for (int i = 0; i < 15; i++) {
mark(AIWA_RC_T501_BIT_MARK);
if (code & 0x80000000) space(AIWA_RC_T501_ONE_SPACE) ;
else space(AIWA_RC_T501_ZERO_SPACE) ;
code <<= 1;
}
//-^- THIS CODE LOOKS LIKE IT MIGHT BE WRONG - CHECK!
// POST-DATA, 1 bit, 0x0
mark(AIWA_RC_T501_BIT_MARK);
space(AIWA_RC_T501_ZERO_SPACE);
mark(AIWA_RC_T501_BIT_MARK);
space(0);
}
#endif
//+=============================================================================
#if DECODE_AIWA_RC_T501
bool IRrecv::decodeAiwaRCT501 (decode_results *results)
{
int data = 0;
int offset = 1;
// Check SIZE
if (irparams.rawlen < 2 * (AIWA_RC_T501_SUM_BITS) + 4) return false ;
// Check HDR Mark/Space
if (!MATCH_MARK (results->rawbuf[offset++], AIWA_RC_T501_HDR_MARK )) return false ;
if (!MATCH_SPACE(results->rawbuf[offset++], AIWA_RC_T501_HDR_SPACE)) return false ;
offset += 26; // skip pre-data - optional
while(offset < irparams.rawlen - 4) {
if (MATCH_MARK(results->rawbuf[offset], AIWA_RC_T501_BIT_MARK)) offset++ ;
else return false ;
// ONE & ZERO
if (MATCH_SPACE(results->rawbuf[offset], AIWA_RC_T501_ONE_SPACE)) data = (data << 1) | 1 ;
else if (MATCH_SPACE(results->rawbuf[offset], AIWA_RC_T501_ZERO_SPACE)) data = (data << 1) | 0 ;
else break ; // End of one & zero detected
offset++;
}
results->bits = (offset - 1) / 2;
if (results->bits < 42) return false ;
results->value = data;
results->decode_type = AIWA_RC_T501;
return true;
}
#endif

View file

@ -0,0 +1,94 @@
#include "IRremote.h"
#include "IRremoteInt.h"
// Reverse Engineered by looking at RAW dumps generated by IRremote
// I have since discovered that Denon publish all their IR codes:
// https://www.google.co.uk/search?q=DENON+MASTER+IR+Hex+Command+Sheet
// -> http://assets.denon.com/documentmaster/us/denon%20master%20ir%20hex.xls
// Having looked at the official Denon Pronto sheet and reverse engineered
// the timing values from it, it is obvious that Denon have a range of
// different timings and protocols ...the values here work for my AVR-3801 Amp!
//==============================================================================
// DDDD EEEEE N N OOO N N
// D D E NN N O O NN N
// D D EEE N N N O O N N N
// D D E N NN O O N NN
// DDDD EEEEE N N OOO N N
//==============================================================================
#define BITS 14 // The number of bits in the command
#define HDR_MARK 300 // The length of the Header:Mark
#define HDR_SPACE 750 // The lenght of the Header:Space
#define BIT_MARK 300 // The length of a Bit:Mark
#define ONE_SPACE 1800 // The length of a Bit:Space for 1's
#define ZERO_SPACE 750 // The length of a Bit:Space for 0's
//+=============================================================================
//
#if SEND_DENON
void IRsend::sendDenon (unsigned long data, int nbits)
{
// Set IR carrier frequency
enableIROut(38);
// Header
mark (HDR_MARK);
space(HDR_SPACE);
// Data
for (unsigned long mask = 1UL << (nbits - 1); mask; mask >>= 1) {
if (data & mask) {
mark (BIT_MARK);
space(ONE_SPACE);
} else {
mark (BIT_MARK);
space(ZERO_SPACE);
}
}
// Footer
mark(BIT_MARK);
space(0); // Always end with the LED off
}
#endif
//+=============================================================================
//
#if DECODE_DENON
bool IRrecv::decodeDenon (decode_results *results)
{
unsigned long data = 0; // Somewhere to build our code
int offset = 1; // Skip the Gap reading
// Check we have the right amount of data
if (irparams.rawlen != 1 + 2 + (2 * BITS) + 1) return false ;
// Check initial Mark+Space match
if (!MATCH_MARK (results->rawbuf[offset++], HDR_MARK )) return false ;
if (!MATCH_SPACE(results->rawbuf[offset++], HDR_SPACE)) return false ;
// Read the bits in
for (int i = 0; i < BITS; i++) {
// Each bit looks like: MARK + SPACE_1 -> 1
// or : MARK + SPACE_0 -> 0
if (!MATCH_MARK(results->rawbuf[offset++], BIT_MARK)) return false ;
// IR data is big-endian, so we shuffle it in from the right:
if (MATCH_SPACE(results->rawbuf[offset], ONE_SPACE)) data = (data << 1) | 1 ;
else if (MATCH_SPACE(results->rawbuf[offset], ZERO_SPACE)) data = (data << 1) | 0 ;
else return false ;
offset++;
}
// Success
results->bits = BITS;
results->value = data;
results->decode_type = DENON;
return true;
}
#endif

View file

@ -0,0 +1,54 @@
#include "IRremote.h"
#include "IRremoteInt.h"
//==============================================================================
// DDDD IIIII SSSS H H
// D D I S H H
// D D I SSS HHHHH
// D D I S H H
// DDDD IIIII SSSS H H
//==============================================================================
// Sharp and DISH support by Todd Treece ( http://unionbridge.org/design/ircommand )
//
// The sned function needs to be repeated 4 times
//
// Only send the last for characters of the hex.
// I.E. Use 0x1C10 instead of 0x0000000000001C10 as listed in the LIRC file.
//
// Here is the LIRC file I found that seems to match the remote codes from the
// oscilloscope:
// DISH NETWORK (echostar 301):
// http://lirc.sourceforge.net/remotes/echostar/301_501_3100_5100_58xx_59xx
#define DISH_BITS 16
#define DISH_HDR_MARK 400
#define DISH_HDR_SPACE 6100
#define DISH_BIT_MARK 400
#define DISH_ONE_SPACE 1700
#define DISH_ZERO_SPACE 2800
#define DISH_RPT_SPACE 6200
//+=============================================================================
#if SEND_DISH
void IRsend::sendDISH (unsigned long data, int nbits)
{
// Set IR carrier frequency
enableIROut(56);
mark(DISH_HDR_MARK);
space(DISH_HDR_SPACE);
for (unsigned long mask = 1UL << (nbits - 1); mask; mask >>= 1) {
if (data & mask) {
mark(DISH_BIT_MARK);
space(DISH_ONE_SPACE);
} else {
mark(DISH_BIT_MARK);
space(DISH_ZERO_SPACE);
}
}
mark(DISH_HDR_MARK); //added 26th March 2016, by AnalysIR ( https://www.AnalysIR.com )
}
#endif

View file

@ -0,0 +1,101 @@
#include "IRremote.h"
#include "IRremoteInt.h"
//==============================================================================
// JJJJJ V V CCCC
// J V V C
// J V V C
// J J V V C
// J V CCCC
//==============================================================================
#define JVC_BITS 16
#define JVC_HDR_MARK 8000
#define JVC_HDR_SPACE 4000
#define JVC_BIT_MARK 600
#define JVC_ONE_SPACE 1600
#define JVC_ZERO_SPACE 550
#define JVC_RPT_LENGTH 60000
//+=============================================================================
// JVC does NOT repeat by sending a separate code (like NEC does).
// The JVC protocol repeats by skipping the header.
// To send a JVC repeat signal, send the original code value
// and set 'repeat' to true
//
#if SEND_JVC
void IRsend::sendJVC (unsigned long data, int nbits, bool repeat)
{
// Set IR carrier frequency
enableIROut(38);
// Only send the Header if this is NOT a repeat command
if (!repeat){
mark(JVC_HDR_MARK);
space(JVC_HDR_SPACE);
}
// Data
for (unsigned long mask = 1UL << (nbits - 1); mask; mask >>= 1) {
if (data & mask) {
mark(JVC_BIT_MARK);
space(JVC_ONE_SPACE);
} else {
mark(JVC_BIT_MARK);
space(JVC_ZERO_SPACE);
}
}
// Footer
mark(JVC_BIT_MARK);
space(0); // Always end with the LED off
}
#endif
//+=============================================================================
#if DECODE_JVC
bool IRrecv::decodeJVC (decode_results *results)
{
long data = 0;
int offset = 1; // Skip first space
// Check for repeat
if ( (irparams.rawlen - 1 == 33)
&& MATCH_MARK(results->rawbuf[offset], JVC_BIT_MARK)
&& MATCH_MARK(results->rawbuf[irparams.rawlen-1], JVC_BIT_MARK)
) {
results->bits = 0;
results->value = REPEAT;
results->decode_type = JVC;
return true;
}
// Initial mark
if (!MATCH_MARK(results->rawbuf[offset++], JVC_HDR_MARK)) return false ;
if (irparams.rawlen < (2 * JVC_BITS) + 1 ) return false ;
// Initial space
if (!MATCH_SPACE(results->rawbuf[offset++], JVC_HDR_SPACE)) return false ;
for (int i = 0; i < JVC_BITS; i++) {
if (!MATCH_MARK(results->rawbuf[offset++], JVC_BIT_MARK)) return false ;
if (MATCH_SPACE(results->rawbuf[offset], JVC_ONE_SPACE)) data = (data << 1) | 1 ;
else if (MATCH_SPACE(results->rawbuf[offset], JVC_ZERO_SPACE)) data = (data << 1) | 0 ;
else return false ;
offset++;
}
// Stop bit
if (!MATCH_MARK(results->rawbuf[offset], JVC_BIT_MARK)) return false ;
// Success
results->bits = JVC_BITS;
results->value = data;
results->decode_type = JVC;
return true;
}
#endif

View file

@ -0,0 +1,80 @@
#include "IRremote.h"
#include "IRremoteInt.h"
//==============================================================================
// L GGGG
// L G
// L G GG
// L G G
// LLLLL GGG
//==============================================================================
#define LG_BITS 28
#define LG_HDR_MARK 8000
#define LG_HDR_SPACE 4000
#define LG_BIT_MARK 600
#define LG_ONE_SPACE 1600
#define LG_ZERO_SPACE 550
#define LG_RPT_LENGTH 60000
//+=============================================================================
#if DECODE_LG
bool IRrecv::decodeLG (decode_results *results)
{
long data = 0;
int offset = 1; // Skip first space
// Check we have the right amount of data
if (irparams.rawlen < (2 * LG_BITS) + 1 ) return false ;
// Initial mark/space
if (!MATCH_MARK(results->rawbuf[offset++], LG_HDR_MARK)) return false ;
if (!MATCH_SPACE(results->rawbuf[offset++], LG_HDR_SPACE)) return false ;
for (int i = 0; i < LG_BITS; i++) {
if (!MATCH_MARK(results->rawbuf[offset++], LG_BIT_MARK)) return false ;
if (MATCH_SPACE(results->rawbuf[offset], LG_ONE_SPACE)) data = (data << 1) | 1 ;
else if (MATCH_SPACE(results->rawbuf[offset], LG_ZERO_SPACE)) data = (data << 1) | 0 ;
else return false ;
offset++;
}
// Stop bit
if (!MATCH_MARK(results->rawbuf[offset], LG_BIT_MARK)) return false ;
// Success
results->bits = LG_BITS;
results->value = data;
results->decode_type = LG;
return true;
}
#endif
//+=============================================================================
#if SEND_LG
void IRsend::sendLG (unsigned long data, int nbits)
{
// Set IR carrier frequency
enableIROut(38);
// Header
mark(LG_HDR_MARK);
space(LG_HDR_SPACE);
mark(LG_BIT_MARK);
// Data
for (unsigned long mask = 1UL << (nbits - 1); mask; mask >>= 1) {
if (data & mask) {
space(LG_ONE_SPACE);
mark(LG_BIT_MARK);
} else {
space(LG_ZERO_SPACE);
mark(LG_BIT_MARK);
}
}
space(0); // Always end with the LED off
}
#endif

View file

@ -0,0 +1,46 @@
#include "IRremote.h"
#include "IRremoteInt.h"
#include "ir_Lego_PF_BitStreamEncoder.h"
//==============================================================================
// L EEEEEE EEEE OOOO
// L E E O O
// L EEEE E EEE O O
// L E E E O O LEGO Power Functions
// LLLLLL EEEEEE EEEE OOOO Copyright (c) 2016 Philipp Henkel
//==============================================================================
// Supported Devices
// LEGO® Power Functions IR Receiver 8884
//+=============================================================================
//
#if SEND_LEGO_PF
#if DEBUG
namespace {
void logFunctionParameters(uint16_t data, bool repeat) {
DBG_PRINT("sendLegoPowerFunctions(data=");
DBG_PRINT(data);
DBG_PRINT(", repeat=");
DBG_PRINTLN(repeat?"true)" : "false)");
}
} // anonymous namespace
#endif // DEBUG
void IRsend::sendLegoPowerFunctions(uint16_t data, bool repeat)
{
#if DEBUG
::logFunctionParameters(data, repeat);
#endif // DEBUG
enableIROut(38);
static LegoPfBitStreamEncoder bitStreamEncoder;
bitStreamEncoder.reset(data, repeat);
do {
mark(bitStreamEncoder.getMarkDuration());
space(bitStreamEncoder.getPauseDuration());
} while (bitStreamEncoder.next());
}
#endif // SEND_LEGO_PF

View file

@ -0,0 +1,115 @@
//==============================================================================
// L EEEEEE EEEE OOOO
// L E E O O
// L EEEE E EEE O O
// L E E E O O LEGO Power Functions
// LLLLLL EEEEEE EEEE OOOO Copyright (c) 2016, 2017 Philipp Henkel
//==============================================================================
//+=============================================================================
//
class LegoPfBitStreamEncoder {
private:
uint16_t data;
bool repeatMessage;
uint8_t messageBitIdx;
uint8_t repeatCount;
uint16_t messageLength;
public:
// HIGH data bit = IR mark + high pause
// LOW data bit = IR mark + low pause
static const uint16_t LOW_BIT_DURATION = 421;
static const uint16_t HIGH_BIT_DURATION = 711;
static const uint16_t START_BIT_DURATION = 1184;
static const uint16_t STOP_BIT_DURATION = 1184;
static const uint8_t IR_MARK_DURATION = 158;
static const uint16_t HIGH_PAUSE_DURATION = HIGH_BIT_DURATION - IR_MARK_DURATION;
static const uint16_t LOW_PAUSE_DURATION = LOW_BIT_DURATION - IR_MARK_DURATION;
static const uint16_t START_PAUSE_DURATION = START_BIT_DURATION - IR_MARK_DURATION;
static const uint16_t STOP_PAUSE_DURATION = STOP_BIT_DURATION - IR_MARK_DURATION;
static const uint8_t MESSAGE_BITS = 18;
static const uint16_t MAX_MESSAGE_LENGTH = 16000;
void reset(uint16_t data, bool repeatMessage) {
this->data = data;
this->repeatMessage = repeatMessage;
messageBitIdx = 0;
repeatCount = 0;
messageLength = getMessageLength();
}
int getChannelId() const { return 1 + ((data >> 12) & 0x3); }
uint16_t getMessageLength() const {
// Sum up all marks
uint16_t length = MESSAGE_BITS * IR_MARK_DURATION;
// Sum up all pauses
length += START_PAUSE_DURATION;
for (unsigned long mask = 1UL << 15; mask; mask >>= 1) {
if (data & mask) {
length += HIGH_PAUSE_DURATION;
} else {
length += LOW_PAUSE_DURATION;
}
}
length += STOP_PAUSE_DURATION;
return length;
}
boolean next() {
messageBitIdx++;
if (messageBitIdx >= MESSAGE_BITS) {
repeatCount++;
messageBitIdx = 0;
}
if (repeatCount >= 1 && !repeatMessage) {
return false;
} else if (repeatCount >= 5) {
return false;
} else {
return true;
}
}
uint8_t getMarkDuration() const { return IR_MARK_DURATION; }
uint32_t getPauseDuration() const {
if (messageBitIdx == 0)
return START_PAUSE_DURATION;
else if (messageBitIdx < MESSAGE_BITS - 1) {
return getDataBitPause();
} else {
return getStopPause();
}
}
private:
uint16_t getDataBitPause() const {
const int pos = MESSAGE_BITS - 2 - messageBitIdx;
const bool isHigh = data & (1 << pos);
return isHigh ? HIGH_PAUSE_DURATION : LOW_PAUSE_DURATION;
}
uint32_t getStopPause() const {
if (repeatMessage) {
return getRepeatStopPause();
} else {
return STOP_PAUSE_DURATION;
}
}
uint32_t getRepeatStopPause() const {
if (repeatCount == 0 || repeatCount == 1) {
return STOP_PAUSE_DURATION + (uint32_t)5 * MAX_MESSAGE_LENGTH - messageLength;
} else if (repeatCount == 2 || repeatCount == 3) {
return STOP_PAUSE_DURATION
+ (uint32_t)(6 + 2 * getChannelId()) * MAX_MESSAGE_LENGTH - messageLength;
} else {
return STOP_PAUSE_DURATION;
}
}
};

View file

@ -0,0 +1,85 @@
#include "IRremote.h"
#include "IRremoteInt.h"
//==============================================================================
// MMMMM IIIII TTTTT SSSS U U BBBB IIIII SSSS H H IIIII
// M M M I T S U U B B I S H H I
// M M M I T SSS U U BBBB I SSS HHHHH I
// M M I T S U U B B I S H H I
// M M IIIII T SSSS UUU BBBBB IIIII SSSS H H IIIII
//==============================================================================
// Looks like Sony except for timings, 48 chars of data and time/space different
#define MITSUBISHI_BITS 16
// Mitsubishi RM 75501
// 14200 7 41 7 42 7 42 7 17 7 17 7 18 7 41 7 18 7 17 7 17 7 18 7 41 8 17 7 17 7 18 7 17 7
// #define MITSUBISHI_HDR_MARK 250 // seen range 3500
#define MITSUBISHI_HDR_SPACE 350 // 7*50+100
#define MITSUBISHI_ONE_MARK 1950 // 41*50-100
#define MITSUBISHI_ZERO_MARK 750 // 17*50-100
// #define MITSUBISHI_DOUBLE_SPACE_USECS 800 // usually ssee 713 - not using ticks as get number wrapround
// #define MITSUBISHI_RPT_LENGTH 45000
//+=============================================================================
#if DECODE_MITSUBISHI
bool IRrecv::decodeMitsubishi (decode_results *results)
{
// Serial.print("?!? decoding Mitsubishi:");Serial.print(irparams.rawlen); Serial.print(" want "); Serial.println( 2 * MITSUBISHI_BITS + 2);
long data = 0;
if (irparams.rawlen < 2 * MITSUBISHI_BITS + 2) return false ;
int offset = 0; // Skip first space
// Initial space
#if 0
// Put this back in for debugging - note can't use #DEBUG as if Debug on we don't see the repeat cos of the delay
Serial.print("IR Gap: ");
Serial.println( results->rawbuf[offset]);
Serial.println( "test against:");
Serial.println(results->rawbuf[offset]);
#endif
#if 0
// Not seeing double keys from Mitsubishi
if (results->rawbuf[offset] < MITSUBISHI_DOUBLE_SPACE_USECS) {
// Serial.print("IR Gap found: ");
results->bits = 0;
results->value = REPEAT;
results->decode_type = MITSUBISHI;
return true;
}
#endif
offset++;
// Typical
// 14200 7 41 7 42 7 42 7 17 7 17 7 18 7 41 7 18 7 17 7 17 7 18 7 41 8 17 7 17 7 18 7 17 7
// Initial Space
if (!MATCH_MARK(results->rawbuf[offset], MITSUBISHI_HDR_SPACE)) return false ;
offset++;
while (offset + 1 < irparams.rawlen) {
if (MATCH_MARK(results->rawbuf[offset], MITSUBISHI_ONE_MARK)) data = (data << 1) | 1 ;
else if (MATCH_MARK(results->rawbuf[offset], MITSUBISHI_ZERO_MARK)) data <<= 1 ;
else return false ;
offset++;
if (!MATCH_SPACE(results->rawbuf[offset], MITSUBISHI_HDR_SPACE)) break ;
offset++;
}
// Success
results->bits = (offset - 1) / 2;
if (results->bits < MITSUBISHI_BITS) {
results->bits = 0;
return false;
}
results->value = data;
results->decode_type = MITSUBISHI;
return true;
}
#endif

View file

@ -0,0 +1,98 @@
#include "IRremote.h"
#include "IRremoteInt.h"
//==============================================================================
// N N EEEEE CCCC
// NN N E C
// N N N EEE C
// N NN E C
// N N EEEEE CCCC
//==============================================================================
#define NEC_BITS 32
#define NEC_HDR_MARK 9000
#define NEC_HDR_SPACE 4500
#define NEC_BIT_MARK 560
#define NEC_ONE_SPACE 1690
#define NEC_ZERO_SPACE 560
#define NEC_RPT_SPACE 2250
//+=============================================================================
#if SEND_NEC
void IRsend::sendNEC (unsigned long data, int nbits)
{
// Set IR carrier frequency
enableIROut(38);
// Header
mark(NEC_HDR_MARK);
space(NEC_HDR_SPACE);
// Data
for (unsigned long mask = 1UL << (nbits - 1); mask; mask >>= 1) {
if (data & mask) {
mark(NEC_BIT_MARK);
space(NEC_ONE_SPACE);
} else {
mark(NEC_BIT_MARK);
space(NEC_ZERO_SPACE);
}
}
// Footer
mark(NEC_BIT_MARK);
space(0); // Always end with the LED off
}
#endif
//+=============================================================================
// NECs have a repeat only 4 items long
//
#if DECODE_NEC
bool IRrecv::decodeNEC (decode_results *results)
{
long data = 0; // We decode in to here; Start with nothing
int offset = 1; // Index in to results; Skip first entry!?
// Check header "mark"
if (!MATCH_MARK(results->rawbuf[offset], NEC_HDR_MARK)) return false ;
offset++;
// Check for repeat
if ( (irparams.rawlen == 4)
&& MATCH_SPACE(results->rawbuf[offset ], NEC_RPT_SPACE)
&& MATCH_MARK (results->rawbuf[offset+1], NEC_BIT_MARK )
) {
results->bits = 0;
results->value = REPEAT;
results->decode_type = NEC;
return true;
}
// Check we have enough data
if (irparams.rawlen < (2 * NEC_BITS) + 4) return false ;
// Check header "space"
if (!MATCH_SPACE(results->rawbuf[offset], NEC_HDR_SPACE)) return false ;
offset++;
// Build the data
for (int i = 0; i < NEC_BITS; i++) {
// Check data "mark"
if (!MATCH_MARK(results->rawbuf[offset], NEC_BIT_MARK)) return false ;
offset++;
// Suppend this bit
if (MATCH_SPACE(results->rawbuf[offset], NEC_ONE_SPACE )) data = (data << 1) | 1 ;
else if (MATCH_SPACE(results->rawbuf[offset], NEC_ZERO_SPACE)) data = (data << 1) | 0 ;
else return false ;
offset++;
}
// Success
results->bits = NEC_BITS;
results->value = data;
results->decode_type = NEC;
return true;
}
#endif

View file

@ -0,0 +1,78 @@
#include "IRremote.h"
#include "IRremoteInt.h"
//==============================================================================
// PPPP AAA N N AAA SSSS OOO N N IIIII CCCC
// P P A A NN N A A S O O NN N I C
// PPPP AAAAA N N N AAAAA SSS O O N N N I C
// P A A N NN A A S O O N NN I C
// P A A N N A A SSSS OOO N N IIIII CCCC
//==============================================================================
#define PANASONIC_BITS 48
#define PANASONIC_HDR_MARK 3502
#define PANASONIC_HDR_SPACE 1750
#define PANASONIC_BIT_MARK 502
#define PANASONIC_ONE_SPACE 1244
#define PANASONIC_ZERO_SPACE 400
//+=============================================================================
#if SEND_PANASONIC
void IRsend::sendPanasonic (unsigned int address, unsigned long data)
{
// Set IR carrier frequency
enableIROut(35);
// Header
mark(PANASONIC_HDR_MARK);
space(PANASONIC_HDR_SPACE);
// Address
for (unsigned long mask = 1UL << (16 - 1); mask; mask >>= 1) {
mark(PANASONIC_BIT_MARK);
if (address & mask) space(PANASONIC_ONE_SPACE) ;
else space(PANASONIC_ZERO_SPACE) ;
}
// Data
for (unsigned long mask = 1UL << (32 - 1); mask; mask >>= 1) {
mark(PANASONIC_BIT_MARK);
if (data & mask) space(PANASONIC_ONE_SPACE) ;
else space(PANASONIC_ZERO_SPACE) ;
}
// Footer
mark(PANASONIC_BIT_MARK);
space(0); // Always end with the LED off
}
#endif
//+=============================================================================
#if DECODE_PANASONIC
bool IRrecv::decodePanasonic (decode_results *results)
{
unsigned long long data = 0;
int offset = 1;
if (!MATCH_MARK(results->rawbuf[offset++], PANASONIC_HDR_MARK )) return false ;
if (!MATCH_MARK(results->rawbuf[offset++], PANASONIC_HDR_SPACE)) return false ;
// decode address
for (int i = 0; i < PANASONIC_BITS; i++) {
if (!MATCH_MARK(results->rawbuf[offset++], PANASONIC_BIT_MARK)) return false ;
if (MATCH_SPACE(results->rawbuf[offset],PANASONIC_ONE_SPACE )) data = (data << 1) | 1 ;
else if (MATCH_SPACE(results->rawbuf[offset],PANASONIC_ZERO_SPACE)) data = (data << 1) | 0 ;
else return false ;
offset++;
}
results->value = (unsigned long)data;
results->address = (unsigned int)(data >> 32);
results->decode_type = PANASONIC;
results->bits = PANASONIC_BITS;
return true;
}
#endif

View file

@ -0,0 +1,207 @@
#include "IRremote.h"
#include "IRremoteInt.h"
//+=============================================================================
// Gets one undecoded level at a time from the raw buffer.
// The RC5/6 decoding is easier if the data is broken into time intervals.
// E.g. if the buffer has MARK for 2 time intervals and SPACE for 1,
// successive calls to getRClevel will return MARK, MARK, SPACE.
// offset and used are updated to keep track of the current position.
// t1 is the time interval for a single bit in microseconds.
// Returns -1 for error (measured time interval is not a multiple of t1).
//
#if (DECODE_RC5 || DECODE_RC6)
int IRrecv::getRClevel (decode_results *results, int *offset, int *used, int t1)
{
int width;
int val;
int correction;
int avail;
if (*offset >= results->rawlen) return SPACE ; // After end of recorded buffer, assume SPACE.
width = results->rawbuf[*offset];
val = ((*offset) % 2) ? MARK : SPACE;
correction = (val == MARK) ? MARK_EXCESS : - MARK_EXCESS;
if (MATCH(width, ( t1) + correction)) avail = 1 ;
else if (MATCH(width, (2*t1) + correction)) avail = 2 ;
else if (MATCH(width, (3*t1) + correction)) avail = 3 ;
else return -1 ;
(*used)++;
if (*used >= avail) {
*used = 0;
(*offset)++;
}
DBG_PRINTLN( (val == MARK) ? "MARK" : "SPACE" );
return val;
}
#endif
//==============================================================================
// RRRR CCCC 55555
// R R C 5
// RRRR C 5555
// R R C 5
// R R CCCC 5555
//
// NB: First bit must be a one (start bit)
//
#define MIN_RC5_SAMPLES 11
#define RC5_T1 889
#define RC5_RPT_LENGTH 46000
//+=============================================================================
#if SEND_RC5
void IRsend::sendRC5 (unsigned long data, int nbits)
{
// Set IR carrier frequency
enableIROut(36);
// Start
mark(RC5_T1);
space(RC5_T1);
mark(RC5_T1);
// Data
for (unsigned long mask = 1UL << (nbits - 1); mask; mask >>= 1) {
if (data & mask) {
space(RC5_T1); // 1 is space, then mark
mark(RC5_T1);
} else {
mark(RC5_T1);
space(RC5_T1);
}
}
space(0); // Always end with the LED off
}
#endif
//+=============================================================================
#if DECODE_RC5
bool IRrecv::decodeRC5 (decode_results *results)
{
int nbits;
long data = 0;
int used = 0;
int offset = 1; // Skip gap space
if (irparams.rawlen < MIN_RC5_SAMPLES + 2) return false ;
// Get start bits
if (getRClevel(results, &offset, &used, RC5_T1) != MARK) return false ;
if (getRClevel(results, &offset, &used, RC5_T1) != SPACE) return false ;
if (getRClevel(results, &offset, &used, RC5_T1) != MARK) return false ;
for (nbits = 0; offset < irparams.rawlen; nbits++) {
int levelA = getRClevel(results, &offset, &used, RC5_T1);
int levelB = getRClevel(results, &offset, &used, RC5_T1);
if ((levelA == SPACE) && (levelB == MARK )) data = (data << 1) | 1 ;
else if ((levelA == MARK ) && (levelB == SPACE)) data = (data << 1) | 0 ;
else return false ;
}
// Success
results->bits = nbits;
results->value = data;
results->decode_type = RC5;
return true;
}
#endif
//+=============================================================================
// RRRR CCCC 6666
// R R C 6
// RRRR C 6666
// R R C 6 6
// R R CCCC 666
//
// NB : Caller needs to take care of flipping the toggle bit
//
#define MIN_RC6_SAMPLES 1
#define RC6_HDR_MARK 2666
#define RC6_HDR_SPACE 889
#define RC6_T1 444
#define RC6_RPT_LENGTH 46000
#if SEND_RC6
void IRsend::sendRC6 (unsigned long data, int nbits)
{
// Set IR carrier frequency
enableIROut(36);
// Header
mark(RC6_HDR_MARK);
space(RC6_HDR_SPACE);
// Start bit
mark(RC6_T1);
space(RC6_T1);
// Data
for (unsigned long i = 1, mask = 1UL << (nbits - 1); mask; i++, mask >>= 1) {
// The fourth bit we send is a "double width trailer bit"
int t = (i == 4) ? (RC6_T1 * 2) : (RC6_T1) ;
if (data & mask) {
mark(t);
space(t);
} else {
space(t);
mark(t);
}
}
space(0); // Always end with the LED off
}
#endif
//+=============================================================================
#if DECODE_RC6
bool IRrecv::decodeRC6 (decode_results *results)
{
int nbits;
long data = 0;
int used = 0;
int offset = 1; // Skip first space
if (results->rawlen < MIN_RC6_SAMPLES) return false ;
// Initial mark
if (!MATCH_MARK(results->rawbuf[offset++], RC6_HDR_MARK)) return false ;
if (!MATCH_SPACE(results->rawbuf[offset++], RC6_HDR_SPACE)) return false ;
// Get start bit (1)
if (getRClevel(results, &offset, &used, RC6_T1) != MARK) return false ;
if (getRClevel(results, &offset, &used, RC6_T1) != SPACE) return false ;
for (nbits = 0; offset < results->rawlen; nbits++) {
int levelA, levelB; // Next two levels
levelA = getRClevel(results, &offset, &used, RC6_T1);
if (nbits == 3) {
// T bit is double wide; make sure second half matches
if (levelA != getRClevel(results, &offset, &used, RC6_T1)) return false;
}
levelB = getRClevel(results, &offset, &used, RC6_T1);
if (nbits == 3) {
// T bit is double wide; make sure second half matches
if (levelB != getRClevel(results, &offset, &used, RC6_T1)) return false;
}
if ((levelA == MARK ) && (levelB == SPACE)) data = (data << 1) | 1 ; // inverted compared to RC5
else if ((levelA == SPACE) && (levelB == MARK )) data = (data << 1) | 0 ; // ...
else return false ; // Error
}
// Success
results->bits = nbits;
results->value = data;
results->decode_type = RC6;
return true;
}
#endif

View file

@ -0,0 +1,92 @@
#include "IRremote.h"
#include "IRremoteInt.h"
//==============================================================================
// SSSS AAA MMM SSSS U U N N GGGG
// S A A M M M S U U NN N G
// SSS AAAAA M M M SSS U U N N N G GG
// S A A M M S U U N NN G G
// SSSS A A M M SSSS UUU N N GGG
//==============================================================================
#define SAMSUNG_BITS 32
#define SAMSUNG_HDR_MARK 5000
#define SAMSUNG_HDR_SPACE 5000
#define SAMSUNG_BIT_MARK 560
#define SAMSUNG_ONE_SPACE 1600
#define SAMSUNG_ZERO_SPACE 560
#define SAMSUNG_RPT_SPACE 2250
//+=============================================================================
#if SEND_SAMSUNG
void IRsend::sendSAMSUNG (unsigned long data, int nbits)
{
// Set IR carrier frequency
enableIROut(38);
// Header
mark(SAMSUNG_HDR_MARK);
space(SAMSUNG_HDR_SPACE);
// Data
for (unsigned long mask = 1UL << (nbits - 1); mask; mask >>= 1) {
if (data & mask) {
mark(SAMSUNG_BIT_MARK);
space(SAMSUNG_ONE_SPACE);
} else {
mark(SAMSUNG_BIT_MARK);
space(SAMSUNG_ZERO_SPACE);
}
}
// Footer
mark(SAMSUNG_BIT_MARK);
space(0); // Always end with the LED off
}
#endif
//+=============================================================================
// SAMSUNGs have a repeat only 4 items long
//
#if DECODE_SAMSUNG
bool IRrecv::decodeSAMSUNG (decode_results *results)
{
long data = 0;
int offset = 1; // Skip first space
// Initial mark
if (!MATCH_MARK(results->rawbuf[offset], SAMSUNG_HDR_MARK)) return false ;
offset++;
// Check for repeat
if ( (irparams.rawlen == 4)
&& MATCH_SPACE(results->rawbuf[offset], SAMSUNG_RPT_SPACE)
&& MATCH_MARK(results->rawbuf[offset+1], SAMSUNG_BIT_MARK)
) {
results->bits = 0;
results->value = REPEAT;
results->decode_type = SAMSUNG;
return true;
}
if (irparams.rawlen < (2 * SAMSUNG_BITS) + 4) return false ;
// Initial space
if (!MATCH_SPACE(results->rawbuf[offset++], SAMSUNG_HDR_SPACE)) return false ;
for (int i = 0; i < SAMSUNG_BITS; i++) {
if (!MATCH_MARK(results->rawbuf[offset++], SAMSUNG_BIT_MARK)) return false ;
if (MATCH_SPACE(results->rawbuf[offset], SAMSUNG_ONE_SPACE)) data = (data << 1) | 1 ;
else if (MATCH_SPACE(results->rawbuf[offset], SAMSUNG_ZERO_SPACE)) data = (data << 1) | 0 ;
else return false ;
offset++;
}
// Success
results->bits = SAMSUNG_BITS;
results->value = data;
results->decode_type = SAMSUNG;
return true;
}
#endif

View file

@ -0,0 +1,76 @@
#include "IRremote.h"
#include "IRremoteInt.h"
//==============================================================================
// SSSS AAA N N Y Y OOO
// S A A NN N Y Y O O
// SSS AAAAA N N N Y O O
// S A A N NN Y O O
// SSSS A A N N Y OOO
//==============================================================================
// I think this is a Sanyo decoder: Serial = SA 8650B
// Looks like Sony except for timings, 48 chars of data and time/space different
#define SANYO_BITS 12
#define SANYO_HDR_MARK 3500 // seen range 3500
#define SANYO_HDR_SPACE 950 // seen 950
#define SANYO_ONE_MARK 2400 // seen 2400
#define SANYO_ZERO_MARK 700 // seen 700
#define SANYO_DOUBLE_SPACE_USECS 800 // usually ssee 713 - not using ticks as get number wrapround
#define SANYO_RPT_LENGTH 45000
//+=============================================================================
#if DECODE_SANYO
bool IRrecv::decodeSanyo (decode_results *results)
{
long data = 0;
int offset = 0; // Skip first space <-- CHECK THIS!
if (irparams.rawlen < (2 * SANYO_BITS) + 2) return false ;
#if 0
// Put this back in for debugging - note can't use #DEBUG as if Debug on we don't see the repeat cos of the delay
Serial.print("IR Gap: ");
Serial.println( results->rawbuf[offset]);
Serial.println( "test against:");
Serial.println(results->rawbuf[offset]);
#endif
// Initial space
if (results->rawbuf[offset] < SANYO_DOUBLE_SPACE_USECS) {
//Serial.print("IR Gap found: ");
results->bits = 0;
results->value = REPEAT;
results->decode_type = SANYO;
return true;
}
offset++;
// Initial mark
if (!MATCH_MARK(results->rawbuf[offset++], SANYO_HDR_MARK)) return false ;
// Skip Second Mark
if (!MATCH_MARK(results->rawbuf[offset++], SANYO_HDR_MARK)) return false ;
while (offset + 1 < irparams.rawlen) {
if (!MATCH_SPACE(results->rawbuf[offset++], SANYO_HDR_SPACE)) break ;
if (MATCH_MARK(results->rawbuf[offset], SANYO_ONE_MARK)) data = (data << 1) | 1 ;
else if (MATCH_MARK(results->rawbuf[offset], SANYO_ZERO_MARK)) data = (data << 1) | 0 ;
else return false ;
offset++;
}
// Success
results->bits = (offset - 1) / 2;
if (results->bits < 12) {
results->bits = 0;
return false;
}
results->value = data;
results->decode_type = SANYO;
return true;
}
#endif

View file

@ -0,0 +1,71 @@
#include "IRremote.h"
#include "IRremoteInt.h"
//==============================================================================
// SSSS H H AAA RRRR PPPP
// S H H A A R R P P
// SSS HHHHH AAAAA RRRR PPPP
// S H H A A R R P
// SSSS H H A A R R P
//==============================================================================
// Sharp and DISH support by Todd Treece: http://unionbridge.org/design/ircommand
//
// The send function has the necessary repeat built in because of the need to
// invert the signal.
//
// Sharp protocol documentation:
// http://www.sbprojects.com/knowledge/ir/sharp.htm
//
// Here is the LIRC file I found that seems to match the remote codes from the
// oscilloscope:
// Sharp LCD TV:
// http://lirc.sourceforge.net/remotes/sharp/GA538WJSA
#define SHARP_BITS 15
#define SHARP_BIT_MARK 245
#define SHARP_ONE_SPACE 1805
#define SHARP_ZERO_SPACE 795
#define SHARP_GAP 600000
#define SHARP_RPT_SPACE 3000
#define SHARP_TOGGLE_MASK 0x3FF
//+=============================================================================
#if SEND_SHARP
void IRsend::sendSharpRaw (unsigned long data, int nbits)
{
enableIROut(38);
// Sending codes in bursts of 3 (normal, inverted, normal) makes transmission
// much more reliable. That's the exact behaviour of CD-S6470 remote control.
for (int n = 0; n < 3; n++) {
for (unsigned long mask = 1UL << (nbits - 1); mask; mask >>= 1) {
if (data & mask) {
mark(SHARP_BIT_MARK);
space(SHARP_ONE_SPACE);
} else {
mark(SHARP_BIT_MARK);
space(SHARP_ZERO_SPACE);
}
}
mark(SHARP_BIT_MARK);
space(SHARP_ZERO_SPACE);
delay(40);
data = data ^ SHARP_TOGGLE_MASK;
}
}
#endif
//+=============================================================================
// Sharp send compatible with data obtained through decodeSharp()
// ^^^^^^^^^^^^^ FUNCTION MISSING!
//
#if SEND_SHARP
void IRsend::sendSharp (unsigned int address, unsigned int command)
{
sendSharpRaw((address << 10) | (command << 2) | 2, SHARP_BITS);
}
#endif

View file

@ -0,0 +1,95 @@
#include "IRremote.h"
#include "IRremoteInt.h"
//==============================================================================
// SSSS OOO N N Y Y
// S O O NN N Y Y
// SSS O O N N N Y
// S O O N NN Y
// SSSS OOO N N Y
//==============================================================================
#define SONY_BITS 12
#define SONY_HDR_MARK 2400
#define SONY_HDR_SPACE 600
#define SONY_ONE_MARK 1200
#define SONY_ZERO_MARK 600
#define SONY_RPT_LENGTH 45000
#define SONY_DOUBLE_SPACE_USECS 500 // usually ssee 713 - not using ticks as get number wrapround
//+=============================================================================
#if SEND_SONY
void IRsend::sendSony (unsigned long data, int nbits)
{
// Set IR carrier frequency
enableIROut(40);
// Header
mark(SONY_HDR_MARK);
space(SONY_HDR_SPACE);
// Data
for (unsigned long mask = 1UL << (nbits - 1); mask; mask >>= 1) {
if (data & mask) {
mark(SONY_ONE_MARK);
space(SONY_HDR_SPACE);
} else {
mark(SONY_ZERO_MARK);
space(SONY_HDR_SPACE);
}
}
// We will have ended with LED off
}
#endif
//+=============================================================================
#if DECODE_SONY
bool IRrecv::decodeSony (decode_results *results)
{
long data = 0;
int offset = 0; // Dont skip first space, check its size
if (irparams.rawlen < (2 * SONY_BITS) + 2) return false ;
// Some Sony's deliver repeats fast after first
// unfortunately can't spot difference from of repeat from two fast clicks
if (results->rawbuf[offset] < SONY_DOUBLE_SPACE_USECS) {
// Serial.print("IR Gap found: ");
results->bits = 0;
results->value = REPEAT;
# ifdef DECODE_SANYO
results->decode_type = SANYO;
# else
results->decode_type = UNKNOWN;
# endif
return true;
}
offset++;
// Initial mark
if (!MATCH_MARK(results->rawbuf[offset++], SONY_HDR_MARK)) return false ;
while (offset + 1 < irparams.rawlen) {
if (!MATCH_SPACE(results->rawbuf[offset++], SONY_HDR_SPACE)) break ;
if (MATCH_MARK(results->rawbuf[offset], SONY_ONE_MARK)) data = (data << 1) | 1 ;
else if (MATCH_MARK(results->rawbuf[offset], SONY_ZERO_MARK)) data = (data << 1) | 0 ;
else return false ;
offset++;
}
// Success
results->bits = (offset - 1) / 2;
if (results->bits < 12) {
results->bits = 0;
return false;
}
results->value = data;
results->decode_type = SONY;
return true;
}
#endif

View file

@ -0,0 +1,179 @@
/*
Assuming the protocol we are adding is for the (imaginary) manufacturer: Shuzu
Our fantasy protocol is a standard protocol, so we can use this standard
template without too much work. Some protocols are quite unique and will require
considerably more work in this file! It is way beyond the scope of this text to
explain how to reverse engineer "unusual" IR protocols. But, unless you own an
oscilloscope, the starting point is probably to use the rawDump.ino sketch and
try to spot the pattern!
Before you start, make sure the IR library is working OK:
# Open up the Arduino IDE
# Load up the rawDump.ino example sketch
# Run it
Now we can start to add our new protocol...
1. Copy this file to : ir_Shuzu.cpp
2. Replace all occurrences of "Shuzu" with the name of your protocol.
3. Tweak the #defines to suit your protocol.
4. If you're lucky, tweaking the #defines will make the default send() function
work.
5. Again, if you're lucky, tweaking the #defines will have made the default
decode() function work.
You have written the code to support your new protocol!
Now you must do a few things to add it to the IRremote system:
1. Open IRremote.h and make the following changes:
REMEMEBER to change occurences of "SHUZU" with the name of your protocol
A. At the top, in the section "Supported Protocols", add:
#define DECODE_SHUZU 1
#define SEND_SHUZU 1
B. In the section "enumerated list of all supported formats", add:
SHUZU,
to the end of the list (notice there is a comma after the protocol name)
C. Further down in "Main class for receiving IR", add:
//......................................................................
#if DECODE_SHUZU
bool decodeShuzu (decode_results *results) ;
#endif
D. Further down in "Main class for sending IR", add:
//......................................................................
#if SEND_SHUZU
void sendShuzu (unsigned long data, int nbits) ;
#endif
E. Save your changes and close the file
2. Now open irRecv.cpp and make the following change:
A. In the function IRrecv::decode(), add:
#ifdef DECODE_NEC
DBG_PRINTLN("Attempting Shuzu decode");
if (decodeShuzu(results)) return true ;
#endif
B. Save your changes and close the file
You will probably want to add your new protocol to the example sketch
3. Open MyDocuments\Arduino\libraries\IRremote\examples\IRrecvDumpV2.ino
A. In the encoding() function, add:
case SHUZU: Serial.print("SHUZU"); break ;
Now open the Arduino IDE, load up the rawDump.ino sketch, and run it.
Hopefully it will compile and upload.
If it doesn't, you've done something wrong. Check your work.
If you can't get it to work - seek help from somewhere.
If you get this far, I will assume you have successfully added your new protocol
There is one last thing to do.
1. Delete this giant instructional comment.
2. Send a copy of your work to us so we can include it in the library and
others may benefit from your hard work and maybe even write a song about how
great you are for helping them! :)
Regards,
BlueChip
*/
#include "IRremote.h"
#include "IRremoteInt.h"
//==============================================================================
//
//
// S H U Z U
//
//
//==============================================================================
#define BITS 32 // The number of bits in the command
#define HDR_MARK 1000 // The length of the Header:Mark
#define HDR_SPACE 2000 // The lenght of the Header:Space
#define BIT_MARK 3000 // The length of a Bit:Mark
#define ONE_SPACE 4000 // The length of a Bit:Space for 1's
#define ZERO_SPACE 5000 // The length of a Bit:Space for 0's
#define OTHER 1234 // Other things you may need to define
//+=============================================================================
//
#if SEND_SHUZU
void IRsend::sendShuzu (unsigned long data, int nbits)
{
// Set IR carrier frequency
enableIROut(38);
// Header
mark (HDR_MARK);
space(HDR_SPACE);
// Data
for (unsigned long mask = 1UL << (nbits - 1); mask; mask >>= 1) {
if (data & mask) {
mark (BIT_MARK);
space(ONE_SPACE);
} else {
mark (BIT_MARK);
space(ZERO_SPACE);
}
}
// Footer
mark(BIT_MARK);
space(0); // Always end with the LED off
}
#endif
//+=============================================================================
//
#if DECODE_SHUZU
bool IRrecv::decodeShuzu (decode_results *results)
{
unsigned long data = 0; // Somewhere to build our code
int offset = 1; // Skip the Gap reading
// Check we have the right amount of data
if (irparams.rawlen != 1 + 2 + (2 * BITS) + 1) return false ;
// Check initial Mark+Space match
if (!MATCH_MARK (results->rawbuf[offset++], HDR_MARK )) return false ;
if (!MATCH_SPACE(results->rawbuf[offset++], HDR_SPACE)) return false ;
// Read the bits in
for (int i = 0; i < SHUZU_BITS; i++) {
// Each bit looks like: MARK + SPACE_1 -> 1
// or : MARK + SPACE_0 -> 0
if (!MATCH_MARK(results->rawbuf[offset++], BIT_MARK)) return false ;
// IR data is big-endian, so we shuffle it in from the right:
if (MATCH_SPACE(results->rawbuf[offset], ONE_SPACE)) data = (data << 1) | 1 ;
else if (MATCH_SPACE(results->rawbuf[offset], ZERO_SPACE)) data = (data << 1) | 0 ;
else return false ;
offset++;
}
// Success
results->bits = BITS;
results->value = data;
results->decode_type = SHUZU;
return true;
}
#endif

View file

@ -0,0 +1,91 @@
#include "IRremote.h"
#include "IRremoteInt.h"
//==============================================================================
// W W H H Y Y N N TTTTT EEEEE RRRRR
// W W H H Y Y NN N T E R R
// W W W HHHHH Y N N N T EEE RRRR
// W W W H H Y N NN T E R R
// WWW H H Y N N T EEEEE R R
//==============================================================================
#define WHYNTER_BITS 32
#define WHYNTER_HDR_MARK 2850
#define WHYNTER_HDR_SPACE 2850
#define WHYNTER_BIT_MARK 750
#define WHYNTER_ONE_MARK 750
#define WHYNTER_ONE_SPACE 2150
#define WHYNTER_ZERO_MARK 750
#define WHYNTER_ZERO_SPACE 750
//+=============================================================================
#if SEND_WHYNTER
void IRsend::sendWhynter (unsigned long data, int nbits)
{
// Set IR carrier frequency
enableIROut(38);
// Start
mark(WHYNTER_ZERO_MARK);
space(WHYNTER_ZERO_SPACE);
// Header
mark(WHYNTER_HDR_MARK);
space(WHYNTER_HDR_SPACE);
// Data
for (unsigned long mask = 1UL << (nbits - 1); mask; mask >>= 1) {
if (data & mask) {
mark(WHYNTER_ONE_MARK);
space(WHYNTER_ONE_SPACE);
} else {
mark(WHYNTER_ZERO_MARK);
space(WHYNTER_ZERO_SPACE);
}
}
// Footer
mark(WHYNTER_ZERO_MARK);
space(WHYNTER_ZERO_SPACE); // Always end with the LED off
}
#endif
//+=============================================================================
#if DECODE_WHYNTER
bool IRrecv::decodeWhynter (decode_results *results)
{
long data = 0;
int offset = 1; // skip initial space
// Check we have the right amount of data
if (irparams.rawlen < (2 * WHYNTER_BITS) + 6) return false ;
// Sequence begins with a bit mark and a zero space
if (!MATCH_MARK (results->rawbuf[offset++], WHYNTER_BIT_MARK )) return false ;
if (!MATCH_SPACE(results->rawbuf[offset++], WHYNTER_ZERO_SPACE)) return false ;
// header mark and space
if (!MATCH_MARK (results->rawbuf[offset++], WHYNTER_HDR_MARK )) return false ;
if (!MATCH_SPACE(results->rawbuf[offset++], WHYNTER_HDR_SPACE)) return false ;
// data bits
for (int i = 0; i < WHYNTER_BITS; i++) {
if (!MATCH_MARK(results->rawbuf[offset++], WHYNTER_BIT_MARK)) return false ;
if (MATCH_SPACE(results->rawbuf[offset], WHYNTER_ONE_SPACE )) data = (data << 1) | 1 ;
else if (MATCH_SPACE(results->rawbuf[offset], WHYNTER_ZERO_SPACE)) data = (data << 1) | 0 ;
else return false ;
offset++;
}
// trailing mark
if (!MATCH_MARK(results->rawbuf[offset], WHYNTER_BIT_MARK)) return false ;
// Success
results->bits = WHYNTER_BITS;
results->value = data;
results->decode_type = WHYNTER;
return true;
}
#endif

29
Firmware/firmware_update.sh Executable file
View file

@ -0,0 +1,29 @@
#! /bin/bash
REPO_PATH=$(readlink -f $(dirname $0) | grep -E -o "^(.*?\\GrovePi)")
echo "Updating the GrovePi firmware"
echo "============================="
echo " http://www.dexterindustries.com/grovepi "
echo " Run this program: "
echo " sudo ./firmware_update.sh"
echo " "
echo "============================="
read -n1 -p "Do you want to update the firmware? [y,n]" input
if [[ $input == "Y" || $input == "y" ]]; then
printf "\nMake sure that GrovePi is connected to Raspberry Pi"
else
printf "\nExiting..."
exit 0
fi
if [ $(find $pwd -name "grove_pi_firmware.hex") ]; then
printf "\nFirmware found"
else
printf "\nFirmware not found\nCheck if firmware is there or run again\nPress any key to exit"
read
exit 0
fi
printf "\nPress any key to start firmware update\n. . .";
read -n1
source $REPO_PATH/Firmware/grovepi_firmware_update.sh
update_grovepi_firmware

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
update_grovepi_firmware(){
avrdude -c gpio -p m328p -U lfuse:w:0xFF:m
avrdude -c gpio -p m328p -U hfuse:w:0xDA:m
avrdude -c gpio -p m328p -U efuse:w:0x05:m
avrdude -c gpio -p m328p -U flash:w:grove_pi_firmware.hex
}

27
Firmware/new_fw_search.sh Normal file
View file

@ -0,0 +1,27 @@
#! /bin/bash
printf "Welcome to GrovePi Firmware Update Check.\n=========================================\nPlease ensure internet connectivity before running this script.\n"
echo "Must be running as Root user"
echo "Press any key to begin..."
read
echo "Check for internet connectivity..."
echo "=================================="
wget -q --tries=2 --timeout=20 --output-document=/dev/null http://raspberrypi.org
if [[ $? -eq 0 ]];then
echo "Connected"
else
echo "Unable to Connect, try again !!!"
exit 0
fi
wget https://raw.github.com/DexterInd/GrovePi/master/Firmware/version.txt -O temp_f &>/dev/null
diff -q version.txt temp_f
if [[ $? == "0" ]]
then
echo "You have the latest firmware"
else
printf "\nNew firmware available. \n\nDownload the new version from Dexter Industries Github Repo and follow the update guide on the GrovePi Homepage to update the firmware.\n"
printf "\nTo download the latest firmware, simply open a terminal session, change directories to the Github on your Raspberry Pi, and type 'git remote update'. This will pull the latest files from Github. Then run this script again."
printf "\nSee the complete update guide here: http://www.dexterindustries.com/GrovePi/get-started-with-the-grovepi/updating-firmware/"
fi
rm temp_f

5
Firmware/readme.md Normal file
View file

@ -0,0 +1,5 @@
To update the firmware to the latest version (Currently version 1.4)
```
cd /home/pi/Dexter/GrovePi/Firmware
sudo bash firmware_update.sh
```

1
Firmware/version.txt Normal file
View file

@ -0,0 +1 @@
1.4.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 KiB

Binary file not shown.

BIN
Hardware/GrovePi+ v3.0.pdf Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

30
Hardware/README.md Normal file
View file

@ -0,0 +1,30 @@
#GrovePi+
GrovePi+ is an electronics board designed by Dexter Industries that you can connect to hundreds of different sensors, so you can program them to monitor, control, and automate devices in your life.
![GrovePi+](https://github.com/DexterInd/GrovePi/blob/master/Hardware/GrovePi%20Graphical%20Datasheet.jpg)
#GrovePi Zero
GrovePi+ is an electronics board designed by Dexter Industries that makes electronics prototyping with the Raspberry Pi Zero easy and fast. With the GrovePi Zero you can start your connected device projects in minutes.
![GrovePi Zero](https://github.com/DexterInd/GrovePi/blob/master/Hardware/GrovePiZero%20Graphical%20Datasheet.jpg)
See more about the GrovePi here: http://www.dexterindustries.com/grovepi/
Copyright (C) 2016 Dexter Industries
## License
GNU General Public License v3.0
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

674
Hardware/gpl-3.0.txt Normal file
View file

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

24
LICENSE Executable file
View file

@ -0,0 +1,24 @@
## License
The MIT License (MIT)
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2019 Dexter Industries
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View file

@ -0,0 +1,113 @@
# grovepi_lcd_dht.py
#
# This is an project for using the Grove RGB_LED Display and the Grove DHT Sensor from the GrovePi starter kit
#
# In this project, the Temperature and humidity from the DHT sensor is printed on the RGB_LCD Display
'''
The MIT License (MIT)
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2017 Dexter Industries
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
'''
import decimal
from grovepi import *
from grove_rgb_lcd import *
dht_sensor_port = 7 # Connect the DHt sensor to port 7
lastTemp = 0.1 # initialize a floating point temp variable
lastHum = 0.1 # initialize a floating Point humidity variable
tooLow = 62.0 # Lower limit in fahrenheit
justRight = 68.0 # Perfect Temp in fahrenheit
tooHigh = 74.0 # Temp Too high
# Function Definitions
def CtoF( tempc ):
"This converts celcius to fahrenheit"
tempf = round((tempc * 1.8) + 32, 2);
return tempf;
def FtoC( tempf ):
"This converts fahrenheit to celcius"
tempc = round((tempf - 32) / 1.8, 2)
return tempc;
def calcColorAdj(variance): # Calc the adjustment value of the background color
"Because there is 6 degrees mapping to 255 values, 42.5 is the factor for 12 degree spread"
factor = 42.5;
adj = abs(int(factor * variance));
if adj > 255:
adj = 255;
return adj;
def calcBG(ftemp):
"This calculates the color value for the background"
variance = ftemp - justRight; # Calculate the variance
adj = calcColorAdj(variance); # Scale it to 8 bit int
bgList = [0,0,0] # initialize the color array
if(variance < 0):
bgR = 0; # too cold, no red
bgB = adj; # green and blue slide equally with adj
bgG = 255 - adj;
elif(variance == 0): # perfect, all on green
bgR = 0;
bgB = 0;
bgG = 255;
elif(variance > 0): #too hot - no blue
bgB = 0;
bgR = adj; # Red and Green slide equally with Adj
bgG = 255 - adj;
bgList = [bgR,bgG,bgB] #build list of color values to return
return bgList;
while True:
try:
temp = 0.01
hum = 0.01
[ temp,hum ] = dht(dht_sensor_port,1) #Get the temperature and Humidity from the DHT sensor
#Change the second parameter to 0 when using DHT (instead of DHT Pro)
#You will get very large number values if you don't!
if (CtoF(temp) != lastTemp) and (hum != lastHum) and not math.isnan(temp) and not math.isnan(hum):
print("lowC : ",FtoC(tooLow),"C\t\t","rightC : ", FtoC(justRight),"C\t\t","highC : ",FtoC(tooHigh),"C") # comment these three lines
print("lowF : ",tooLow,"F\t\tjustRight : ",justRight,"F\t\ttoHigh : ",tooHigh,"F") # if no monitor display
print("tempC : ", temp, "C\t\ttempF : ",CtoF(temp),"F\t\tHumidity =", hum,"%\r\n")
lastHum = hum # save temp & humidity values so that there is no update to the RGB LCD
ftemp = CtoF(temp) # unless the value changes
lastTemp = ftemp # this reduces the flashing of the display
# print "ftemp = ",ftemp," temp = ",temp # this was just for test and debug
bgList = calcBG(ftemp) # Calculate background colors
t = str(ftemp) # "stringify" the display values
h = str(hum)
# print "(",bgList[0],",",bgList[1],",",bgList[2],")" # this was to test and debug color value list
setRGB(bgList[0],bgList[1],bgList[2]) # parse our list into the color settings
setText("Temp:" + t + "F " + "Humidity :" + h + "%") # update the RGB LCD display
except (IOError,TypeError) as e:
print("Error" + str(e))

View file

@ -0,0 +1,54 @@
# button_buzzer.py
#
# This is an project using the Grove Button, Buzzer from the GrovePi starter kit
#
# In this project, the buzzer starts making a sound when the the button is hold
'''
The MIT License (MIT)
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2017 Dexter Industries
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
'''
import time
from grovepi import *
import math
buzzer_pin = 2 #Port for buzzer
button = 4 #Port for Button
pinMode(buzzer_pin,"OUTPUT") # Assign mode for buzzer as output
pinMode(button,"INPUT") # Assign mode for Button as input
while True:
try:
button_status= digitalRead(button) #Read the Button status
if button_status: #If the Button is in HIGH position, run the program
digitalWrite(buzzer_pin,1)
# print "\tBuzzing"
else: #If Button is in Off position, print "Off" on the screen
digitalWrite(buzzer_pin,0)
# print "Off"
except KeyboardInterrupt: # Stop the buzzer before stopping
digitalWrite(buzzer_pin,0)
break
except (IOError,TypeError) as e:
print("Error")

134
Projects/CO2_sensor.py Normal file
View file

@ -0,0 +1,134 @@
#!/usr/bin/env python
########################################################################
# Calibration and read of the CO2 sensor MH-Z16
# according to the datasheet : http://www.seeedstudio.com/wiki/images/c/ca/MH-Z16_CO2_datasheet_EN.pdf
# output value directly in ppm
# Doms made
# History
# ------------------------------------------------
# Author Date Comments
# Doms 13 04 15 Initial Authoring
#
'''
## License
The MIT License (MIT)
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2017 Dexter Industries
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
'''
#
########################################################################
import os
import serial, time
import smbus
import math
import RPi.GPIO as GPIO
import struct
import sys
import datetime
import grovepi
import struct
from grovepi import *
#
__author__ = 'Doms Genoud'
#co2 sensor
#use an external usb to serial adapter
ser = serial.Serial('/dev/ttyUSB0', 9600, timeout = 1) #Open the serial port at 9600 baud
#To open the raspberry serial port
#ser = serial.Serial('/dev/ttyAMA0', 9600, timeout = 1) #Open the serial port at 9600 baud
#init serial
ser.flush()
############# carbon dioxid CO2 #####################
class CO2:
#inspired from c code of http://www.seeedstudio.com/wiki/Grove_-_CO2_Sensor
#Gas concentration= high level *256+low level
inp =[]
cmd_zero_sensor = "\xff\x87\x87\x00\x00\x00\x00\x00\xf2"
cmd_span_sensor = "\xff\x87\x87\x00\x00\x00\x00\x00\xf2"
cmd_get_sensor = "\xff\x01\x86\x00\x00\x00\x00\x00\x79"
def read(self):
try:
while True:
ser.write(CO2.cmd_get_sensor)
CO2.inp = ser.read(9)
high_level = struct.unpack('B',CO2.inp[2])[0]
low_level = struct.unpack('B',CO2.inp[3])[0]
temp_co2 = struct.unpack('B',CO2.inp[4])[0] - 40
#output in ppm
conc = high_level*256+low_level
return [conc,temp_co2]
except IOError:
return [-1,-1]
def calibrateZero(self):
try:
ser.write(CO2.cmd_zero_sensor)
print("CO2 sensor zero calibrated")
except IOError:
print("CO2 sensor calibration error")
def calibrateSpan(self):
try:
while True:
#ser.write(CO2.cmd_zero_sensor)
print("CO2 sensor span calibrated")
break
except IOError:
print("CO2 sensor calibration error")
########################################################################################################
############# MAIN
########################################################################################################
# following the specs of the sensor :
# read the sensor, wait 3 minutes, set the zero, read the sensor
c = CO2()
while True:
try:
#CO2 sensor calib
print("wait 3 minutes to warm up CO2 sensor")
time.sleep(180)
print("Read before calibration-->",c.read())
print("calibrating...")
co2 = c.calibrateZero()
time.sleep(5)
print("Read after calibration-->",c.read())
print("DONE")
break
except IndexError:
print("Unable to read")
except KeyboardInterrupt:
print("Exiting")
sys.exit(0)

View file

@ -0,0 +1,32 @@
## **Candy Counting Raspberry Pi Robot Costume**
In this project, we took the tried-and-true robot costume and gave it some life with the Raspberry Pi, GrovePi, and a handful of sensors. The costume is a standard robot costume, but with a candy-counting machine attached that talks!
When a piece of candy is placed in the robot, it flashes it's LEDs, thanks the candy donor for the piece of candy, and announces the candy count. We use the Raspberry Pi for brains, the GrovePi and assorted sensors to detect candy, and a battery powered speaker to do the talking. The whole project takes about 2 hours to build.
### How to use
## License
The MIT License (MIT)
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2016 Dexter Industries
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN

View file

@ -0,0 +1,491 @@
#!/usr/bin/env python
#
# Raspberry Pi Robot Costume
'''
In this project, we're making a Raspberry Pi Robot Costume. The costume will count candy placed in a bin, and speak out loud to the giver.
Well use the GrovePi, with an Ultrasonic Sensor, an LED Bar graph, 4 Chainable LED's, and the RGB LCD Display. We'll also use a small
portable speaker to give the robot a voice.
Each time a piece of candy is placed in the robot, it says "Thank you for the candy" and reads aloud the count of candy.
'''
#
import os
import random
import time
import grovepi
import sys
import random
from subprocess import call
from grove_rgb_lcd import *
candy_count = 10
bar_level = 0
led1 = 14
led2 = 15
led3 = 16
grovepi.pinMode(led1,"OUTPUT")
grovepi.pinMode(led2,"OUTPUT")
grovepi.pinMode(led3,"OUTPUT")
# Connect the Grove LED Bar to digital port D5
# DI,DCKI,VCC,GND
ledbar = 5
grovepi.pinMode(ledbar,"OUTPUT")
time.sleep(1)
i = 0
# Connect the Grove Ultrasonic Ranger to digital port D4
# SIG,NC,VCC,GND
ultrasonic_ranger = 4
# Connect first LED in Chainable RGB LED chain to digital port D7
# In: CI,DI,VCC,GND
# Out: CO,DO,VCC,GND
ledpin = 7 # RGB LED's are on D7
# First LED input socket connected to GrovePi, output socket connected to second LED input and so on
numleds = 4 #If you only plug 1 LED, change to 1
grovepi.pinMode(ledpin,"OUTPUT")
time.sleep(1)
# Connect the Grove 4 Digit Display to digital port D2
# CLK,DIO,VCC,GND
display = 2
grovepi.pinMode(display,"OUTPUT")
# test colors used in grovepi.chainableRgbLed_test()
testColorBlack = 0 # 0b000 #000000
testColorBlue = 1 # 0b001 #0000FF
testColorGreen = 2 # 0b010 #00FF00
testColorCyan = 3 # 0b011 #00FFFF
testColorRed = 4 # 0b100 #FF0000
testColorMagenta = 5 # 0b101 #FF00FF
testColorYellow = 6 # 0b110 #FFFF00
testColorWhite = 7 # 0b111 #FFFFFF
# patterns used in grovepi.chainableRgbLed_pattern()
thisLedOnly = 0
allLedsExceptThis = 1
thisLedAndInwards = 2
thisLedAndOutwards = 3
def initalize_chained_led():
print("Test 1) Initialise")
# init chain of leds
grovepi.chainableRgbLed_init(ledpin, numleds)
time.sleep(.5)
grovepi.chainableRgbLed_test(ledpin, numleds, random.randint(0,7))
time.sleep(.5)
def chained_led():
try:
# set led 1 to green
grovepi.chainableRgbLed_pattern(pin, thisLedOnly, 0)
time.sleep(.5)
# change color to red
grovepi.storeColor(255,0,0)
time.sleep(.5)
# reset (all off)
grovepi.chainableRgbLed_test(pin, numleds, testColorBlack)
time.sleep(.5)
print ("Test 2b) Test Patterns - blue")
# test pattern 1 blue
grovepi.chainableRgbLed_test(pin, numleds, testColorBlue)
time.sleep(1)
print ("Test 2c) Test Patterns - green")
# test pattern 2 green
grovepi.chainableRgbLed_test(pin, numleds, testColorGreen)
time.sleep(1)
print ("Test 2d) Test Patterns - cyan")
# test pattern 3 cyan
grovepi.chainableRgbLed_test(pin, numleds, testColorCyan)
time.sleep(1)
print ("Test 2e) Test Patterns - red")
# test pattern 4 red
grovepi.chainableRgbLed_test(pin, numleds, testColorRed)
time.sleep(1)
print ("Test 2f) Test Patterns - magenta")
# test pattern 5 magenta
grovepi.chainableRgbLed_test(pin, numleds, testColorMagenta)
time.sleep(1)
print ("Test 2g) Test Patterns - yellow")
# test pattern 6 yellow
grovepi.chainableRgbLed_test(pin, numleds, testColorYellow)
time.sleep(1)
print ("Test 2h) Test Patterns - white")
# test pattern 7 white
grovepi.chainableRgbLed_test(pin, numleds, testColorWhite)
time.sleep(1)
# pause so you can see what happened
time.sleep(2)
# reset (all off)
grovepi.chainableRgbLed_test(pin, numleds, testColorBlack)
time.sleep(.5)
print ("Test 3a) Set using pattern - this led only")
# change color to red
grovepi.storeColor(255,0,0)
time.sleep(.5)
# set led 3 to red
grovepi.chainableRgbLed_pattern(pin, thisLedOnly, 2)
time.sleep(.5)
# pause so you can see what happened
time.sleep(2)
# reset (all off)
grovepi.chainableRgbLed_test(pin, numleds, testColorBlack)
time.sleep(.5)
print ("Test 3b) Set using pattern - all leds except this")
# change color to blue
grovepi.storeColor(0,0,255)
time.sleep(.5)
# set all leds except for 3 to blue
grovepi.chainableRgbLed_pattern(pin, allLedsExceptThis, 3)
time.sleep(.5)
# pause so you can see what happened
time.sleep(2)
# reset (all off)
grovepi.chainableRgbLed_test(pin, numleds, testColorBlack)
time.sleep(.5)
print ("Test 3c) Set using pattern - this led and inwards")
# change color to green
grovepi.storeColor(0,255,0)
time.sleep(.5)
# set leds 1-3 to green
grovepi.chainableRgbLed_pattern(pin, thisLedAndInwards, 2)
time.sleep(.5)
# pause so you can see what happened
time.sleep(2)
# reset (all off)
grovepi.chainableRgbLed_test(pin, numleds, testColorBlack)
time.sleep(.5)
print ("Test 3d) Set using pattern - this led and outwards")
# change color to green
grovepi.storeColor(0,255,0)
time.sleep(.5)
# set leds 7-10 to green
grovepi.chainableRgbLed_pattern(pin, thisLedAndOutwards, 6)
time.sleep(.5)
# pause so you can see what happened
time.sleep(2)
# reset (all off)
grovepi.chainableRgbLed_test(pin, numleds, testColorBlack)
time.sleep(.5)
print ("Test 4a) Set using modulo - all leds")
# change color to black (fully off)
grovepi.storeColor(0,0,0)
time.sleep(.5)
# set all leds black
# offset 0 means start at first led
# divisor 1 means every led
grovepi.chainableRgbLed_modulo(pin, 0, 1)
time.sleep(.5)
# change color to white (fully on)
grovepi.storeColor(255,255,255)
time.sleep(.5)
# set all leds white
grovepi.chainableRgbLed_modulo(pin, 0, 1)
time.sleep(.5)
# pause so you can see what happened
time.sleep(2)
# reset (all off)
grovepi.chainableRgbLed_test(pin, numleds, testColorBlack)
time.sleep(.5)
print ("Test 4b) Set using modulo - every 2")
# change color to red
grovepi.storeColor(255,0,0)
time.sleep(.5)
# set every 2nd led to red
grovepi.chainableRgbLed_modulo(pin, 0, 2)
time.sleep(.5)
# pause so you can see what happened
time.sleep(2)
print ("Test 4c) Set using modulo - every 2, offset 1")
# change color to green
grovepi.storeColor(0,255,0)
time.sleep(.5)
# set every 2nd led to green, offset 1
grovepi.chainableRgbLed_modulo(pin, 1, 2)
time.sleep(.5)
# pause so you can see what happened
time.sleep(2)
# reset (all off)
grovepi.chainableRgbLed_test(pin, numleds, testColorBlack)
time.sleep(.5)
print ("Test 4d) Set using modulo - every 3, offset 0")
# change color to red
grovepi.storeColor(255,0,0)
time.sleep(.5)
# set every 3nd led to red
grovepi.chainableRgbLed_modulo(pin, 0, 3)
time.sleep(.5)
# change color to green
grovepi.storeColor(0,255,0)
time.sleep(.5)
# set every 3nd led to green, offset 1
grovepi.chainableRgbLed_modulo(pin, 1, 3)
time.sleep(.5)
# change color to blue
grovepi.storeColor(0,0,255)
time.sleep(.5)
# set every 3nd led to blue, offset 2
grovepi.chainableRgbLed_modulo(pin, 2, 3)
time.sleep(.5)
# pause so you can see what happened
time.sleep(2)
# reset (all off)
grovepi.chainableRgbLed_test(pin, numleds, testColorBlack)
time.sleep(.5)
print ("Test 4e) Set using modulo - every 3, offset 1")
# change color to yellow
grovepi.storeColor(255,255,0)
time.sleep(.5)
# set every 4nd led to yellow
grovepi.chainableRgbLed_modulo(pin, 1, 3)
time.sleep(.5)
# pause so you can see what happened
time.sleep(2)
print ("Test 4f) Set using modulo - every 3, offset 2")
# change color to magenta
grovepi.storeColor(255,0,255)
time.sleep(.5)
# set every 4nd led to magenta
grovepi.chainableRgbLed_modulo(pin, 2, 3)
time.sleep(.5)
# pause so you can see what happened
time.sleep(2)
# reset (all off)
grovepi.chainableRgbLed_test(pin, numleds, testColorBlack)
time.sleep(.5)
print ("Test 5a) Set level 6")
# change color to green
grovepi.storeColor(0,255,0)
time.sleep(.5)
# set leds 1-6 to green
grovepi.write_i2c_block(0x04,[95,pin,6,0])
time.sleep(.5)
# pause so you can see what happened
time.sleep(2)
# reset (all off)
grovepi.chainableRgbLed_test(pin, numleds, testColorBlack)
time.sleep(.5)
print ("Test 5b) Set level 7 - reverse")
# change color to red
grovepi.storeColor(255,0,0)
time.sleep(.5)
# set leds 4-10 to red
grovepi.write_i2c_block(0x04,[95,pin,7,1])
time.sleep(.5)
except KeyboardInterrupt:
# reset (all off)
grovepi.chainableRgbLed_test(pin, numleds, testColorBlack)
except IOError:
print ("Error")
def led_random():
#print "Change LED Color"
# test pattern 1 blue
try:
grovepi.chainableRgbLed_test(ledpin, numleds, random.randint(0,7))
# time.sleep(1)
except:
print "led_random failure"
def lcd_rgb(text):
c = random.randint(0,255)
setRGB(c,255-c,0)
setText(text)
def lcd_rgb_blue_blank():
setRGB(0,0,255)
#Calls the Espeak TTS Engine to read aloud a sentence
def sound(spk):
# -ven+m7: Male voice
# -s180: set reading to 180 Words per minute
# -k20: Emphasis on Capital letters
cmd_beg=" espeak -ven+m7 -a 200 -s180 -k20 --stdout '"
cmd_end="' | aplay"
print cmd_beg+spk+cmd_end
call ([cmd_beg+spk+cmd_end], shell=True)
def LEDBarGraph(level):
grovepi.ledBar_setLevel(ledbar,level)
time.sleep(0.1)
def random_bar():
global bar_level
# print "Random bar! " + str(bar_level)
try:
ran_bar_sign = random.randint(0,1)
if ran_bar_sign > 0:
bar_level = bar_level + 1
else:
bar_level = bar_level - 1
if bar_level < 0:
bar_level = 0
if bar_level > 10:
bar_level = 10
LEDBarGraph(bar_level)
except:
print "Random Bar Failure"
def random_led():
try:
grovepi.digitalWrite(led1,random.randint(0,1))
grovepi.digitalWrite(led2,random.randint(0,1))
grovepi.digitalWrite(led3,random.randint(0,1))
except:
print "LED Failure!"
def candy_detection():
global candy_count
dist = 100
try:
while dist > 8:
# Read distance value from Ultrasonic
# print(grovepi.ultrasonicRead(ultrasonic_ranger))
dist = grovepi.ultrasonicRead(ultrasonic_ranger)
random_bar()
led_random()
print("Distance Detected: " + str(dist))
candy_count = candy_count + 1
thanks = "Thank you for the candy! " + "I now have " + str(candy_count) + " pieces of candy!"
lcd_rgb(str(thanks))
led_random()
sound(thanks)
except TypeError:
print ("Ultrasonic Error! Error!")
except IOError:
print ("Ultrasonic Error! Error!")
initalize_chained_led() #Starts LED's sets to green.
grovepi.ledBar_init(ledbar, 0)
time.sleep(.5)
while True:
led_random()
random_bar()
try:
led_random()
candy_detection()
except:
print "Error."
lcd_rgb_blue_blank()
random_bar()
random_led()
led_random()
led_random()

View file

@ -0,0 +1,30 @@
## **Catch a Lunch Thief**
Have you ever had your lunch stolen? This project will help you find the culprit! Using the GrovePi, a Raspberry Pi, and a Raspberry Pi camera this project will e-mail you when your lunch is moved, taking a picture of the offender and helping you nab the lunch thief.
See more at the [GrovePi Site](http://dexterindustries.com/GrovePi/)
## License
.
The MIT License (MIT)
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2017 Dexter Industries
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View file

@ -0,0 +1,58 @@
#! /usr/local/bin/python
# This project by Dexter Industries will help you figure out who's stealing your lunch! In
# this project, we will use the GrovePi to take a picture of the culprit when the light in
# your fridge turns on. We will use the light detector for Grove to detect when the fridge
# door has been opened.
#
# Hardware Setup:
# - Use the Raspberry Pi and GrovePi. (http://www.dexterindustries.com/shop/grovepi-starter-kit-2/)
# - Use the Raspberry Pi camera. (http://www.dexterindustries.com/shop/raspberry-pi-camera/)
# - Connect the light sensor to A0. (http://www.dexterindustries.com/shop/grove-light-sensor/)
# You can adjust the threshold value if you have a bright environment.
# Change the email_destination to change the destination you send an e-mail to.
import time
import datetime
import grovepi
import picamera
import send_email_pic
email_destination = 'examples@dexterindustries.com' # Change this to the destination e-mail.
destination = [email_destination] # We put it into an array.
# Connect the Grove Light Sensor to analog port A0
# SIG,NC,VCC,GND
light_sensor = 0 # Connect the light sensor to A0 Port.
grovepi.pinMode(light_sensor,"INPUT") # Set the A0 port to input.
# Send a picture once sensor exceeds threshold resistance
threshold = 600 # Adjust this threshold higher or lower
# Depending on how bright your fridge is.
camera = picamera.PiCamera() # Setup the Pi Camera
# Simple function to get the date as a string.
def get_time_string():
dateString = '%Y-%m-%d_%H-%M-%S'
return_string = datetime.datetime.now().strftime(dateString)
return return_string
while True:
try:
# Get sensor value. Read the light sensor.
sensor_value = grovepi.analogRead(light_sensor)
# Sense the light coming on, within the target range
if sensor_value > threshold:
print ('The fridget light is on!') # Print a note to let us know how it goes.
file_name = "lunch_status-"+str(get_time_string())+".jpg"
camera.capture(file_name) # Take a picture and save it to file_name
# Now send an e-mail
send_email_pic.send_email("The fridge has been opened!", destination, "The fridge has been opened!", file_name)
else:
print ('.') # Do nothing! It's still dark.
time.sleep(.5) # If your hold time is less than this, you might not see as many detections
except IOError:
print ("Error")

View file

@ -0,0 +1,59 @@
#! /usr/local/bin/python
# This example will show you how to send an email in python, with a picture
# attachment. This example uses outlook.com to send an e-mail.
SMTPserver = 'smtp.live.com'
sender = 'dexterexamples@outlook.com'
USERNAME = "dexterexamples@outlook.com"
PASSWORD = "password"
text_subtype = 'plain' # typical values for text_subtype are plain, html, xml
content="""\ Test message """
import sys
import os
import re
# from smtplib import SMTP_SSL as SMTP # this invokes the secure SMTP
# protocol (port 465, uses SSL)
from smtplib import *
from smtplib import SMTP # use this for standard SMTP protocol (port 25, no encryption)
from email.MIMEText import MIMEText
# Here are the email package modules we'll need for images.
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
def send_email(content, destination, subject, file):
try:
msg = MIMEMultipart()
msg['Subject']= subject
msg['From'] = sender # some SMTP servers will do this automatically, not all
fp = open(file, 'rb') # Open File name "file"
img = MIMEImage(fp.read()) # Read the file.
fp.close() # Good housekeeping: close the file.
msg.attach(img) # Attach the file to the message.
conn = SMTP(SMTPserver, port = 587, timeout = 60) # timeout is critical here for long term health.
conn.ehlo()
conn.starttls()
conn.ehlo()
conn.login(USERNAME, PASSWORD)
conn.set_debuglevel(1)
try:
conn.sendmail(sender, destination, msg.as_string())
finally:
conn.close()
except Exception as exc:
# Print a message error!
print("Mail failed; %s" % str(exc))
print("Moving on!")
# Example function call! This is what calling the function would look like!
# send_email(content, destination, subject, file) where "content" is the content of the email, destination is the destination
# of the e-mail (who you're emailing to) and subject is the subject of the e-mail. file is the filename of the image file
# you want to attach. It's usually best to include the full path of the file!
file = "/home/pi/test.jpg"
destination = ['examples@dexterindustries.com'] # Enter the destination e-mail address here, between the ''
send_email("Hello from my Raspberry Pi!", destination, "Hello from Dex!", file)

View file

@ -0,0 +1,11 @@
This folder contains the code to create a smart Holidays wreath, using a string of holiday lights from yesteryear.
The wreath lights will turn on when it's dark and wait for sunrise to turn off.
The lights will blink whenever a movement is detected, whether it's day or not.
Use:
- the PIR sensor on port D8,
- the light sensor on port A0
- and the relay on port D2
Write-up with explanations can be found here:
http://www.dexterindustries.com/projects/holiday-wreath/

View file

@ -0,0 +1,146 @@
#!/usr/bin/env python
#
# GrovePi Example for using the Grove Relay (http://www.seeedstudio.com/wiki/Grove_-_Relay)
#
# The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi
#
# Have a question about this example? Ask on the forums here: http://forum.dexterindustries.com/c/grovepi
#
'''
## License
The MIT License (MIT)
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2017 Dexter Industries
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
'''
# NOTE: Relay is normally open. LED will illuminate when closed and you will hear a definitive click sound
import time
import grovepi
# Connect the Grove Relay to digital port D2
# SIG,NC,VCC,GND
relay = 2
# connect the PIR sensor to digital port D8
pir_sensor = 8
# connect the light sensor to analog port A0
light_sensor = 0
# how dark must it be before the lights turn on
# you may want to adjust this if you have a street lamp or a porch light nearby
light_threshold = 500
# delay when blinking lights. Currently on for 1 second, off for 1 second
blink_delay = 1
# how long should the wreath be on after sunset (in hours)
hours_after_sunset = 5
# how long should the wreath sleep till sunrise (in hours)
hours_of_sleep = 6
# initial status
lights_on = False
start_sleeptime = time.time()
def sleeptime():
"""
Calculates if it's time for the wreath to turn off for the night, and go to sleep
Contains a rather long sleep time (technically the whole night)
"""
global lights_on
now = time.time()
go_to_sleep_time = start_sleeptime + (hours_after_sunset*60*60)
# print now, start_sleeptime, "(", now-start_sleeptime,")", go_to_sleep_time, "(",go_to_sleep_time-now,")"
if now >= go_to_sleep_time:
print("Sleep time!!!")
print("Will wake up in ", hours_of_sleep, " hours")
grovepi.digitalWrite(relay,0)
lights_on = False
for i in range(60):
time.sleep(hours_of_sleep * 60 ) # long sleep time!!!
print("Wake up!")
def blink(in_time):
"""
blinks the wreath lights a certain number of times
variable blink_delay determines how quick or slow the blink is
in_time determines how many times the lights will blink
"""
for i in range(in_time):
grovepi.digitalWrite(relay,1)
time.sleep(blink_delay)
grovepi.digitalWrite(relay,0)
time.sleep(blink_delay)
if lights_on == True:
grovepi.digitalWrite(relay,1)
grovepi.pinMode(relay,"OUTPUT")
grovepi.pinMode(pir_sensor,"INPUT")
grovepi.pinMode(light_sensor,"INPUT")
##########################
# main loop
##########################
while True:
try:
# if the lights are on, test whether it's time for a long nappy
if lights_on==True:
sleeptime() # test included in this function call.
if grovepi.digitalRead(pir_sensor):
# switch on for 5 seconds
print ("blink on")
blink(5)
print ("blink off")
light_sensor_value = grovepi.analogRead(light_sensor)
# is it getting dark?
if light_sensor_value < light_threshold:
# turn lights on
if lights_on == False:
lights_on = True
start_sleeptime = time.time()
print("turning lights on ")
grovepi.digitalWrite(relay,1)
# is it getting light?
else:
# turn lights off
if lights_on == True:
lights_on = False
print("turning lights off", light_sensor_value)
grovepi.digitalWrite(relay,0)
except KeyboardInterrupt:
grovepi.digitalWrite(relay,0)
break
except IOError as e:
pass
# print ("I/O error({0}): {1}".format(e.errno, e.strerror))
time.sleep(2)

View file

@ -0,0 +1,85 @@
# Home_Weather_Display.py
#
# This is an project for using the Grove RGB LCD Display and the Grove DHT Sensor from the GrovePi starter kit
#
# In this project, the Temperature and humidity from the DHT sensor is printed on the RGB-LCD Display
#
#
# Note the dht_sensor_type below may need to be changed depending on which DHT sensor you have:
# 0 - DHT11 - blue one - comes with the GrovePi+ Starter Kit
# 1 - DHT22 - white one, aka DHT Pro or AM2302
# 2 - DHT21 - black one, aka AM2301
#
# For more info please see: http://www.dexterindustries.com/topic/537-6c-displayed-in-home-weather-project/
#
'''
The MIT License (MIT)
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2017 Dexter Industries
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
'''
from grovepi import *
from grove_rgb_lcd import *
from time import sleep
from math import isnan
dht_sensor_port = 7 # connect the DHt sensor to port 7
dht_sensor_type = 0 # use 0 for the blue-colored sensor and 1 for the white-colored sensor
# set green as backlight color
# we need to do it just once
# setting the backlight color once reduces the amount of data transfer over the I2C line
setRGB(0,255,0)
while True:
try:
# get the temperature and Humidity from the DHT sensor
[ temp,hum ] = dht(dht_sensor_port,dht_sensor_type)
print("temp =", temp, "C\thumidity =", hum,"%")
# check if we have nans
# if so, then raise a type error exception
if isnan(temp) is True or isnan(hum) is True:
raise TypeError('nan error')
t = str(temp)
h = str(hum)
# instead of inserting a bunch of whitespace, we can just insert a \n
# we're ensuring that if we get some strange strings on one line, the 2nd one won't be affected
setText_norefresh("Temp:" + t + "C\n" + "Humidity :" + h + "%")
except (IOError, TypeError) as e:
print(str(e))
# and since we got a type error
# then reset the LCD's text
setText("")
except KeyboardInterrupt as e:
print(str(e))
# since we're exiting the program
# it's better to leave the LCD with a blank text
setText("")
break
# wait some time before re-updating the LCD
sleep(0.05)

59
Projects/IOT/grove_IOT.py Normal file
View file

@ -0,0 +1,59 @@
'''
The MIT License (MIT)
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2017 Dexter Industries
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
'''
import xively
import datetime
import sys
import time
import grovepi
sensor = 4
XIVELY_API_KEY = "xmvAR7Y2KxAd00B8AFS1smKCsMigYheWFCybsx58sc2DmFOJ"
XIVELY_FEED_ID = "631205699"
api = xively.XivelyAPIClient(XIVELY_API_KEY)
feed = api.feeds.get(XIVELY_FEED_ID)
while True:
try:
now = datetime.datetime.utcnow()
[temp,humidity] = grovepi.dht(sensor,1)
light=int(grovepi.analogRead(0)/10.24)
sound=int(grovepi.analogRead(1)/10.24)
print(temp,humidity,light,sound)
feed.datastreams = [
xively.Datastream(id='temp', current_value=temp, at=now),
xively.Datastream(id='humidity', current_value=humidity, at=now),
xively.Datastream(id='light', current_value=light, at=now),
xively.Datastream(id='sound', current_value=sound, at=now),
]
feed.update()
time.sleep(10)
except:
print("Error")

View file

@ -0,0 +1,55 @@
# Adjust LED brightness by rotating Potentiometer
# GrovePi + Rotary Angle Sensor (Potentiometer) + LED
# http://www.seeedstudio.com/wiki/Grove_-_Rotary_Angle_Sensor
# http://www.seeedstudio.com/wiki/Grove_-_LED_Socket_Kit
'''
The MIT License (MIT)
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2017 Dexter Industries
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
'''
import time
import grovepi
# Connect the Rotary Angle Sensor to analog port A2
potentiometer = 2
# Connect the LED to digital port D5
led = 5
grovepi.pinMode(led,"OUTPUT")
time.sleep(1)
i = 0
while True:
try:
# Read resistance from Potentiometer
i = grovepi.analogRead(potentiometer)
print(i)
# Send PWM signal to LED
grovepi.analogWrite(led,i//4)
except IOError:
print("Error")

View file

@ -0,0 +1,150 @@
# GrovePi Minecraft Controller
# This is a custom controller for Minecraft, made using the GrovePi.
# In this example, we show you how to build your own custom Minecraft controller
# with the GrovePi.
# See more about the GrovePi at http://dexterindustries.com/grovepi
# A great reference we used is the MagPi's Essentials Minecraft Guide: https://www.raspberrypi.org/magpi-issues/Essentials_Minecraft_v1.pdf
'''
Software Setup:
Before we begin, run the following commands to setup:
sudo apt-get install minecraft-pi
sudo pip3 install python3-xlib
sudo pip3 install pyautogui
Hardware Setup:
Setup the GrovePi on the Raspberry Pi.
Connect a touch Sensor to port A0.
Connect a Joystick to port A2.
Connect a touch sensor to Port D3.
Connect a touch sensor to Port D4.
To run:
1. Start Minecraft on the Pi.
2. Start a world.
3. Start Python3 (IDLE).
4. Open this file (GrovePi-Controller.py)
5. Click "Run" --> "Run Module"
6. Click back into Minecraft.
'''
import mcpi.minecraft as minecraft
import grovepi
import time
import mcpi.block as block
import pyautogui as pag
# Setup the four sensors.
touch_sensor1 = 4 # This will be the Build Key
touch_sensor2 = 3 # This will be the Destroy Key
touch_sensor3 = 14 # This will be the Fly Key.
# This will be the joystick.
xPin = 16 # Port A2
yPin = 17 # Port A2
grovepi.pinMode(xPin, "INPUT")
grovepi.pinMode(yPin, "INPUT")
grovepi.pinMode(touch_sensor1, "INPUT")
grovepi.pinMode(touch_sensor2, "INPUT")
grovepi.pinMode(touch_sensor3, "INPUT")
flying = 0;
# Creat a minecraft entity. We'll reference this through the entire program.
mc = minecraft.Minecraft.create()
# unpress() - This function unpresses all keys.
def unpress():
for key in ['s','w','a','d',' ']:
pag.keyUp(key)
# move() - This function presses the key "direction"
def move(direction):
unpress()
pag.keyDown(direction)
#build - This function builds a square block of "size" size.
def build(p):
size = 5
mc.setBlocks(p.x+1, p.y+1, p.z+1, (p.x + size), (p.y + size), (p.z + size), block.STONE.id)
print("Build!")
#destroy - This function destroys a square block of "size" size.
def destroy(p):
size = 5
mc.setBlocks(p.x+1, p.y+1, p.z+1, (p.x + size), (p.y + size), (p.z + size), block.AIR.id)
print("Destroy!")
# fly - This starts and stops the flying mode.
def fly():
pag.keyDown(' ')
pag.keyUp(' ')
pag.keyDown(' ')
pag.keyUp(' ')
print("Flying!")
# We do the following loop over and over.
while True:
p = mc.player.getTilePos() # Get the position of our person in Minecraft.
try:
# Read the three keys.
# Touch Sensor 1: Build something if it's touched.
if(grovepi.digitalRead(touch_sensor1)):
build(p)
# Touch Sensor 2: Destroy something if it's touched.
if(grovepi.digitalRead(touch_sensor2)):
destroy(p)
# Touch Sensor 3: Start or stop flying if it's been touched.
if(grovepi.digitalRead(touch_sensor3)):
#The variable flying is whether we're flying or not.
if(flying == 0):
flying = 1
fly()
else:
flying = 0
# Read the joystick. We do that with the two pins x and y.
x = grovepi.analogRead(xPin)
y = grovepi.analogRead(yPin)
# Check to see if the joystick has been pressed down.
click = 1 if x >= 1020 else 0
print(str(x) + ", " + str(y))
# Check to see if we've been put into flying mode. If we have, we can teleport ourselves!
if(flying):
jump = 5 # This is the jump size, how far we're going to jump in each direction.
playerPosition = mc.player.getPos() # Get our persons position in Minecraft.
# Now we'll take the joystick values and jump in the direction it tells us to.
if(x < 400):
mc.player.setPos(playerPosition.x+jump, playerPosition.y, playerPosition.z)
# Here we will make sure that the click and the x-axis reading are not confused.
elif(x > 600 and (click == 0)):
mc.player.setPos(playerPosition.x-jump, playerPosition.y, playerPosition.z)
elif(y > 600):
mc.player.setPos(playerPosition.x, playerPosition.y+jump, playerPosition.z)
elif(y < 400):
mc.player.setPos(playerPosition.x, playerPosition.y-jump, playerPosition.z)
# If we didn't read anything, unpress the buttons.
else:
unpress()
# If the joystick is clicked, we fly up one spot.
if(click):
pag.keyUp(' ')
pag.keyDown(' ')
except IOError:
print("Error")

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View file

@ -0,0 +1,37 @@
## **Mine Controls.**
![Picture](Minecraft-dexter-industries.jpg)
### What is it?
Mine Controls are custom hardware controls for Minecraft and the Raspberry Pi! In this project we show you how to build a custom controller for Minecraft using the Raspberry Pi and the GrovePi. You can get [all the hardware for this project from the Dexter Industries website.](http://dexterindustries.com/grovepi)
### Setup
See the [full project description for making a custom Minecraft controller for your Raspberry Pi here](http://www.dexterindustries.com/projects/custom-minecraft-controller/).
Software Setup:
Before we begin, run the following commands to setup:
`sudo apt-get install minecraft-pi `
`sudo pip3 install python3-xlib`
`sudo pip3 install pyautogui`
Hardware Setup:
Setup the GrovePi on the Raspberry Pi.
Connect a touch Sensor to port A0.
Connect a Joystick to port A2.
Connect a touch sensor to Port D3.
Connect a touch sensor to Port D4.
To run:
1. Start Minecraft on the Pi.
2. Start a world.
3. Start Python3 (IDLE).
4. Open this file (GrovePi-Controller.py)
5. Click "Run" --> "Run Module"
6. Click back into Minecraft.
See more at the [Dexter Industries](http://dexterindustries.com/).

View file

@ -0,0 +1,80 @@
#This is an example for the using the Grove OLED as a weather display
'''
The MIT License (MIT)
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2017 Dexter Industries
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
'''
from grove_oled import *
import json
import urllib
#Get the weather
city="Chennai"
url="http://api.openweathermap.org/data/2.5/weather?q="+city
jsonurl = urllib.urlopen(url)
text = json.loads(jsonurl.read())
weather_desc=text["weather"][0]["description"] # General description of the weather
temp=float(text["main"]["temp"])-273.15 # Temperature in C
pressure=text["main"]["pressure"] # Pressure in hPa
humidity=text["main"]["humidity"] # Humidity %
wind_speed=text["wind"]["speed"] # Wind speed mps
print(weather_desc,temp,pressure,humidity,wind_speed)
#Print the data on the OLED
#Initialize the OLED
oled_init()
oled_clearDisplay()
oled_setNormalDisplay()
oled_setVerticalMode()
time.sleep(.1)
line=0
oled_setTextXY(line,0)
oled_putString("WEATHER:")
line+=2
oled_setTextXY(line,0)
oled_putString(weather_desc[:12])
line+=1
oled_setTextXY(line,0)
oled_putString("Temp:"+str(temp)+"C")
line+=1
oled_setTextXY(line,0)
oled_putString("Hum:"+str(humidity)+"%")
line+=1
oled_setTextXY(line,0)
oled_putString("Wind:"+str(wind_speed)+"mps")
line+=2
oled_setTextXY(line,0)
oled_putString("Pressure:")
line+=1
oled_setTextXY(line,0)
oled_putString(str(pressure)+"hPa")

View file

@ -0,0 +1,116 @@
# Adapted from home_temp_hum_display.py
'''
The MIT License (MIT)
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2017 Dexter Industries
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
'''
from grovepi import *
from grove_oled import *
import threading
dht_sensor_port = 7 # Connect the DHt sensor to port 7
#Start and initialize the OLED
oled_init()
oled_clearDisplay()
oled_setNormalDisplay()
oled_setVerticalMode()
time.sleep(.1)
def get_outside_weather(location='Bucharest,ro'):
import pyowm # Do a 'sudo pip install pyowm' to get this module
owm = pyowm.OWM()
#forecast = owm.daily_forecast(location)
observation = owm.weather_at_place(location)
weather = observation.get_weather()
return weather
def update_outside_weather():
# This uses OpenWeatherMap via the PyOWM module;
# pywom module needs to be installed via pip,
# see https://github.com/csparpa/pyowm
weather = get_outside_weather()
# by default location is Bucharest,ro; change it to your own
oled_setTextXY(5, 1)
oled_putString("OUTSIDE")
oled_setTextXY(7, 0)
oled_putString("Temp:")
oled_putString(str(weather.get_temperature("celsius")['temp']) + "C")
oled_setTextXY(8, 0)
oled_putString("Hum :")
oled_putString(str(weather.get_humidity()) + "%")
oled_setTextXY(9, 0)
oled_putString("Rain:")
rain = weather.get_rain()
if len(rain) > 0:
pass
else:
oled_putString("0%")
print(("Weather: ", weather.get_temperature("celsius")))
print(("Humidity: ", weather.get_humidity()))
while True:
try:
# Get the temperature and Humidity from the DHT sensor
[temp, hum] = dht(dht_sensor_port, 1)
print(("Temp =", temp, "C\tHumidity =", hum, "%"))
t = str(temp)
h = str(hum)
#outside_thread = threading.Thread(target=update_outside_weather)
#outside_thread.start()
oled_setTextXY(0, 1) # Print "INSIDE" at line 1
oled_putString("INSIDE")
oled_setTextXY(2, 0) # Print "TEMP" and the temperature in line 3
oled_putString("Temp:")
oled_putString(t + "C")
oled_setTextXY(3, 0) # Print "HUM :" and the humidity in line 4
oled_putString("Hum :")
oled_putString(h + "%")
#outside_thread.join()
update_outside_weather()
except (IOError, TypeError, Exception) as e:
print(("Error:" + str(e)))
finally:
#outside_thread.join()
pass

View file

@ -0,0 +1,94 @@
## **GrovePi Open Wifi Finder**
GrovePi is an open source platform for connecting Grove Sensors to the Raspberry Pi. Create your Internet of Things devices and inventions, no soldering!
Scan for open wifi networks! This is a portable wifi hotspot finder. See our project [here](http://www.dexterindustries.com/GrovePi) for more information on turning this into a portable wifi hotspot finder.
### How Does it Work?
The GrovePi board slips over the Raspberry Pi. Connect the Grove Sensors to the GrovePi board.
####Software Setup Notes:
* This example uses [wifi library](https://wifi.readthedocs.org/en/latest/wifi_command.html). Install with pip install wifi
* Wifi dongle must be on wlan0 ; Check this with the command "ifconfig" on the command line.
####Hardware Setup Notes:
* Buzzer goes on port D2 of the GrovePi.
* LED Goes on port D3 of the GrovePi.
* The LCD goes on I2C-1. Check this with the command "sudo i2cdetect -y 1"
The GrovePi connects the Raspberry Pi and Grove sensors. You can learn [more about GrovePi here.](http://www.dexterindustries.com/GrovePi)
### Make This Start at Boot!
If you're going to take this outside, make sure you can start this at boot.
First, the files in this directory are copied into the home directory.
Make a script "start.sh" and put a command to start the wifi_finder.py script.
```
sudo nano start.sh
```
The contents of start.sh are going to be:
```
#!/bin/bash
sudo python /home/pi/wifi_finder.py
```
And then open up rc.local
```
sudo nano /etc/rc.local
```
and add the last few lines of this file should be:
```
sudo sh /home/pi/start.sh
exit 0
```
Then that's it! Reboot and test!
Have a question about this example? [Ask on the forums here.](http://forum.dexterindustries.com/c/grovepi)
LICENSE:
These files have been made available online through a [Creative Commons Attribution-ShareAlike 3.0](http://creativecommons.org/licenses/by-sa/3.0/) license.
### Raspberry Pi Compatibility
The GrovePi is compatible with the Raspberry Pi models A, A+, B, B+, and 2.
### Programming the GrovePi
The GrovePi can be programmed in Python, C, C#, Go, and NodeJS on the Raspberry Pi. Simply start with one of our [example projects](http://www.dexterindustries.com/GrovePi/projects-for-the-raspberry-pi/) or [example code](https://github.com/DexterInd/GrovePi/tree/master/Software).
The GrovePi uses an Arduino to interface between the Raspberry Pi and the Grove Sensors, and comes programmed with a standard firmware. The firmware can be rewritten from the Raspberry Pi.
### Getting Help
Need help? We [have a forum here where you can ask questions or make suggestions](http://www.dexterindustries.com/GrovePi/projects-for-the-raspberry-pi/).
The MIT License (MIT)
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2017 Dexter Industries
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
See more at the [GrovePi Site](http://dexterindustries.com/GrovePi/)

View file

@ -0,0 +1,119 @@
#!/usr/bin/env python
'''
wifi_finder.py
Scan for open wifi networks! This is a portable wifi hotspot finder. See our project at www.dexterindustries.com/GrovePi for more information on turning this into a portable wifi hotspot finder.
Software Setup Notes:
* This example uses https://wifi.readthedocs.org/en/latest/wifi_command.html. Install with pip install wifi
* Wifi dongle must be on wlan0 ; Check this with the command "ifconfig" on the command line.
Hardware Setup Notes:
* Buzzer goes on port 8 of the GrovePi.
* LED Goes on port 4 of the GrovePi.
* The LCD goes on I2C-1. Check this with the command "sudo i2cdetect -y 1"
The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi
Have a question about this example? Ask on the forums here: http://forum.dexterindustries.com/c/grovepi
'''
'''
## License
The MIT License (MIT)
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2017 Dexter Industries
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
'''
from wifi import *
import time
import grovepi
from grove_rgb_lcd import *
## Connections
# LCD Goes on I2C-1
buzzer = 2 # Connect the Grove Buzzer to digital port D8
led = 3 # Connect the Grove LED to digital port D3
grovepi.pinMode(buzzer, "OUTPUT")
grovepi.pinMode(led, "OUTPUT")
def check_open_ssids():
open_ssids = []
for cell in Cell.all('wlan0'):
if cell.encrypted == False:
# print cell.ssid
open_ssids.append(cell.ssid)
return open_ssids
def alert_user():
# Buzz for 0.1 seconds
grovepi.digitalWrite(buzzer,1)
grovepi.digitalWrite(led,1) # Send HIGH to switch on LED
time.sleep(0.5)
# Don't buzz for 0.1 seconds
grovepi.digitalWrite(buzzer,0)
grovepi.digitalWrite(led,0) # Send LOW to switch off LED
time.sleep(0.5)
# Print the ssid name to the LCD, beep and turn the LED on and off.
def display_ssid(ssid):
alert_user()
string_out = "SSID Available: " + str(ssid)
try:
setText(string_out)
setRGB(0,128,64)
alert_user()
for c in range(0,255):
setRGB(c,255-c,0)
time.sleep(0.01)
time.sleep(3)
setRGB(0,0,0)
except:
print("Failed on something or other!")
try:
while True:
list_of_open = []
# 1). Test for any open ssids
list_of_open = check_open_ssids()
print(list_of_open)
# 2). If we find open ssids turn light and buzzer on, print to SSID.
for ssid in list_of_open:
display_ssid(ssid)
# 3). Look around ever 5 seconds.
time.sleep(5)
except:
pass
finally:
setText("")
setRGB(0,0,0)
grovepi.digitalWrite(buzzer,0)
grovepi.digitalWrite(led,0)

59
Projects/README.md Normal file
View file

@ -0,0 +1,59 @@
## **GrovePi Projects Readme**
GrovePi is an electronics board that you can connect to hundreds of different sensors, so you can program them to monitor, control, and automate devices in your life. [View Product Details here.](http://www.dexterindustries.com/grovepi/)
- **Advanced_RGB_LCD_TempAndHumidity**: Changes the color of the RGB color LCD depending on the temperature. (Works with the GrovePi starter kit)
- **Button_And_Buzzer**: The buzzer makes a sound when the button is pressed. (Works with the GrovePi starter kit)
- **home_temp_humi_display**: Shows the temperature and humidity on Grove I2C OLED.
- **Home_Weather_Display**: Shows the temperature and humidity on Grove RGB LCD. (Works with the GrovePi starter kit)
- **IOT**: Plots the data from various grove sensors on Xively. (Works with the GrovePi starter kit)
- **LED Fade**: Changed the brightness of a LED from the value read from a potentiometer.(Works with the GrovePi starter kit)
- **OLED_Weather Display**: Fetch the live weather data from the internet and print on the OLED display
- **OLED_Weather Station**: Get weather data from the internet and the DHT sensor and print on the OLED
- **Open_Wifi_Finder**: Finds open WiFi networks and prints on the Grove RGB LCD. (Works with the GrovePi starter kit)
- **rain_notifier**: Get rain data from the internet and blink a LED if it'g going to rain. (Works with the GrovePi starter kit)
- **Sensor_Twitter_Feed**: Get Sensor data from GrovePi sensors and post the data on twitter. (Works with the GrovePi starter kit)
- **tilt_buzzer**: Turn the buzzer on/off deping on the values read from the accelerometer
- **Ultrasonic_And_Relay**: Read the ultrasonic ranger and turn the relay on/off depending on the values read
- **Whos_at_the_Door**: Checks if someone is at the door, if there is someone then it takes a photo and mails it
- **CO2_sensor**: Read the data from the CO2 Sensor and print it in the terminal
See more at the [GrovePi Site](http://dexterindustries.com/GrovePi/)
## License
.
The MIT License (MIT)
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2017 Dexter Industries
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View file

@ -0,0 +1,88 @@
#! /usr/local/bin/python
# This is an example of sending an e-mail with the Raspberry Pi. This is a very
# useful example, if you want to send an e-mail or alert on some hardware change!
# In this example we use a hotmail/outlook account. Settings may vary depending
# on the e-mail provider you are using.
#
# The GrovePi connects the Raspberry Pi and Grove sensors.
# You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi
#
# Have a question about this example?
# Ask on the forums here: http://forum.dexterindustries.com/c/grovepi
#
'''
## License
The MIT License (MIT)
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2017 Dexter Industries
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
'''
SMTPserver = 'smtp.live.com' # This is the SMTP server. In our example, we use Microsoft Outlook.
sender = 'dex@outlook.com' # This is your login email.
destination = ['dex@dexterindustries.com'] # This is the e-mail address you want to send an e-mail to.
# You can send to multiple e-mails. The e-mail address is a string.
USERNAME = "dex@outlook.com"
PASSWORD = "my_password"
# typical values for text_subtype are plain, html, xml
text_subtype = 'plain'
content="""\
Test message
"""
import sys
import os
import re
# from smtplib import SMTP_SSL as SMTP # this invokes the secure SMTP protocol (port 465, uses SSL)
from smtplib import *
from smtplib import SMTP # use this for standard SMTP protocol (port 25, no encryption)
from email.MIMEText import MIMEText
#
def send_email(content, destination, subject):
try:
msg = MIMEText(content, text_subtype)
msg['Subject']= subject
msg['From'] = sender # some SMTP servers will do this automatically, not all
# timeout is critical here for long term health.
conn = SMTP(SMTPserver, port = 587, timeout = 60)
conn.ehlo()
conn.starttls()
conn.ehlo()
conn.login(USERNAME, PASSWORD)
conn.set_debuglevel(1)
try:
conn.sendmail(sender, destination, msg.as_string())
finally:
conn.close()
except Exception as exc:
# sys.exit( "mail failed; %s" % str(exc) ) # give a error message
print("Mail failed; %s" % str(exc))
print("Moving on!")

View file

@ -0,0 +1,13 @@
#TWEET YOUR VALUES
This folder contains the code necessary to tweet your sensor values once a minute.
It requires python-twitter library which you can get by
**sudo pip install python-twitter**
Sensors used in this code are:
* light sensor on port A1
* sound sensor on port A0
* temperature and humidity sensor on port D2
* LED for visual feedback on port D3 (with PWM)

View file

@ -0,0 +1,93 @@
# Tweet the temperature, light, and sound levels with our Raspberry Pi
# http://www.dexterindustries.com/GrovePi/projects-for-the-raspberry-pi/raspberry-pi-twitter-sensor-feed/
# GrovePi + Sound Sensor + Light Sensor + Temperature Sensor + LED
# http://www.seeedstudio.com/wiki/Grove_-_Sound_Sensor
# http://www.seeedstudio.com/wiki/Grove_-_Light_Sensor
# http://www.seeedstudio.com/wiki/Grove_-_Temperature_and_Humidity_Sensor_Pro
# http://www.seeedstudio.com/wiki/Grove_-_LED_Socket_Kit
'''
## License
The MIT License (MIT)
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2017 Dexter Industries
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
'''
import twitter
import time
import grovepi
import math
# Connections
sound_sensor = 0 # port A0
light_sensor = 1 # port A1
temperature_sensor = 2 # port D2
led = 3 # port D3
intro_str = "DI Lab's"
# Connect to Twitter
api = twitter.Api(
consumer_key='YourKey',
consumer_secret='YourKey',
access_token_key='YourKey',
access_token_secret='YourKey'
)
grovepi.pinMode(led,"OUTPUT")
grovepi.analogWrite(led,255) #turn led to max to show readiness
while True:
# Error handling in case of problems communicating with the GrovePi
try:
# Get value from light sensor
light_intensity = grovepi.analogRead(light_sensor)
# Give PWM output to LED
grovepi.analogWrite(led,light_intensity/4)
# Get sound level
sound_level = grovepi.analogRead(sound_sensor)
time.sleep(0.5)
# Get value from temperature sensor
[t,h]=[0,0]
[t,h] = grovepi.dht(temperature_sensor,0)
# Post a tweet
out_str ="%s Temp: %d C, Humidity: %d, Light: %d, Sound: %d" %(intro_str,t,h,light_intensity/10,sound_level)
print (out_str)
api.PostUpdate(out_str)
except IOError:
print("Error")
except KeyboardInterrupt:
exit()
except Exception as e:
print("Duplicate Tweet or Twitter Refusal: {}".format(e))
time.sleep(60)

View file

@ -0,0 +1,15 @@
This project was created for the GrovePi0 as an example of a portable project
![alt text](http://32414320wji53mwwch1u68ce.wpengine.netdna-cdn.com/wp-content/uploads/2016/07/20160703_144803-1024x576.jpg "Pi on a Bike")
You can equip your bike with a GPS logger, which will take a photo every minute,
and stamp it with the GPS coordinates, and temperature/humidity data.
Project is documented at http://www.dexterindustries.com/projects/take-grovepizero-bike-trip/
You will need a Pizero with a Pi camera (it requires a special cable for the pizero),
you will need to run Cinch on your SD card
The GPS sensor goes into port RPISER
The temperature/humidity sensor goes into port D3
An optional LCD screen goes into one of the I2C ports.
You will also need to make a copy of the dextergps.py library into this folder.
You can find that file in **GrovePi/Software/Python/grove_gps/**

View file

@ -0,0 +1,186 @@
# -*- coding: utf-8 -*-
import grovepi
import grove_rgb_lcd as lcd
import dextergps
import time
import picamera
import atexit,sys
from PIL import Image, ImageDraw, ImageFont
from datetime import datetime,timedelta
###############################################
@atexit.register
def cleanup():
print ("Cleanup")
try:
grovepi.digitalWrite(led,0)
lcd.setRGB(0,0,0)
lcd.setText("")
fobj.close()
except:
pass
###############################################
###############################################
# LED on D7 # only for big brother GrovePi
# DHT on D3
# LCD on I2C
# GPS on RPISER
###############################################
# Variables - adapt as needed
###############################################
photo_location = "/media/KINGSTON/"
logfile=photo_location+"trip.csv"
led = 7
dht_sensor_port = 3
dht_sensor_type = 0
temp = 0
hum = 0
use_lcd = True # if lcd display is used for feedback
overlay_txt_ypos = 440
#degree_sign= u'\N{DEGREE SIGN}'
###################################
def display(in_str,bgcol=(255,255,255),in_lcd=use_lcd):
print(in_str)
try:
if in_lcd:
lcd.setRGB(bgcol[0],bgcol[1],bgcol[2])
lcd.setText(in_str)
except KeyboardInterrupt:
sys.exit()
except:
pass
def format_coord(in_lat, in_lon):
'''
TBD:
takes in a latitude and a longitude in
returns a nicely formatted string in degrees minutes seconds
'''
out_lat = in_lat
out_lon = in_lon
return (out_lat, out_lon)
def handlegpsdata():
'''
Read GPS
if we get valid data, blink the LED, return True
and save the info
else return False
'''
try:
g.read()
if g.lat != -1.0:
display( "valid GPS data",in_lcd=False)
return True
except KeyboardInterrupt:
sys.exit()
except:
pass
display( "invalid GPS data",in_lcd=True)
return False
def handledhtdata():
global temp, hum
[ temp, hum ] = grovepi.dht(dht_sensor_port,dht_sensor_type)
if temp != -1 and hum != -1:
display("temp = {}C humidity={}%".format(temp,hum),(0,255,0))
else:
display("Error reading DTH sensor")
def logtofile():
try:
fobj = open( logfile,"a")
fobj.write("#{:3d},{:.4f}, {:.4f}, {}, {:.2f}, {:.2f}%\n".format(
count,g.latitude,g.longitude, g.timestamp, temp,hum))
fobj.flush()
fobj.close()
except KeyboardInterrupt:
sys.exit()
except:
display("Error writing to USB Drive",in_lcd=True)
time.sleep(3)
# handle time. Convert according to timezone
# convert timestamp to struct_time
#my_time = time.strptime(g.timestamp,"%H%M%S.000")
#print my_time
def savephoto():
try:
photoname = photo_location+str(g.timestamp)+".jpg"
display( photoname,in_lcd=False)
cam.capture(photoname)
grovepi.digitalWrite(led,0)
time.sleep(1)
grovepi.digitalWrite(led,255)
# Get ready to watermark the image
# 1. grab the image
base = Image.open(photoname).convert('RGBA')
# 2. create overlay
txt = Image.new('RGBA', base.size, (255,255,255,50))
# get a drawing context
d = ImageDraw.Draw(txt)
# 3. prepare text to overlay
d.text((20,overlay_txt_ypos),
"#{}: lon: {:.4f} lat: {:.4f} temp: {:.1f}C humidity: {:.1f}%".format(
count,g.longitude,g.latitude, temp,hum), font=fnt, fill=(255,255,255,255))
# 4. do composite and save
out = Image.alpha_composite(base, txt)
out.save(photoname)
grovepi.digitalWrite(led,255)
except KeyboardInterrupt:
sys.exit()
except:
display("Error saving photo",in_lcd=True)
time.sleep(3)
###############################################################
try:
display("Starting up...",in_lcd=True)
grovepi.digitalWrite(led,0)
except:
pass
# check camera
try:
g = grovegps.GROVEGPS()
cam = picamera.PiCamera(sensor_mode=3)
display("Camera working",in_lcd=True)
except:
display("Camera NOT working!!",in_lcd=True)
# get a font
fnt = ImageFont.truetype('/usr/share/fonts/truetype/roboto/Roboto-Thin.ttf', 20)
count = 0
while True:
if handlegpsdata():
count += 1
grovepi.digitalWrite(led,255)
display("{} {}, {} {}, {}, {}".format(g.lat,g.NS,g.lon,g.EW, g.latitude,g.longitude),
in_lcd=False)
handledhtdata()
savephoto()
logtofile()
time.sleep(5)
display("lon: {:11.7f}lat: {:11.7f}".format(g.longitude,g.latitude),(0,0,255))
time.sleep(5)
grovepi.digitalWrite(led,0)

View file

@ -0,0 +1,58 @@
# GrovePi + Grove Ultrasonic Ranger
# http://www.seeedstudio.com/wiki/Grove_-_Ultrasonic_Ranger
# This is an project using the Grove Ultrasonic Ranger and Relay from GrovePi start kit
#
# In this project, the ultrasonic can figure out the distance of object in front,
# when object close to it within 10cm, the relay will turn on
'''
## License
The MIT License (MIT)
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2017 Dexter Industries
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
'''
from grovepi import *
# Connect the Grove Ultrasonic Ranger to digital port D4
# SIG,NC,VCC,GND
ultrasonic_ranger = 4
Relay_pin = 2
pinMode(Relay_pin,"OUTPUT")
while True:
try:
# Read distance value from Ultrasonic
distant = ultrasonicRead(ultrasonic_ranger)
print(distant,'cm')
if distant <= 10:
digitalWrite(Relay_pin,1)
else:
digitalWrite(Relay_pin,0)
except TypeError:
print("Error")
except IOError:
print("Error")

View file

@ -0,0 +1,108 @@
# Detects motion, triggers Buzzer, LED and Relay, takes picture from RPi Camera, sends as attachment via Gmail
# http://www.dexterindustries.com/GrovePi/projects-for-the-raspberry-pi/whos-at-the-door/
# GrovePi + Ultrasonic Ranger + Buzzer + Switch + Relay + LED + RPi Camera
# http://www.seeedstudio.com/wiki/Grove_-_Ultrasonic_Ranger
# http://www.seeedstudio.com/wiki/Grove_-_Buzzer
# http://www.seeedstudio.com/wiki/Grove_-_Switch(P)
# http://www.seeedstudio.com/wiki/Grove_-_Solid_State_Relay
# http://www.seeedstudio.com/wiki/Grove_-_LED_Socket_Kit
# http://www.raspberrypi.org/camera
'''
## License
The MIT License (MIT)
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2017 Dexter Industries
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
'''
import grovepi
# Import smtplib for the actual sending function
import smtplib, string, subprocess, time
# Here are the email package modules we'll need
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
from subprocess import call
print("System Working")
switch = 4
led_status = 3
relay = 2
buzzer = 5
SMTP_USERNAME = '' # Mail id of the sender
SMTP_PASSWORD = '' # Pasword of the sender
SMTP_RECIPIENT = '' # Mail id of the reciever
SMTP_SERVER = 'smtp.gmail.com' # Address of the SMTP server
SSL_PORT = 465
while True: # in case of IO error, restart
try:
grovepi.pinMode(switch,"INPUT")
while True:
if grovepi.digitalRead(switch) == 1: # If the system is ON
if grovepi.ultrasonicRead() < 100: # If a person walks through the door
print("Welcome")
grovepi.analogWrite(buzzer,100) # Make a sound on the Buzzer
time.sleep(.5)
grovepi.analogWrite(buzzer,0) # Turn off the Buzzer
grovepi.digitalWrite(led_status,1) # Turn on the status LED to indicate that someone has arrived
grovepi.digitalWrite(relay,1) # turn on the Relay to activate an electrical device
# Take a picture from the Raspberry Pi camera
call (["raspistill -o i1.jpg -w 640 -h 480 -t 0"], shell=True)
print("Image Shot")
p = subprocess.Popen(["runlevel"], stdout=subprocess.PIPE)
out, err=p.communicate() # Connect to the mail server
if out[2] == '0':
print('Halt detected')
exit(0)
if out [2] == '6':
print('Shutdown detected')
exit(0)
print("Connected to mail")
# Create the container (outer) email message
TO = SMTP_RECIPIENT
FROM = SMTP_USERNAME
msg = MIMEMultipart()
msg.preamble = 'Rpi Sends image'
# Attach the image
fp = open('i1.jpg', 'rb')
img = MIMEImage(fp.read())
fp.close()
msg.attach(img)
# Send the email via Gmail
print("Sending the mail")
server = smtplib.SMTP_SSL(SMTP_SERVER, SSL_PORT)
server.login(SMTP_USERNAME, SMTP_PASSWORD)
server.sendmail(FROM, [TO], msg.as_string())
server.quit()
print("Mail sent")
grovepi.digitalWrite(led_status,0) # Turn off the LED
grovepi.digitalWrite(relay,0) # Turn off the Relay
except IOError:
print("Error")

View file

@ -0,0 +1,61 @@
# home_temp_hum_display.py.py
#
# This is an project for using the Grove OLED Display and the Grove DHT Sensor from the GrovePi starter kit
#
# In this project, the Temperature and humidity from the DHT sensor is printed on the DHT sensor
'''
The MIT License (MIT)
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2017 Dexter Industries
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
'''
from grovepi import *
from grove_oled import *
dht_sensor_port = 7 # Connect the DHt sensor to port 7
#Start and initialize the OLED
oled_init()
oled_clearDisplay()
oled_setNormalDisplay()
oled_setVerticalMode()
time.sleep(.1)
while True:
try:
[ temp,hum ] = dht(dht_sensor_port,1) #Get the temperature and Humidity from the DHT sensor
print("temp =", temp, "C\thumidity =", hum,"%")
t = str(temp)
h = str(hum)
oled_setTextXY(0,1) #Print "WEATHER" at line 1
oled_putString("WEATHER")
oled_setTextXY(2,0) #Print "TEMP" and the temperature in line 3
oled_putString("Temp:")
oled_putString(t+'C')
oled_setTextXY(3,0) #Print "HUM :" and the humidity in line 4
oled_putString("Hum :")
oled_putString(h+"%")
except (IOError,TypeError) as e:
print("Error")

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View file

@ -0,0 +1,125 @@
package grovepi.buttonrotarydemo;
/*
* **********************************************************************
* PROJECT : GrovePi Java Library
*
* This file is part of the GrovePi Java Library project. More information about
* this project can be found here: https://github.com/DexterInd/GrovePi
* **********************************************************************
*
* ## License
*
* The MIT License (MIT)
* GrovePi for the Raspberry Pi: an open source platform for connecting Grove
* Sensors to the Raspberry Pi.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
import grovepi.observer.ButtonInvoker;
import grovepi.observer.ButtonPressDistinguisher;
import grovepi.observer.DigitalInputReader;
import grovepi.observer.RotaryInvoker;
import grovepi.observer.RotaryAngleDeterminer;
import grovepi.observer.AnalogInputReader;
/**
* ButtonRotaryDemo
* This GrovePi sensor demonstration is part of a coursework project
* for CS505 Design Patterns, at Central Connecticut State University,
* Fall 2017, with Dr. Chad Williams.
*
* The main method creates a BottonInvoker object and begins listening for button events:
* singlePress, doublePress, and longPress. Each of these events will invoke methods
* implemented in SampleButtonInvoker. Write your own class that implements ButtonInvoker interface.
* (SampleButtonInvoker is quite boring)
*
* @see SampleButtonInvoker
* @see grovepi.observer.ButtonInvoker
*
* The main method also creates a RotaryInvoker object and begins reading the
* angle of the rotary sensor. Each time the angle is read, the method
* invokeWithDegrees(degrees) of SampleRotaryInvoker is executed. Write your own class that
* implements RotaryInvoker interface. (SampleRotaryInvoker is even more boring)
*
* @see SampleRotaryInvoker
* @see grovepi.observer.RotaryInvoker
*
* @author James Luczynski
* @author Jeff Blankenship
*/
public class ButtonRotaryDemo{
/**
* @param args the command line arguments
* @throws java.lang.InterruptedException
* @throws java.lang.Exception
*/
public static void main(String[] args){
//button can be connected to D2-D8.
int buttonPin = 6;
//rotary can be connected to A0, A1, A2
int rotaryPin = 2;
//instantiate a ButtonInvoker
SampleButtonInvoker invoker = new SampleButtonInvoker();
initButton(invoker, buttonPin);
//instantiate a RotaryInvoker
SampleRotaryInvoker rotaryInvoker = new SampleRotaryInvoker();
initRotary(rotaryInvoker,rotaryPin);
}
/**
* Initializes DigitalInputReader and ButtonPressDistinguisher objects.
* Button presses will invoke the methods defined in the ButtonInvoker parameter.
* @param invoker any object of a class that implements ButtonInvoker interface
* @param pin the GrovePi port number the button sensor is plugged into
*/
public static void initButton(ButtonInvoker invoker, int pin) {
try {
DigitalInputReader buttonReader = new DigitalInputReader(pin);
ButtonPressDistinguisher distinguisher = new ButtonPressDistinguisher(invoker);
buttonReader.addObserver(distinguisher);
buttonReader.startReading();
}catch(Exception e){
e.printStackTrace();
}
}
/**
* Initializes AnalogInputReader and RotaryAngleDeterminer objects.
* Rotations of the rotary sensor will invoke the method defined in the RotaryInvoker parameter.
* @param invoker any object of a class that implements RotaryInvoker interface
* @param pin the GrovePi port number the rotary sensor is plugged into
*/
public static void initRotary(RotaryInvoker invoker, int pin){
try {
AnalogInputReader rotaryReader = new AnalogInputReader(pin);
RotaryAngleDeterminer determiner = new RotaryAngleDeterminer(invoker);
rotaryReader.addObserver(determiner);
rotaryReader.startReading();
} catch (Exception e) {
e.printStackTrace();
}
}
}

Some files were not shown because too many files have changed in this diff Show more