Robot Kit
Project description
robot_kit
Having fun with the Freenove 4WD Smart Car Kit
Install
SSH to your Raspberry Pi and install the Python module for Python 3.
$ sudo pip3 install robot_kit
Examples
See the Examples directory for all the code, here is the code listing for examples/robot_start.py
from robot_kit.leds import NeoPixelStrip
from robot_kit.wheels import Wheels
from robot_kit.ultrasonic import Ultrasonic
import time
if __name__ == '__main__':
"""Run some of the basic commands for robot_kit"""
"""Test for the NeoPixelStrip class"""
led_strip = NeoPixelStrip()
# Turn the LEDs Yellow and then Green
led_strip.on(128, 128, 0)
time.sleep(1.0)
led_strip.on(0, 255, 0)
time.sleep(1.0)
led_strip.off()
# Turn the wheels
wheels = Wheels()
wheels.all(0.25)
time.sleep(1.0)
wheels.stop()
# Get the distance from the Ultrasonic sensor
dis_sensor = Ultrasonic()
for i in range(50):
print(dis_sensor.get_distance())
time.sleep(0.5)
Note: Yon order to run this code you'll need to be sudo as the LED library requires it.
$ sudo python3 robot_start.py
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
robot_kit-0.1.5.tar.gz
(7.5 kB
view details)
Built Distribution
File details
Details for the file robot_kit-0.1.5.tar.gz
.
File metadata
- Download URL: robot_kit-0.1.5.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c00668aea2ed2631fa191697964ff99456e1e350d5854ef8951fb33ee9bcbee |
|
MD5 | 2c92484c389203231b546e4a0d34699e |
|
BLAKE2b-256 | 5d9f56fd7748aea1db43612bc0476edc0bca74eb4d653962e4f1824ec0d5f641 |
File details
Details for the file robot_kit-0.1.5-py2.py3-none-any.whl
.
File metadata
- Download URL: robot_kit-0.1.5-py2.py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8e407389f8f8f03835fa5a581d51bfd7c00860a0547baa77cbb48b2f66765be |
|
MD5 | defa1ee9fd2aa1352ab88c9bee4184d8 |
|
BLAKE2b-256 | 14422976e536e932f5dcf80d45d6df504c93c250e87df5fc0514cf1f7875f9ce |