Skip to content
Prev Previous commit
Next Next commit
Imports, Formatting
  • Loading branch information
TMRh20 committed Dec 11, 2025
commit 4ea8db6cfac45fcff364c68a596afe0270371ae3
6 changes: 4 additions & 2 deletions examples_uno_q/rf24_encoderadiodetails/python/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
* The radio's power state is represented under the assumption that
the radio's CE pin is inactive low.
"""

# pylint: disable=consider-using-f-string
import struct
import time

from arduino.app_utils import *
from arduino.app_utils import App, Bridge

bufferByteArray = bytearray()


def RF24Callback(payload: int):
"""Append a ``payload`` byte to the global ``bufferByteArray``.
Invokes `print_details()` once the buffer hits a 43 byte length.
Expand All @@ -27,7 +29,7 @@ def RF24Callback(payload: int):
print_details(bufferByteArray)
# reset bytearray buffer
bufferByteArray.clear()


Bridge.provide("RF24Callback", RF24Callback)

Expand Down