Skip to main content

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.2.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

robot_kit-0.1.2-py2.py3-none-any.whl (12.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file robot_kit-0.1.2.tar.gz.

File metadata

  • Download URL: robot_kit-0.1.2.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.4

File hashes

Hashes for robot_kit-0.1.2.tar.gz
Algorithm Hash digest
SHA256 58c6f21546587d12e7c1c0d2b17866237569e97222435249a5135bdf03c0ef5c
MD5 ef8abf56a6777af18b1232ececee3ff1
BLAKE2b-256 b586545b201b211b06e135a2e0ec9445b9b3a1d91f741bb720dcbaa626eac181

See more details on using hashes here.

File details

Details for the file robot_kit-0.1.2-py2.py3-none-any.whl.

File metadata

  • Download URL: robot_kit-0.1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.4

File hashes

Hashes for robot_kit-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f08ca8905f06c87eb033aa5c84d8b57245c92a02c96c74bd2d6f18f34fea8669
MD5 fcffbae018f9e210de60aff743a810cb
BLAKE2b-256 d90e390227381b6d6dfd4cd8b625d40e0f7daba27c731ac371f3d0a496528249

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page