Skip to content
Antonio Vivace edited this page Dec 3, 2017 · 1 revision

Python API

Get started

import coderbot
bot = coderbot.CoderBot.get_instace()

Movement

Elapse is the duration, in seconds. The following commands are sync.

Backward: bot.backward(speed=100, elapse=1)

Forward: bot.forward(speed=100, elapse=1)

Left: get_bot().left(speed=100, elapse=1)

Right: get_bot().right(speed=100, elapse=1)

Sensors

bot.get_sonar_distance(i) gets the measured value from Sonar Sensor i.

Audio

pactl list

Stream to RTMP

Assuming ffmpeg and avconv are installed:

raspivid -o - -t 0 -vf -hf -w [WIDTH] -h [HEIGHT] -fps [FRAMERATE] -b [BITRATE] | avconv -re -ar 44100 -ac 2 -acodec pcm_s16le -f pulse -i [AUDIO_DEVICE_NAME] -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv [RTMP_ENDPOINT]/[AUTH_TOKEN]
Clone this wiki locally
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy