|
@@ -14,6 +14,7 @@ with cc1101.CC1101(lock_spi_device=True) as transceiver:
|
|
|
# transceiver.set_preamble_length_bytes(2)
|
|
|
# transceiver.set_sync_word(b"\x12\x34")
|
|
|
# transceiver.disable_checksum()
|
|
|
+ transceiver.set_output_power_levels((0, 0xC0)) # OOK modulation: (off, on)
|
|
|
print(transceiver)
|
|
|
print("state", transceiver.get_marc_state().name)
|
|
|
print("base frequency", transceiver.get_base_frequency_hertz(), "Hz")
|
|
@@ -24,6 +25,7 @@ with cc1101.CC1101(lock_spi_device=True) as transceiver:
|
|
|
if sync_mode != cc1101.SyncMode.NO_PREAMBLE_AND_SYNC_WORD:
|
|
|
print("preamble length", transceiver.get_preamble_length_bytes(), "bytes")
|
|
|
print("sync word", transceiver.get_sync_word())
|
|
|
+ print("output power level settings", transceiver.get_output_power_levels())
|
|
|
print("\nstarting transmission")
|
|
|
transceiver.transmit(b"\xff\xaa\x00 message")
|
|
|
time.sleep(1.0)
|