  FAILS P2 Rx
#   624,000 =  65x 9600 baud  GOOD (Serial test proven)
#   499,200 =  52x 9600 baud
#   480,000 =  50x 9600 baud
#
baudRate = 624000
print_line('Baud rate: {:,} bits/sec'.format(baudRate), verbose=True)

serialPort = serial.Serial ("/dev/serial0", baudRate, timeout=1)    #Open port with baud rate & timeout

queueRxLines = RxLineQueue()

_thread.start_new_thread(taskSerialListener, ( serialPort, ))

sleep(1)    # allow threads to start...

# create our motor interface handing it our serial port to use
wheels = BLDCMotorControl(serialPort)

# a quick method using wheels lack-of-motion to determine when
#   can ask motors to do another command...
def waitForMotorsStopped():
    bothStopped = False
    priorLtCt = -1
    priorRtCt = -1
    while bothStopped == False:
        # get status
        # PUB getRotationCount(rotationUnits) : leftRotationCount, rightRotationCount
        ltCount, rtCount = wheels.getRotationCount(DrvRotUnits.DRU_HALL_TICKS)
        print_line('- counts {}, {}'.format(ltCount, rtCount), debug=True)
        #while not stopped loop
        # get "stat" response (lt and rt status)
        # if both are stopped the set bothStopped = true
        if priorLtCt == ltCount and priorRtCt == rtCount:
            bothStopped = TRUE
            break
        priorLtCt = ltCount
        priorRtCt = rtCount
        sleep(0.20) # wait for 1/5 second before asking again...

# run our drive pattern
try:
    # wait for runtimeConfig to get our hardware ID from P2 (saying it's alive)
    print_line('- waiting P2 startup', verbose=True)
    while not runtimeConfig.containsKey("hwName"):
        sleep(0.5) # wait for 1/2 second before asking again...

    print_line('- P2 is alive!', verbose=True)

    # -------------------------
    # configure drive system
    # -------------------------
    # override defaults, use 100 %
    wheels.setMaxSpeed(100)
    wheels.setMaxSpeedForDistance(100)
    # and don't draw current at stop
    wheels.holdAtStop(False)

    # -------------------------
    #  drive a square pattern
    #   3-second sides 75% power, 90° corners
    # -------------------------
    # forward for 3 seconds at 75% power
    desiredPower = 75
    lengthOfSideInSeconds = 3
    dirStraightAhead = 0
    wheels.driveDirection(desiredPower, dirStraightAhead)
    wheels.stopAfterTime(lengthOfSideInSeconds, DrvTimeUnits.DTU_SECS)
    waitForMotorsStopped()

    # hard 90° right turn
    #   [circ = 2 * PI * r]
    #   rotate about 1 wheel means effective-platform-radius is actual-platform-diameter!
    #     dist to travel = (effective-platform-circumference / 4) / wheel circumference
    #     effective-platform-radius = 17.5"
    #     wheel diameter = 6.5"
    #     travel dist is 1.346 rotations
    #     rotations * 90 = 121 hall ticks
    dirHardRightTurn = 100
    ticksIn90DegreeTurn = 121
    wheels.driveDirection(desiredPower, dirHardRightTurn)
    wheels.stopAfterRotation(ticksIn90DegreeTurn, DrvRotUnits.DRU_HALL_TICKS)
    waitForMotorsStopped()

    # forward for 2 seconds at 50% power
    wheels.driveDirection(desiredPower, dirStraightAhead)
    wheels.stopAfterTime(lengthOfSideInSeconds, DrvTimeUnits.DTU_SECS)
    waitForMotorsStopped()

    # hard 90° right turn
    wheels.driveDirection(desiredPower, dirHardRightTurn)
    wheels.stopAfterRotation(ticksIn90DegreeTurn, DrvRotUnits.DRU_HALL_TICKS)
    waitForMotorsStopped()

    # forward for 2 seconds at 50% power
    wheels.driveDirection(desiredPower, dirStraightAhead)
    wheels.stopAfterTime(lengthOfSideInSeconds, DrvTimeUnits.DTU_SECS)
    waitForMotorsStopped()

    # hard 90° right turn
    wheels.driveDirection(desiredPower, dirHardRightTurn)
    wheels.stopAfterRotation(ticksIn90DegreeTurn, DrvRotUnits.DRU_HALL_TICKS)
    waitForMotorsStopped()

    # forward for 2 seconds at 50% power
    wheels.driveDirection(desiredPower, dirStraightAhead)
    wheels.stopAfterTime(lengthOfSideInSeconds, DrvTimeUnits.DTU_SECS)
    waitForMotorsStopped()

    # hard 90° right turn
    wheels.driveDirection(desiredPower, dirHardRightTurn)
    wheels.stopAfterRotation(ticksIn90DegreeTurn, DrvRotUnits.DRU_HALL_TICKS)
    waitForMotorsStopped()
    # -------------------------

finally:
    # normal shutdown
    print_line('Done', info=True)
It takes just a little to give back a lot, and no matter where you live, you can help fight hunger in your community during the month of September.
AARP Virginia supports 2022 Hunger Action Month, and collection sites statewide will accept food for community food banks and food pantries. AARP Chapters and Virginia Retired Teachers Association units across the Commonwealth are organizing food drives in their communities throughout September to aid local food charities.
You can help right where you live! Individuals and organizations interested in joining the effort can spearhead a food collection event in their community. You can also help by identifying food collection sites, getting the word out about the food drive and staffing food collection sites. It’s a great project for clubs, faith organizations, schools and other groups.
A 5-1 thrashing of Livorno was enough to secure Crotone's place in Serie A for the first time since 2017-18.
Crotone president Gianni Vrenna led the celebrations on Friday after his side secured promotion back to Serie A.
A 5-1 thrashing of Livorno and Spezia's draw with Cremonese saw the Pitagorici seal a top-flight spot for just the third time.
Crotone finished 17th in 2016-17 but were relegated a year later.
"This Serie A [promotion] is perhaps the most beautiful success since I've been at Crotone," Vrenna said, as quoted by Tuttomercatoweb.
"We need to enjoy this day of celebration and then let's try to finish the league in the best way. Then, we'll start planning for next season."
Crotone, who have scored a club-record 62 goals in Serie B this season and enjoyed a 12-game winning run, will join Benevento in moving up to the top tier next term.
They host Frosinone on Sunday before concluding their 2019-20 campaign away to Trapani on July 31.I often wonder if other people struggle with maintaining faith in this counsel from the Bhagavad Gita as much as I have over the past several years. Each time I become aware of another horrific story of people enduring great trauma, I have to remind myself that somehow, in some way, whatever is happening is happening for the good. Even when it defies my mind’s ability to comprehend.
After all, while it may have a strong gravitational pull, the doom and gloom perspective doesn’t serve anyone. Since we all walk this earth with one foot in the world of matter and the other in the invisible world, I find I feel more balanced when I am able to allow that there’s both horror and beauty in our world. But that steadiness doesn’t come without awareness.
When I do get caught up in the darkness and catch myself, I’m grateful for the moment as an opportunity to begin again. That is, to re-member who I am and that I am here to bring what only my individuated spark of infinity can contribute. All that is asked of any of us is to give the best of ourselves to the specific role we play in bringing heaven to earth. Still, it takes astuteness to prevent self-degradation when our best is below the standard we strive to uphold. No worries. We have the support of each other to assist in the re