Commit 97827caa authored by Shaya Wolf's avatar Shaya Wolf
Browse files

beacon lab update

parent 2d12d65c
let channel = 0
let id = 0
let index = 0
input.onButtonPressed(Button.A, () => {
if (id < 10) {
id = id + 1
} else {
id = 1
}
showLights()
})
input.onButtonPressed(Button.B, () => {
if (channel < 10) {
channel = channel + 1
} else {
channel = 1
}
radio.setGroup(channel)
showLights()
})
function showLights() {
basic.clearScreen()
for (let index = 0; index <= 9; index++) {
if (id > index) {
led.plot(index / 5, index % 5)
}
}
for (let index = 0; index <= 9; index++) {
if (channel > index) {
led.plot(4 - index / 5, index % 5)
}
}
}
id = 1
channel = 1
radio.setGroup(channel)
showLights()
basic.forever(() => {
radio.sendNumber(id)
basic.pause(250)
})
let id = 0
input.onButtonPressed(Button.A, () => {
if (id > 0) {
id = id - 1
radio.setGroup(id)
}
basic.showNumber(id)
})
input.onButtonPressed(Button.B, () => {
if (id < 9) {
id = id + 1
radio.setGroup(id)
}
basic.showNumber(id)
})
id = 0
radio.setGroup(id)
basic.showNumber(id)
basic.forever(() => {
radio.sendNumber(id)
basic.pause(150)
})
radio.setGroup(1)
basic.forever(() => {
radio.sendNumber(0)
basic.showLeds(`
. . # . .
. # # # .
# # . # #
. # # # .
. . # . .
`)
})
from microbit import *
import radio
radio.on()
radio.config(channel=1)
display.show(Image.DIAMOND_SMALL)
while True:
radio.send("0")
\ No newline at end of file
let id = 0
input.onButtonPressed(Button.A, () => {
if (id > 0) {
id = id - 1
radio.setGroup(id)
}
basic.showNumber(id)
})
input.onButtonPressed(Button.B, () => {
if (id < 255) {
id = id + 1
radio.setGroup(id)
}
basic.showNumber(id)
})
basic.showLeds(`
. . # . .
. # # # .
# # . # #
. # # # .
. . # . .
`)
id = 0
basic.forever(() => {
radio.sendNumber(0)
basic.pause(1250)
})
......@@ -11793,118 +11793,195 @@
:10FFF0000000000000000000000000000000000001
:020000040003F7
:10000000708E3B92C615A841C49866C975EE51978B
:1000100049B00E145698C1B1618C335D2797199D74
:100020000300820300000000000000000000000048
:1000300002E00000FFFF000000B560B400F094F89B
:1000100049B00E145698C1B1314BC284239101935B
:100020000400EA05000000000000000000000000DD
:1000300002E00000FFFF000000B560B400F0F2F83D
:1000400000F003F860BC00BD01BE00B53068800759
:10005000FAD40020F9F718FD01B47068F8F788FFAA
:1000600001BC70600020B060002000025A30E9F747
:1000700093F901B4012002BCF8F74AFC0020000209
:100080007C30E9F789F901B4022002BCF8F740FCA2
:100090000020B060B068E9F767F8B0689621E9F72A
:1000A00055FA002000029E30E9F776F9E9F70EFBD9
:1000B00000BD0000FFFF000000B560B400F054F880
:1000C00000F003F860BC00BD01BE00B530688007D9
:1000D000FAD4B0680021F9F797FC002806D0B06880
:1000E0000121401AB060B068E9F73EF8B068962187
:1000F000E9F72CFA00BD0000FFFF000000B560B476
:1001000000F032F800F003F860BC00BD01BE00B59D
:1001100030688007FAD4B0680921F9F75EFC00283E
:1001200006D0B06801214018B060B068E9F71CF84B
:10013000B0689621E9F70AFA00BD0000FFFF000051
:1001400000B560B400F010F800F003F860BC00BD2A
:1001500001BE00B530688007FAD4B068E8F71CFF2C
:100160009620F9F77CFA00BD00B50546E9F73AFCA0
:10017000064600BD00000000000000000000000076
:1001800041140E2FB82FA2BB9F00D3040000000023
:100190007B22636F6D7072657373696F6E223A2292
:1001A0004C5A4D41222C2268656164657253697A0C
:1001B00065223A3332342C227465787453697A6537
:1001C000223A383537352C226E616D65223A22424B
:1001D0006561636F6E2D5363616E6E6572222C22B2
:1001E0006555524C223A2268747470733A2F2F6D01
:1001F000616B65636F64652E6D6963726F626974AC
:100200002E6F72672F222C2265564552223A2230D9
:100210002E31342E3334222C22707874546172675C
:100220006574223A226D6963726F626974227D5D22
:1002300000008000C322000000000000003D88890B
:10024000C65436C3174FE4DC319A4260734A98951E
:10025000FEEAF8B6AA3BF6E16DABDCB898B452BA48
:10026000E4A1D962007DDD9AE251CEE760792716DC
:10027000C629DB66551C616E79E5AE9D5120F34BB6
:1002800021FF279BF492EA2699659B2955D39581F6
:1002900095C02BEF5E19DDD2A7E0672A2FC2700C44
:1002A000F7D5EA27D9F9626BD63D6079F0CF04E43F
:1002B000F46E51F0898C96E84FF956E6EFD4D96187
:1002C0003B133259DA27B050A7383CA455DB153B15
:1002D000908DE45630C53BF6E25C6B3D34B9E902E3
:1002E0001F24E87E0A946121BC4B8EEEF2C0D63505
:1002F00013D6B467C63F813921463A662BCE2AF41D
:100300009C73D49017CB68A099503CC6E3455B0F13
:10031000697B892A33543ADF5EB5731738660395D3
:100320003C6E29C9F92105E8FEDC7F7EC7EFA340BA
:10033000B00B2B3965486E508A977721C6CA5BD0BF
:10034000E85B8C3DC5E06C93D2772D628931ED136B
:10035000A533161390754E81F55D846D70CF2A1FFD
:10036000A36793C5E14710CA729DA6D4284F0B75A9
:1003700088154D4F2C2D2DEE425CF4A2391A2AF22D
:10038000DB340AE2D87F4DDBE112DD54E73465D877
:1003900052E00237B2D0F1E35DE6DC2CAF145964D1
:1003A00038AEA57C6F348D6B343DA49C82AC18674D
:1003B0006634BD61128943F6F5B5E23A5DD9E0E7EE
:1003C000019D4835F7CA4F43E27510E3B1A616FC0C
:1003D00075C86A6BC08FD6092F1D38E0947774A555
:1003E000D147605369B34F2FA1C901F8D4FA6021F6
:1003F00073C0E89AC37EC7903A7DFF43EC0055B0C6
:100400000A01F2962E8768557A78C5549C94B98D66
:100410003788600C5F73C8AE831358F89CFEEEE219
:100420005FE70B0F8E5165DCC616BFFE613D274DA1
:1004300081C10CA38040D370C5C8C1E9C9101ED6C4
:1004400054AC3417F14B51C474013837843D57AE66
:10045000469C03A233EAAB3E69923965E446EE8DD1
:10046000CBDACA30CA9AE95180EABCF2DE2630986B
:10047000D916F8CDA4BA7A6AC5F4C804E6191AF0F8
:100480006ECE9CB25F3D07065346A79A3D02470FCA
:10049000253D04EBC21D879BF5873C9113CA0031B3
:1004A000A21DA1E2C86A9709053981E8D6F687AC92
:1004B0006C16DFCE5D84AAFE254C0FA1E449FC8BAF
:1004C000C8D63A4FBFB81CEFA0CD75D63ACF4589F4
:1004D000E0D6D74D4AF55D5B34A5AD2DAB93349591
:1004E000F352744BA8CDE60821D957BFC9CA6CEEA8
:1004F000EE66A97D812C96BAC4845C7ECBFA58182E
:10050000C206BEA64953A214615ECB81FF9A6E87D4
:100510004CE300D07414425D416E2D10A6B2050468
:10052000FF5ACB08E91ADAEC64F4368119677817B8
:100530001DCE2BBFB30184955121CA45B924B8FE05
:10054000F4C2252CEE6B05852076D4B477CC043428
:10055000D9F8A24B01F097CA5C0B458C8E8ECD7AF0
:10056000414A54CAEEA087307B42C83552DA37C8B8
:10057000B42BC9EB9C75CCF30958E46894D1972847
:10058000AE7A7B4D64A25D8602CB9F7CA713E427E5
:100590004C88F394250BAF93098DC633273B00514C
:1005A00028C116911412C258A7BB284564B7887D8C
:1005B000143B89A9A2FCDADD14F76BE240AFC577E2
:1005C00009288DB37BCC6AE39E88C1D171B84A7D7E
:1005D000AF3D8EF83CC4C6EB7BE2B2FB81439E4F3D
:1005E0002C9129AC8A4EE1FE6DD2664DDE20E435B9
:1005F0007C46249E3D2798989855A768031699CA6B
:10060000BBFA91C1EF30A33F684F27138855B9FC5F
:10061000F9217FD9FDB255EAEBB0E31CCDDE1139EB
:10062000DD10AACE01D2D4C22C4BB6CA714055CD32
:10063000BA580F4E805EC19D87ED71F247D46DEDC3
:10064000EF1154EBB4CDF5F238C26A7BC4EC6ECF37
:10065000479B7FEA6660DC613C4DD4CA21ACDC522A
:1006600023376DFCE4238250017A62EDEB882C6124
:100670001BB04643698A71C86FB9193577C2CCB7C8
:1006800082B1EB7CE36B5B5CB609BEE8365B162E91
:10069000A89303847FCD13F6CED18E5F544FB967F4
:1006A00000E5B051C90392695B180AB9A73A8B2AD1
:1006B000DC0FFFDDB5C56B4C38BB1D09E9C384D920
:1006C00071C66AA1D0DE4A97325D742ADFBEAD1CC6
:1006D0006305B82DF06A592E3F9EB81E6AEC9C5AED
:1006E0004394C60C1E8540C07BFC4F137B6098C0B2
:1006F000371592309FBA8704C840C3A6C1FFCF29DF
:10070000595B000000000000000000000000000035
:1000600001BC70600020F0600020B0600020000241
:100070005C30E9F791F901B4012002BCF8F748FCC3
:1000800000200002DA30E9F787F901B4022002BC4F
:10009000F8F73EFC0120B0600120F060F068E9F75D
:1000A00063F800F034F800200002FC30E9F774F93E
:1000B000E9F70CFB00BD0000FFFF000000B560B4D5
:1000C00000F0B0F800F003F860BC00BD01BE00B560
:1000D00030688007FAD4B0680A21F9F77EFC00285E
:1000E00004D0B06801214018B06001E00120B06088
:1000F00000F00DF800BD0000FFFF000000B560B487
:1001000000F090F800F003F860BC00BD01BE00B53F
:10011000002001B401B430688007F7D4E9F794FAFD
:100120000020009000980921F9F75DFC002819D003
:10013000B0680099F9F768FC00280ED000980521F6
:10014000F9F76FFC01B401980521F9F76EFC01B4D1
:10015000019802BC01B0E9F795F800980121401818
:100160000090DFE70020019001980921F9F73BFC9E
:1001700000281DD0F0680199F9F746FC002812D03C
:1001800001980521F9F74DFC01B4042002BC401A86
:1001900001B402980521F9F748FC01B4019802BCAA
:1001A00001B0E9F76FF80198012140180190DBE7F1
:1001B00002B000BDFFFF000000B560B400F032F8EF
:1001C00000F003F860BC00BD01BE00B530688007D8
:1001D000FAD4F0680A21F9F700FC002804D0F0688E
:1001E00001214018F06001E00120F060F068E8F7BC
:1001F000BBFFFFF78CFF00BDFFFF000000B560B440
:1002000000F010F800F003F860BC00BD01BE00B5BE
:1002100030688007FAD4B068E8F7BEFEFA20F9F734
:100220001EFA00BD00B50546E9F7DCFB064600BD39
:1002300041140E2FB82FA2BB9E00F408000000004E
:100240007B22636F6D7072657373696F6E223A22E1
:100250004C5A4D41222C2268656164657253697A5B
:1002600065223A3332322C227465787453697A6588
:10027000223A31393239322C226E616D65223A22AE
:10028000426561636F6E2D46696E616C222C22653A
:1002900055524C223A2268747470733A2F2F6D6154
:1002A0006B65636F64652E6D6963726F6269742E2E
:1002B0006F72672F222C2265564552223A22302E29
:1002C00031342E3334222C22707874546172676575
:1002D00074223A226D6963726F626974227D5D00D7
:1002E0000080009E4C000000000000003D8889C690
:1002F0005436C3174FE4DC319A4260734A97A73EE5
:1003000041514949D493A1DDCBC91A3B25EE790867
:100310007006EB1B368F8D30C1615EA63E91E617ED
:100320005431F9F05BD9CB60FE7DA644C957586CB7
:100330003B82088C0BE3770B123020099376302533
:100340001A17366E1E97D7BAF38B7D6BD2A0A67D97
:100350009E42C132ABC06EDCDD671CC96A010AFD7A
:10036000BE274249E2303D86E54BF2D3E4712104D9
:100370009EDFBE3BBC7D96812028CC2319B8C4E506
:10038000ADEAB872CF02E414FDD4B27FC1DF957E2E
:1003900075E8C5067E7EA1DBB09F29F6B9AE81CB9C
:1003A00036B889878F0307DDA79F48D06915353D8B
:1003B0006F73A9305936B4E7E42DF9B7266ABAF459
:1003C000D3910889DF60A0159490BD2BDF091C92A2
:1003D000FD3DE838014DBC0EA5832D0CECA698FC24
:1003E000B22A35DCD980B2EFB4FF14A77AA6B9D20D
:1003F00061DDF7F7D015AF2598623CFF22C9782D53
:1004000003111100CFB79E394EEC5CBCD0EC1648FE
:10041000122B8F1A9ADC6EFBDA56949B53D3ECE1C5
:1004200022B5913CC05078EB22C336B1B878294050
:10043000BE0ED50C3C31D2E4AC740902FC9DF088B0
:10044000EAD24B7F19AF0C1E4CD8AA23D5D2B5F0F7
:10045000A9B9FD0F98159BDBDDC3383392AA4B6B0E
:1004600023A44041D7700F5CB9F9F76B76CD019B9F
:100470007164B5B7FE8ECA7CC6C1EBA2C176089C7A
:1004800018DB93DA9009543445EB7900FBB30EE6A0
:10049000B859605F7558B0D335D9E20BB713B88B34
:1004A000C337206F3DD1FB76432710E9AEC23A7BBC
:1004B0001E013009A3126AE0F0BBAB5499DE08F1CB
:1004C000FDB0CB04D7C51B70CCCE286541280F8A60
:1004D00037F6484D404364140026F45B3413FBC0E8
:1004E0007CF0E52C473A5B162EBB216EEC8864F954
:1004F000F173A58B92CB81442DBB9B9BD59572AAA2
:10050000A2CF992ABD41839030CA4826A6EB578CCA
:10051000DCC1128E29D94F7B6A5291C032B9933F08
:100520000669B8B1F5F2B4D244A59F4DC137EB349A
:10053000119F9B5DDED5626C706AC6E6B6FB1CEE51
:1005400054BF852B4C84D0A2444A57DBFF3C9367B1
:100550000267E89545295A1DB211B6B72019D4444F
:1005600006D0B88BC87FD6A5A7DBE06F4005EF1497
:1005700051AD57785A134841643B0BB65D1EBCC958
:10058000B56963169AEE59F67AE12F515204931821
:1005900074822D402316FB43928F2C929D62AF20D4
:1005A000D53BF7023DE30F7CB5A98B5C868D4EDC15
:1005B000BFD0216E75D6CBDC5F3B46A77696433D18
:1005C000A3F81F0972635BD5C7826F50650AA21733
:1005D0003DC46DD9B3F3AA14DB002B585774614E98
:1005E00001FF9BC824AE88C56E3E09800693A773A1
:1005F000FAE127D7750E585027C54B1A65BABB7C50
:100600006B712573C1AB5522B338328084F94CD558
:10061000D2A0EAEADA54B2B0FA45B6B95DDAF378B4
:1006200071DBFA8EF32396A989B7E76472AC9572F1
:10063000FCFB54DA8A2C8CB42196D908E01E629413
:100640002C8110192152C32448902421651EA6C074
:1006500077EB6D090A15322E9CB37BE8E696397666
:1006600057B68C95CE4C290B55389D51A5EC7B6720
:100670001EB14AE72516136FB541ED349C42132C89
:100680001B499516A76A08326F6A63366E3DA1282A
:10069000A849212BFE691EC24077CC94D9EF7A2D50
:1006A0001202851622F16FB7716965AEB5691D3703
:1006B000702D4252129BB7F738A064AF3E44F685C6
:1006C00053BC4D0C81C378F6E54DD2F00F3A11FAC8
:1006D000B85FA7D65F783018522FEC59FCB88174F8
:1006E0002C89CAE4ABBD29F16E654DFB494E4659D4
:1006F000D7D5EE8AB4C43C6BB6A49B5095F6C7AB75
:1007000086092612FB9423E37D29EAB2F0BE4E55FA
:1007100040C091EECC41C53F1D1DB214C5FE1872FC
:10072000FCAEEC4FFBE5761BE63497339F960FAE9D
:1007300051FC2CF03FEF24B8B4A9D22BD2741FA0E7
:1007400095E95704445C945B536CB63B548FCCE7FB
:100750002E598AE98EC94E1FD422C40A44B00BC94F
:10076000115EFC2522C09E1DB9DDCA3F74120BD458
:10077000E92A6C9B44DD50D2691383F06D889D7E1D
:10078000E69E353F9384E96B07D50DCE3CE23129D7
:1007900068692972043C2B0780D1EB534AF0BC54A2
:1007A000F958C57B038DF6ED7486628F9F4FE8364E
:1007B0002C9FF8FE41CB3C1EE8520241FABFCCE828
:1007C0004116CEF24C140CFAA6AC88F09EEE0AED5F
:1007D0009721B80ED38B74AADFB2319D5E75AAE55E
:1007E000DCD6C4BFA87800B7A0836A39240DD15ADB
:1007F0009EE6E74998E71166DD063DC0DC8E677529
:10080000791BC881429B9B2C04783CDF464943629C
:100810005406D83C732F4E86CC0EF55CE56B245203
:100820003CA32DE71BF9687810FA8738EFF8D5213B
:10083000439176906E2BB75B1806D394B564AA9457
:100840005A665BFBC97ECE8DCA1B7052F6F98310C7
:10085000D7AB6362649DC5027F9FBEC28CCF979861
:1008600027B66065438BFF1E7244A61F089144D9CA
:1008700067A170E67321B0BF92203FAFB6086CC18C
:10088000D9DA61AA0C94854B20806ECAA18A535A8A
:10089000CDEDC5E86CF1F5680264259035A312CB67
:1008A00077D7F99840B42810D8ECF3C8E22AAABF49
:1008B000D0B4300EA1EB67E70B5771E305B1C36D00
:1008C000E0624A876A30BB09B4082CACAF2AC40F77
:1008D0006BFF13EF293294947A2BBD10C218CDC749
:1008E00098DEB1839084942E40B71E4AEFABEA7E27
:1008F0005317831FD893CEF373FC1F36F708070CEA
:100900004282B9675A7B150C2F54681153D46A2B55
:100910001EBBA58D3E2A97A9D18E3A7CFECAF03720
:10092000BC6812DAC94CCE5973186877610D6CD463
:10093000609B4A4C61D77592AFAFEDA2A7F2C4CBD2
:100940002DBAADC1DEF071E5EB4FAEF6A18B70595B
:10095000B8526C2EB99BA28B468E22EBD46E1C0E25
:1009600025E958D269C4086D02EB66837933BB551B
:100970001055743048301008C9A1A16DDBF1EC802E
:100980007E3D71275210EDA18296710F91F29B5E10
:100990001E122CF9CBE529A9F44733F36C1B96847E
:1009A0002E959533C1DF90F3C1F656A790780037A6
:1009B00087ACF689D1F4162F636E59518DCEA0A362
:1009C0004E41DAC0C606175F33CB913D395B085301
:1009D000934CDFBECAA1DA0E52F53C53F24CE9D17A
:1009E000BFFE55A9C5E7EFD9612324E9537CD36A3B
:1009F0004E9DB4B065BF8F32012983362DB7BAA999
:100A000002EE68FCAF5A7CE451774234CD7C2495E9
:100A10000E87D053D23D0CCE34BFD6BF304C5ADAFD
:100A20004A9022BDFE0FBD0FF5EA0B546A48C8DBA1
:100A300028EF128444E554E7C4848B089671F1CA08
:100A400013CFD06E889A2E4999F8975FAFABC52225
:100A50000AEFB54E6B41F2976A4B074696FDCB39CC
:100A60001F9E6B576C07340A3BDFBF8146DDFF21B9
:100A70007D7A516012F6A384149B22E78857C4CA7A
:100A80002D5FA8DCBA8875AF45AAEB8FB3DDB5E55D
:100A90001199E55CC1E14AC8ACF61750778E861013
:100AA000291BDAA227B392F5C712BB5D67389A5E9D
:100AB000B17434B2691D63FDD9D8985E8A5A1FE8B3
:100AC00049ACB79EBF274E3D4B8F51BF75B7E86904
:100AD000620D42AEA9219E332B7987EBD501A6CBBF
:100AE000EF376D0C432ECB2B0EAF54F16A7DA3452F
:100AF000B1CBBEA2E1FB1832FBEE421612471E0C30
:100B0000B91CD522025E0A6D739B7266F73D04CB59
:100B1000EF4375918AD2D99C3EACB07CAC75048809
:100B2000E5B69C967C3F5A7F08E2AFB32718EE6B80
:100B30006E1D23C2E34A55FF6A2C800BA67AF94B3F
:100B400000285AD443A690AB7538E9C5211DC5A627
:100B50009AEDA5DB5837BA8530BBDE2AFED9392598
:100B60005DF7F848F30E619C6F3BF6B47FB3938753
:100B70003275D3F59A9E299BFA3E877AD5FD280DCA
:100B80003756FCECB82148CD3638F18F64C20CF9E9
:100B9000AC3573728AD9867F81ACE2718613FE818F
:100BA000EDAECF080D53F97E85B18AE58AD6D2E441
:100BB000A87C6D86BF88E6F09FD638993B38C6C7BB
:100BC00021B055B45E0B812939CB582906FFFAC5EF
:100BD000F13D0000000000000000000000000000E7
:020000040003F7
:10C00000903C002061DC030073DC030075DC03005E
:10C010000000000000000000000000000000000020
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment