Have H7R1 (firmware 4.4.1) with TV shield attached, Flir Lepton. Everything works fine through USB on the IDE, full functionality. I’m attaching a 5.8 GHz analog video transmitter (external, not the wireless video shield) and a microsd card dvr. All powered through 9v (2s in 9v form factor) li-ion battery, 9v to the VTX and to a buck converter with 5v3a output to the DVR and the VIN pin of the H7. Have a switch with some pins to set color palette, P7 and P9 pulled up to VIN. Everything soldered together, good solder joints and no shorts or anything like that.
On the IDE everything works fine, save to boot from SD card, power up, no video output on the video receiver monitor, no signal from the video pin on the TV shield (from the oscilloscope). I’ve checked all the voltages, continuity checked for shorts, measured current draw. I’ve tried this with three different H7 boards, two different TV shields, three lepton sensors, two VTXs, with and without VTX/DVR attached, different SD cards, I can’t think of anything else that I could be doing wrong. I also tried the tv.py example with the OV7725, still nothing from the video output but works in the IDE. I’m in a time crunch because I have to have this built and shipped before I go on vacation in two days or have to refund a customer their money because I’m past my handling time on eBay.
Any advice would be greatly appreciated. I’m by no means a computer science person, I’m in school for EE so I have some basic understanding of python and C, but it doesn’t work with the tv.py example which is really throwing me. It’s so frustrating because I’ve made this exact setup work a couple of years ago when I was first making the thermal cameras, I decided to go with a rpi zero design because they were much cheaper. I’m switching back to the OpenMV since I can’t hardly get the rpi anymore. When I did this the first time I used the same buck converter and batteries, same VTX. I’ve attached a block diagram I made real quick to help explain and the code is here on github.
import machine, sensor, time, tv, pyb
SWITCH_1_PIN = 'P7'
SWITCH_2_PIN = 'P9'
led = pyb.LED(1)
led.on()
switch_state_1 = machine.Pin(SWITCH_1_PIN, machine.Pin.IN).value()
switch_state_2 = machine.Pin(SWITCH_2_PIN, machine.Pin.IN).value()
current_state = 1
if switch_state_1 == 0 and switch_state_2 == 1:
current_state = 1
elif switch_state_1 == 1 and switch_state_2 == 1:
current_state = 2
elif switch_state_1 == 1 and switch_state_2 == 0:
current_state = 3
def set_init_color(current_state):
if current_state == 1:
sensor.set_pixformat(sensor.GRAYSCALE)
elif current_state == 2:
sensor.set_color_palette(sensor.PALETTE_RAINBOW)
sensor.set_pixformat(sensor.RGB565)
elif current_state == 3:
sensor.set_color_palette(sensor.PALETTE_IRONBOW)
sensor.set_pixformat(sensor.RGB565)
def handle_interrupt(pin):
global switch_state_1, switch_state_2, current_state
switch_state_1 = machine.Pin(SWITCH_1_PIN, machine.Pin.IN).value()
switch_state_2 = machine.Pin(SWITCH_2_PIN, machine.Pin.IN).value()
if switch_state_1 == 0 and switch_state_2 == 1:
current_state = 1
sensor.set_pixformat(sensor.GRAYSCALE)
elif switch_state_1 == 1 and switch_state_2 == 1:
current_state = 2
sensor.set_color_palette(sensor.PALETTE_RAINBOW)
sensor.set_pixformat(sensor.RGB565)
elif switch_state_1 == 1 and switch_state_2 == 0:
current_state = 3
sensor.set_color_palette(sensor.PALETTE_IRONBOW)
sensor.set_pixformat(sensor.RGB565)
switch_1 = machine.Pin(SWITCH_1_PIN, machine.Pin.IN, machine.Pin.PULL_UP)
switch_1.irq(trigger=machine.Pin.IRQ_FALLING | machine.Pin.IRQ_RISING, handler=handle_interrupt)
switch_2 = machine.Pin(SWITCH_2_PIN, machine.Pin.IN, machine.Pin.PULL_UP)
switch_2.irq(trigger=machine.Pin.IRQ_FALLING | machine.Pin.IRQ_RISING, handler=handle_interrupt)
try:
sensor.reset()
set_init_color(current_state)
sensor.set_framesize(sensor.SIF)
sensor.skip_frames(time=5000)
sensor.set_vflip(True)
except:
print("sensor error, resetting...")
for i in range(9):
led.off()
time.sleep_ms(100)
led.on()
time.sleep_ms(150)
machine.reset()
else:
print("successfully initialized")
clock = time.clock()
tv.init(type=tv.TV_SHIELD, triple_buffer=False)
tv.channel(8)
led.toggle()
while True:
clock.tick()
tv.display(sensor.snapshot())