Hummingbird
Myro now supports the Hummingbird Robotics Kit.
The following documents the functionality available in Calico. You can access the Hummingbird Robot Kit from any language that can load Calico modules.
See also the related Finch robot and Calico software.
Getting Started with the Hummingbird Robotics Kit
To access the Hummingbird board:
1) On Linux, you will need udev rules:
For example, if this was in a file called "55-udev.rules":
SUBSYSTEM=="usb", ATTR{idVendor}=="2354", ATTR{idProduct}=="1111", MODE="0660", GROUP="plugdev" SUBSYSTEM=="usb", ATTR{idVendor}=="2354", ATTR{idProduct}=="2222", MODE="0660", GROUP="plugdev" KERNEL=="hidraw*", ATTRS{idVendor}=="2354", ATTRS{idProduct}=="1111", MODE="0666", GROUP="plugdev" KERNEL=="hidraw*", ATTRS{idVendor}=="2354", ATTRS{idProduct}=="2222", MODE="0666", GROUP="plugdev"
Copy that to the udev rule directory:
sudo cp 55-udev.rules /etc/udev/rules.d/
2) In Calico, load the Myro module using any language that support Calico modules
For example, in Python:
from Myro import *
3) Use the makeRobot("Hummingbird") function
4) Use many of the Calico Myro interface, including those below
5) Try one of the Hummingbird examples. From Calico, menu -> File -> Examples -> Python -> Robots -> Hummingbird. Also, see them online here:
https://bitbucket.org/ipre/calico/src/master/examples/python/Robots/Hummingbird?at=master
LED
setLED(position, value)
Sets the color of an LED port.
- position
- "t1" for tri colored port 1
- "t2" for tri colored port 2
- "s1" for single colored port 1
- "s2" for single colored port 2
- "s3" for single colored port 3
- "s4" for single colored port 4
- value - A string containing '#' followed by the hex value of the color for a tri colored port, or an int containing the intensity. Example(tri): "#00FF00", Example(single): 200
Vibration
setVolume(volume)
Sets the intensity of a vibration motor
- volume - "v1" followed by the intensity for vibration port 1, "v2" followed by the intensity for vibration port 2 Example: "v1255" (sets vibration port 1 to 255), "v20" (sets vibration port 2 to 0), "v225" (sets vibration port 2 to 25)
Sensors
get(sensor)
Gets sensor readings.
- sensor - The port of the sensor, ranges from 1-4. Input as a string, so port 1 is "1". To get all values, pass "all" for this parameter
Returns the raw sensor value in volts.
get(sensor, type)
Gets sensor readings
- sensor - The port of the sensor, ranges from 1-4. Input as a string, so port 1 is "1".
- type - The type of the sensor, either "temperature", "distance", "sound", "rotary", or "light".
Returns the reading of the given sensor.
Movement
All of the movement commands (forward, backward, motors, joystick, etc) from the standard Calico Myro API with standard motors plugged into 1 (left-side motor) and 2 (right-side motor).
servo(id, value)
Sets the angle of the servo. If idle is called immediatly after this, be sure to wait two seconds to allow the servo to adjust.
- id - the port of the servo, ranges from 1-4.
- value - The angle to set the specified servo to, ranges from 0 - 180.