MCPcopy Create free account
hub / github.com/DexterInd/GoPiGo3 / setup_default_broadcasts

Function setup_default_broadcasts

Software/Scratch/GoPiGo3Scratch.py:946–963  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

944
945
946def setup_default_broadcasts():
947 s.broadcast('READY')
948 s.broadcast("forward")
949 s.broadcast("backward")
950 s.broadcast("turn left")
951 s.broadcast("turn right")
952 s.broadcast("stop")
953 s.broadcast("open eyes")
954 s.broadcast("close eyes")
955 s.broadcast("blinkers on")
956 s.broadcast("blinkers off")
957 try:
958 sensors["Encoder Left"] = gpg.get_motor_encoder(gpg.MOTOR_LEFT)
959 sensors["Encoder Right"] = gpg.get_motor_encoder(gpg.MOTOR_RIGHT)
960 s.sensorupdate(sensors)
961 except:
962 pass
963 # we tried. No big deal if we fail (happens on creating a new file)
964
965##################################################################
966# MAIN FUNCTION

Callers 1

GoPiGo3Scratch.pyFile · 0.85

Calls 1

get_motor_encoderMethod · 0.45

Tested by

no test coverage detected