micropython_ir: Bad Block with 2 Pi Pico W's on v1.22.1 uP
Howdy.
I have 2 raspberry pi pico W’s running:
MicroPython v1.22.1 on 2024-01-05; Raspberry Pi Pico W with RP2040
sitting a few inches away from each other.
- The first is using a TSOP4838 4838 IR Receiver
- I have tried the same test(s) with an EK8460 Receiver
Am able to run from ir_rx.test import test; test()
on the the first and point a IR remote to it and get data back if I press “OK” or any button whatsoever:
i.e Data 0x40 Addr 0x0000 Ctrl 0x00
Life is very joyful…
Next, I take the second pi pico and an “Adafruit High Power Infrared LED Emitter - STEMMA JST PH 2mm” and perform:
from machine import Pin
from ir_tx.nec import NEC
nec = NEC(Pin(15, Pin.OUT, value = 0))
nec.transmit(0,1)
(I’ve tried powering with 3.3 and 5.0 Volts - pin 36 and 40 respectively.) I have the proper stemma connectors and have DC power to the V+ power in, ground for ground, and then a 3-5V logic level signal on the input pin as per Adafruit.
I see the red led light up on the adafruit emitter and instantly I can see the the first/pico receiver reports back “Error: bad block”.
If I use the acquire method, I get some data back for nec.transmit(0,1)
:
>>> from ir_rx.acquire import test
>>> test()
Waiting for IR data...
000 8949
001 7174
002 1837
003 550
004 578
005 527
006 607
007 553
008 579
009 552
010 578
011 553
012 579
013 1680
014 582
015 1684
016 581
017 1683
018 552
019 1711
020 550
021 1690
022 574
023 1685
024 579
025 1708
026 7657
027 526
028 922
029 394
030 1263
031 151
032 297
033 500
034 604
035 528
036 605
037 528
038 604
039 524
040 606
041 526
042 607
043 1683
044 581
045 1683
046 553
047 1707
048 555
049 1685
050 578
051 1684
052 552
053 1709
054 553
055 1712
056 549
Unknown protocol start 8949 7174 Burst length 57 duration 70952
[8949, 7174, 1837, 550, 578, 527, 607, 553, 579, 552, 578, 553, 579, 1680, 582, 1684, 581, 1683, 552, 1711, 550, 1690, 574, 1685, 579, 1708, 7657, 526, 922, 394, 1263, 151, 297, 500, 604, 528, 605, 528, 604, 524, 606, 526, 607, 1683, 581, 1683, 553, 1707, 555, 1685, 578, 1684, 552, 1709, 553, 1712, 549]
For fun, I’ve tried sending all sorts of values. (have tried researching the NEC protocol and read some issues in this repo but I figured the second pico should report something other than 'bad block? - I claim no expertise here…)
My goal is to just send ‘any’ data really via IR from the first pico to the other. Then once received I can do things like turn an led on/off or call up the President (j/k) or what have you.
Apologies for my lack of EE training, I hope it is clear.
Thanks for any guidance
About this issue
- Original URL
- State: closed
- Created 5 months ago
- Comments: 16 (7 by maintainers)
I’ll close this as complete, but to add a couple of general points: