Introduction Video of Robobloq Working under Raspbian OS

Raspberry Pi is designed to be working under Raspbian OS. It can be connected to Robobloq robots by USB 2.0 cable and program the Robots to control lights, make sounds and movements. Robobloq is a powerful learning ecosystem providing different mechanical parts, electronic modulars and Arduino-based mainboards, which is fully compatible with Raspberry Pi and make cool projects together. It is a very good way to learn Coding and Robotics.

Features:

  1. Robobloq robots can be run and coded under Raspbian OS by coding languages like Arduino IDE, Python and JS.

  2. Robobloq is compatible with any Raspberry Pi with USB ports: Raspberry Pi 3 Model A,Raspberry Pi 3 Model B and Raspberry Pi 3 Model B+.

Description:

  1. The coders of Raspberry Pi should have basic understanding of C and Python.

    1-1. The introduction of Raspberry Pi:http://shumeipai.nxez.com/intro-faq

  2. Installing the Raspbian OS, please refer to: https://www.raspberrypi.org/documentation/installation/installing-images/README.md

  3. Connect your Raspberry Pi with monitor, mouse and keyboards.

  4. Programming Projects by C under Arduino IDE.

Exploring programming

  The Robobloq platform product is based on the Arduino open source platform, so it can support Arduino IDE C programming. Refer to the following steps to make your robot support C language programming.

1、Download the Arduino IDE and Arduino driver and install them.

Windows   Mac OS X   linux

2、Install the Robobloq library.

 2.1 Download library from official github library.

 2.2 Unzip the library and move the file “Robobloq” to the following path like.

  \[c\program files\Arduino]\libraries\robobloq

3、 Open the Arduino IDE from your desktop.

4、 Choose“file-examples-RoboBloqDrive-Example”

5、 Then you can find some examples code for learning.

Introduction to the Python Language API

Programming Qoopers & Q-scout · Robobloq

Initiating

Importqmindfile and create an object robot

from qmind import Qmind
robot = Qmind('robot')

Movements

Set on-board motors’ movements (forward or backward)

  • Parameter 1: forward1, backward2, left3, right4
  • Parameter 2: speed range -90 to 90

    robot.set_motor_type(1, 45)

Set on-board motors’ movements (clockwise or counterclockwise)

  • Parameter 1: left motor or right motor, range 1 to 2
  • Parameter 2: clockwise or counterclockwise, range 1 to 2
  • Parameter 3: speed range -90 to 90

    robot.set_motor_direction(1, 2, -80)

Set angle for left or right servo motor

  • Parameter 1: port number. Qoopers range 1 to 8, Q-scout range 4
  • Parameter 2: servo motor insertion port, range 1 to 2

    robot.motion_steering_engine(4, 1, 0, 0)

Set angle separately for left or right servo motor

  • Parameter 1: port number. Qoopers range 1 to 8, Q-scout range 4
  • Parameter 2: servo motor insertion port, range 1 to 2
  • Parameter 3: angle, range -180 to 180
  • Parameter 4: angle, range -180 to 180

    robot.motion_steering_engine(4, 1, 90, 90)

Set external motor’s movement direction and speed

  • Parameter 1: port number, Qoopers range 1 to 8, Q-scout range 4
  • Parameter 2: external motor insertion port, range 1 to 2
  • Parameter 3: clockwise or counterclockwise, range 1 to 2
  • Parameter 4: speed range -90 to 90

    robot.set_external_motor(4, 2, 0, 45)

Stop on-board motors’ movement

robot.set_motor_stop()

Lights

Set on-board lights’ color (RGB)

  • Parameter 1: both 0, left 1, right 2
  • Parameter 2: red, range 0 to 255
  • Parameter 3: green, range 0 to 255
  • Parameter 4: blue, range 0 to 255

    robot.set_led(0, 220, 115, 220)

Set graphics for LED matrix panel

  • Parameter 1: port number, Qoopers range 2 to 7, Q-scout range 1 to 3
  • Parameter 2: graphic value

    data = [

    [1,1,0,0,0,0,0,0,0,0,0,0,1,1],
    [0,0,1,1,0,0,0,0,0,0,1,1,0,0],
    [0,0,0,0,1,1,0,0,1,1,0,0,0,0],
    [0,0,0,0,0,0,1,1,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0],
    [0,0,0,0,0,0,0,0,0,0,0,0,0,0]
    

    ] robot.show_matrix(2, data)

Set graphics for RGB LED matrix panel

  • Parameter 1: port number, Qoopers range 2 to 7, Q-scout range 1 to 3
  • Parameter 2: graphic value

    data = [ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0], [0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 0, 0], [0, 0, 4, 4, 4, 0, 0, 4, 0, 0, 0, 0], [0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] ] robot.gs_matrix_rgb_led4(0, data)

Set color for ultrasonic sensor’s lights (RGB)

  • Parameter 1: port number, Qoopers range 2 to 7, Q-scout range 1 to 3
  • Parameter 2: red, range 0 to 255
  • Parameter 3: green, range 0 to 255
  • Parameter 4: blue, range 0 to 255

    robot.set_ultrasonic(0, 47, 144, 44)

Sound

Set buzzer frequency and lasting time

  • Parameter 1: frequency
  • Parameter 2: lasting time

    robot.set_sound(262, 500)

results matching ""

    No results matching ""