ADEEPT AWR Wheeled Robot Manual page 118

4wd smart robot kit compatible with raspberry pi 4 3 model b+ b, opencv target tracking
Table of Contents

Advertisement

109
import
socket
'''
Some settings related to LED lights come from the WS281X routine
Source Code:https://github.com/rpi-ws281x/rpi-ws281x-python/
'''
LED_COUNT
=
24
LED_PIN
=
18
LED_FREQ_HZ
=
800000
LED_DMA
LED_BRIGHTNESS =
255
LED_INVERT
=
False
LED_CHANNEL
=
0
'''
Process arguments
'''
parser = argparse.ArgumentParser()
parser.add_argument('-c', '--clear', action='store_true', help='clear the display on exit')
args = parser.parse_args()
'''
Create NeoPixel object with appropriate configuration.
'''
strip = Adafruit_NeoPixel(LED_COUNT, LED_PIN, LED_FPEQ_HZ, LED_DMA, LED_INVERT, LED_BRIGHTNESS,
LED_CHANNEL)
'''
Intialize the library
'''
strip.begin()
'''
Next is the configuration related to TCP communication, where PORT is the defined port number, you can choose freely
from 0-65535, it is recommended to select the number after 1023, which needs to be consistent with the port number
defined by the client in the PC
'''
HOST = ''
PORT =
10223
BUFSIZ =
1024
ADDR = (HOST, PORT)
tcpSerSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
=
10

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the AWR Adeept Wheeled Robot and is the answer not in the manual?

This manual is also suitable for:

Picar-b

Table of Contents

Save PDF