Exemplo n.º 1
0
electrolyzing = False

interval = 3  # Number of seconds between each transmission
repetitions = 5  # Number of total times you want to transmit the pattern

downlink = bytes(
    input("Enter signal you want to downlink (e.g '\\x08\\x07\\x00\\x00)':"),
    encoding='utf-8')
downlink = downlink.decode('unicode-escape').encode('ISO-8859-1')
#–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
# Enter Transmit Mode

#Stop electrolyzing
if gom.is_electrolyzing():
    electrolyzing = True
    gom.set_electrolysis(False)
    print('Electrolyzers turned off')

#Set RF receiving side to low
gom.rf_receiving_switch(receive=False)
print('RF Receiving set to low')

#Turn off LNA
gom.lna(False)
print('LNA turned off')

#Set RF transmitting side to high
gom.rf_transmitting_switch(receive=False)
print('RF transmitting set to high')

#Turn on power amplifier
Exemplo n.º 2
0
    if choice in [1, 4, 6, 7]:
        duration = int(input("Duration (integer seconds):\n"))
        assert 0 < duration < 15
        if choice == 1:
            gom.lna(True)
            sleep(duration / 2)
            ps.displayHk2(gom.get_health_data(level='eps'))
            sleep(duration / 2)
            gom.lna(False)

        if choice == 4:
            gom.burnwire1(duration)

        if choice == 6:
            gom.set_electrolysis(True)
            sleep(duration / 2)
            ps.displayHk2(gom.get_health_data(level="eps"))
            sleep(duration / 2)
            gom.set_electrolysis(False)

        if choice == 7:
            gom.set_PA(True)
            sleep(duration / 2)
            ps.displayHk2(gom.get_health_data(level="eps"))
            sleep(duration / 2)
            gom.set_PA(False)

    if choice in [2, 3, 5]:
        duration = int(input("Duration (integer milliseconds):\n"))
        if choice == 2:
Exemplo n.º 3
0
hkdata = test.get_health_data(level="config")
displayStruct(hkdata)
sleep(2)

hkdata = test.get_health_data(level="config2")
displayStruct(hkdata)
sleep(2)

# testing new burwire functions

test.burnwire1(5)

# test.burnwire2(5)

sleep(3)

logger.info("Is electrolyzing?: " + str(test.is_electrolyzing()))
sleep(1)

test.set_electrolysis(True)
sleep(1)
logger.info("Is electrolyzing?: " + str(test.is_electrolyzing()))
sleep(1)
test.set_electrolysis(False)
sleep(1)
logger.info("Is electrolyzing?: " + str(test.is_electrolyzing()))
sleep(1)

logger.info("Battery %: " + str(test.read_battery_percentage()))