Update docs
@ -1,6 +1,5 @@
|
||||
/*
|
||||
Package api provides functionally to expose your gobot programs
|
||||
to other by using starting a web server and adding commands.
|
||||
Package api provides a webserver to interact with your Gobot program over the network.
|
||||
|
||||
Example:
|
||||
|
||||
|
3
doc.go
@ -1,7 +1,8 @@
|
||||
// Copyright 2014 The Gobot Authors, HybridGroup. All rights reserved.
|
||||
|
||||
/*
|
||||
Package gobot is the main point of entry in your Gobot application. A Gobot
|
||||
Package gobot provides a framework for robotics, physical computing and the internet of things.
|
||||
It is the main point of entry in your Gobot application. A Gobot
|
||||
is typically composed of one or more robots that makes up a project.
|
||||
|
||||
Commands are a way to expose your robots functionality with the external world.
|
||||
|
@ -1,4 +1,3 @@
|
||||
// Use Gobot to control BeagleBone's digital pins directly
|
||||
package main
|
||||
|
||||
import (
|
||||
@ -8,8 +7,10 @@ import (
|
||||
|
||||
func main() {
|
||||
|
||||
// Use Gobot to control BeagleBone's digital pins directly
|
||||
|
||||
beagleboneAdaptor := beaglebone.NewBeagleboneAdaptor("beaglebone")
|
||||
gpioPin := gpio.NewDirectPinDriver(beagleboneAdaptor, "myDevice", "P9_12")
|
||||
gpioPin := gpio.NewDirectPinDriver(beagleboneAdaptor, "myDevice", "P9_12")
|
||||
|
||||
// Initialize the internal representation of the pinout
|
||||
beagleboneAdaptor.Connect()
|
||||
|
22
gobot/doc.go
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
CLI tool for generating new Gobot projects.
|
||||
|
||||
NAME:
|
||||
gobot - Command Line Utility for Gobot
|
||||
|
||||
USAGE:
|
||||
gobot [global options] command [command options] [arguments...]
|
||||
|
||||
VERSION:
|
||||
0.1
|
||||
|
||||
COMMANDS:
|
||||
generate Generate new Gobot skeleton project
|
||||
help, h Shows a list of commands or help for one command
|
||||
|
||||
GLOBAL OPTIONS:
|
||||
--help, -h show help
|
||||
--version, -v print the version
|
||||
|
||||
*/
|
||||
package main
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
This package provides the Gobot adaptor and driver for the [Parrot Ardrone](http://ardrone2.parrot.com).
|
||||
Package ardrone provides the Gobot adaptor and driver for the Parrot Ardrone.
|
||||
|
||||
Installing:
|
||||
|
||||
go get github.com/hybridgroup/gobot && go install github.com/hybridgroup/gobot/platforms/ardrone
|
||||
go get github.com/hybridgroup/gobot/platforms/ardrone
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -1,88 +0,0 @@
|
||||
# Commands
|
||||
|
||||
## TakeOff
|
||||
|
||||
Sets the internal `fly` state to `true`.
|
||||
|
||||
## Land
|
||||
|
||||
Sets the internal `fly` state to `false`.
|
||||
|
||||
## Up(speed float64)
|
||||
|
||||
Makes the drone gain altitude.
|
||||
speed can be a value from `0.0` to `1.0`.
|
||||
|
||||
##### Params
|
||||
|
||||
- **speed** - **float64** - The speed at which the drone moves
|
||||
|
||||
## Down(speed float64)
|
||||
|
||||
Makes the drone reduce altitude.
|
||||
speed can be a value from `0.0` to `1.0`.
|
||||
|
||||
##### Params
|
||||
|
||||
- **speed** - **float64** - The speed at which the drone moves
|
||||
|
||||
## Left(speed float64)
|
||||
|
||||
Causes the drone to bank to the left, controls the roll, which is
|
||||
a horizontal movement using the camera as a reference point.
|
||||
speed can be a value from `0.0` to `1.0`.
|
||||
|
||||
##### Params
|
||||
|
||||
- **speed** - **float64** - The speed at which the drone moves
|
||||
|
||||
## Right(speed float64)
|
||||
|
||||
Causes the drone to bank to the right, controls the roll, which is
|
||||
a horizontal movement using the camera as a reference point.
|
||||
speed can be a value from `0.0` to `1.0`.
|
||||
|
||||
##### Params
|
||||
|
||||
- **speed** - **float64** - The speed at which the drone moves
|
||||
|
||||
## Forward(speed float64)
|
||||
|
||||
Causes the drone go forward, controls the pitch.
|
||||
speed can be a value from `0.0` to `1.0`.
|
||||
|
||||
##### Params
|
||||
|
||||
- **speed** - **float64** - The speed at which the drone moves
|
||||
|
||||
|
||||
## Backward(speed float64)
|
||||
|
||||
Causes the drone go backward, controls the pitch.
|
||||
speed can be a value from `0.0` to `1.0`.
|
||||
|
||||
##### Params
|
||||
|
||||
- **speed** - **float64** - The speed at which the drone moves
|
||||
|
||||
## Clockwise(speed float64)
|
||||
|
||||
Causes the drone to spin.
|
||||
speed can be a value from `0.0` to `1.0`.
|
||||
|
||||
##### Params
|
||||
|
||||
- **speed** - **float64** - The speed at which the drone moves
|
||||
|
||||
## CounterClockwise(speed float64)
|
||||
|
||||
Causes the drone to spin.
|
||||
speed can be a value from `0.0` to `1.0`.
|
||||
|
||||
##### Params
|
||||
|
||||
- **speed** - **float64** - The speed at which the drone moves
|
||||
|
||||
## Hover
|
||||
|
||||
Causes the drone to hover in place.
|
@ -1,5 +0,0 @@
|
||||
# Events
|
||||
|
||||
## Flying
|
||||
|
||||
Sent when the device has taken off.
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
This package provides the Gobot adaptor for the Beaglebone Black (http://beagleboard.org/Products/BeagleBone+Black/)
|
||||
Package beaglebone provides the Gobot adaptor for the Beaglebone Black.
|
||||
|
||||
Installing:
|
||||
|
||||
go get github.com/hybridgroup/gobot && go install github.com/hybridgroup/platforms/gobot/beaglebone
|
||||
go get github.com/hybridgroup/platforms/gobot/beaglebone
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
/*
|
||||
This package provides the Gobot adaptor for the [Digispark](http://digistump.com/products/1) ATTiny-based USB development board with the [Little Wire](http://littlewire.cc/) protocol firmware installed.
|
||||
Package digispark provides the Gobot adaptor for the Digispark ATTiny-based USB development board.
|
||||
|
||||
Installing:
|
||||
|
||||
This package requires installing `libusb`.
|
||||
Then you can install the package with:
|
||||
|
||||
go get github.com/hybridgroup/gobot && go install github.com/hybridgroup/gobot/platforms/digispark
|
||||
go get github.com/hybridgroup/gobot/platforms/digispark
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -1,10 +1,9 @@
|
||||
/*
|
||||
|
||||
This package provides the adaptor for microcontrollers such as Arduino that support the [Firmata](http://firmata.org/wiki/Main_Page) protocol
|
||||
Package firmata provides the Gobot adaptor for microcontrollers that support the Firmata protocol.
|
||||
|
||||
Installing:
|
||||
|
||||
go get github.com/hybridgroup/gobot && go install github.com/hybridgroup/gobot/platforms/firmata
|
||||
go get github.com/hybridgroup/gobot/platforms/firmata
|
||||
|
||||
## Example
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
This package provides drivers for General Purpose Input/Output (GPIO) (https://en.wikipedia.org/wiki/General_Purpose_Input/Output) devices . It is normally not used directly, but instead is registered by an adaptor such as firmata (https://github.com/hybridgroup/gobot/platforms/firmata) that supports the needed interfaces for GPIO devices.
|
||||
Package gpio provides Gobot drivers for General Purpose Input/Output devices.
|
||||
|
||||
Installing:
|
||||
|
||||
go get github.com/hybridgroup/gobot && go install github.com/hybridgroup/gobot/platforms/gpio
|
||||
go get github.com/hybridgroup/gobot/platforms/gpio
|
||||
|
||||
For further information refer to gpio README:
|
||||
https://github.com/hybridgroup/gobot/blob/master/platforms/gpio/README.md
|
||||
|
BIN
platforms/gpio/docs/.DS_Store
vendored
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 102 KiB |
Before Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 162 KiB |
Before Width: | Height: | Size: 105 KiB |
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 81 KiB |
@ -1,14 +0,0 @@
|
||||
# Functions
|
||||
|
||||
## Read
|
||||
|
||||
Returns an integer value that represents the analog read from the sensor.
|
||||
|
||||
#### Returns
|
||||
|
||||
- **int** - integer value
|
||||
|
||||
#### API Command
|
||||
|
||||
**ReadC**
|
||||
|
@ -1,89 +0,0 @@
|
||||
# Functions
|
||||
|
||||
## DigitalRead
|
||||
|
||||
Returns an integer value that represents the digital read from the pin.
|
||||
|
||||
#### Returns
|
||||
|
||||
- **int** - integer value
|
||||
|
||||
#### API Command
|
||||
|
||||
**DigitalReadC**
|
||||
|
||||
## DigitalWrite(level byte)
|
||||
|
||||
Writes a ON/OFF using digital write to a pin
|
||||
|
||||
#### Params
|
||||
|
||||
- **level** - **[]byte** - on/off value
|
||||
|
||||
#### Returns
|
||||
|
||||
- **byte(level)** - on/off value
|
||||
|
||||
#### API Command
|
||||
|
||||
**DigitalWriteC**
|
||||
|
||||
## AnalogRead
|
||||
|
||||
Returns an integer value that represents the analog read from the pin.
|
||||
|
||||
#### Returns
|
||||
|
||||
- **int**- the analog read
|
||||
|
||||
#### API Command
|
||||
|
||||
**AnalogReadC**
|
||||
|
||||
## AnalogWrite(level byte)
|
||||
|
||||
Writes a value using analog write to a pin
|
||||
|
||||
#### Params
|
||||
|
||||
- **level** - **byte**
|
||||
|
||||
#### Returns
|
||||
|
||||
- **byte(level)** - pin value
|
||||
|
||||
#### API Command
|
||||
|
||||
**AnalogWriteC**
|
||||
|
||||
## PwmWrite(level byte)
|
||||
|
||||
Writes a value using Pulse Width Modulation (PWM) to a pin
|
||||
|
||||
#### Params
|
||||
|
||||
- **level** - **byte**
|
||||
|
||||
#### Returns
|
||||
|
||||
- **byte(level)** - PWM value
|
||||
|
||||
#### API Command
|
||||
|
||||
**PwmWriteC**
|
||||
|
||||
## ServoWrite(level byte)
|
||||
|
||||
Writes a value using servo write to a pin
|
||||
|
||||
##### Params
|
||||
|
||||
- **level** - **byte**
|
||||
|
||||
#### Returns
|
||||
|
||||
- **byte(level)** - pin value
|
||||
|
||||
#### API Command
|
||||
|
||||
**ServoWriteC**
|
@ -1,41 +0,0 @@
|
||||
# Functions
|
||||
|
||||
## Toggle
|
||||
|
||||
Turns the LED on, or off, depending on if it is already off, or on, respectively.
|
||||
|
||||
#### API Command
|
||||
|
||||
**ToggleC**
|
||||
|
||||
## On
|
||||
|
||||
Turns LED on.
|
||||
|
||||
#### API Command
|
||||
|
||||
**OnC**
|
||||
|
||||
## Off
|
||||
|
||||
Turns LED off.
|
||||
|
||||
#### API Command
|
||||
|
||||
**OffC**
|
||||
|
||||
## Brightness(level byte)
|
||||
|
||||
Sets brightness of the led to the specified brightness value passed to brightness(level byte).
|
||||
|
||||
#### Params
|
||||
|
||||
- **level** - **byte**
|
||||
|
||||
#### Returns
|
||||
|
||||
- **level** - brightness value
|
||||
|
||||
#### API Command
|
||||
|
||||
**BrightnessC**
|
@ -1,3 +0,0 @@
|
||||
# Functions
|
||||
|
||||
no commands
|
@ -1,89 +0,0 @@
|
||||
# Functions
|
||||
|
||||
## On
|
||||
|
||||
Starts the motor.
|
||||
|
||||
#### Returns
|
||||
|
||||
- **CurrentSpeed** - current speed value
|
||||
|
||||
## Off
|
||||
|
||||
Stops the motor.
|
||||
|
||||
#### Returns
|
||||
|
||||
- **Speed** - speed value
|
||||
|
||||
## IsOn
|
||||
|
||||
Returns true if the motor is on
|
||||
|
||||
#### Returns
|
||||
|
||||
- **bool**
|
||||
|
||||
## IsOff
|
||||
|
||||
Returns true if the motor is off
|
||||
|
||||
#### Returns
|
||||
|
||||
- **bool**
|
||||
|
||||
## Toggle
|
||||
|
||||
Sets the state of the motor to the oposite of the current state, if motor is on then sets it to off.
|
||||
|
||||
## Speed(value byte)
|
||||
|
||||
Sets the speed of the motor to the value provided in the speed param, speed value must be an integer between 0 and 255.
|
||||
|
||||
#### Params
|
||||
|
||||
- **value** - **byte**
|
||||
|
||||
#### Returns
|
||||
|
||||
- **SpeedPin value**
|
||||
|
||||
## Min
|
||||
|
||||
Sets the motor to it's minimum speed.
|
||||
|
||||
## Max
|
||||
|
||||
Sets the motor to it's max speed.
|
||||
|
||||
## Forward(speed byte)
|
||||
|
||||
Sets the motor to a forward direction at the specified speed.
|
||||
|
||||
#### Params
|
||||
|
||||
- **speed** - **byte**
|
||||
|
||||
#### Returns
|
||||
|
||||
- **speed**
|
||||
|
||||
## Backward(speed byte)
|
||||
|
||||
Sets the motor to a backward direction at the specified speed.
|
||||
|
||||
#### Params
|
||||
|
||||
- **speed** - **byte**
|
||||
|
||||
#### Returns
|
||||
|
||||
- **speed**
|
||||
|
||||
## Direction(direction string)
|
||||
|
||||
Sets the direction of the motor
|
||||
|
||||
#### Params
|
||||
|
||||
- **direction** - **string**
|
@ -1,42 +0,0 @@
|
||||
# Functions
|
||||
|
||||
## Move(angle uint8)
|
||||
|
||||
Moves the servo to the specified angle, angle must be an integer value between 0 and 180.
|
||||
|
||||
#### Params
|
||||
|
||||
- **angle** - **uint8**
|
||||
|
||||
#### Returns
|
||||
|
||||
- **angle** - angle value
|
||||
|
||||
#### API Command
|
||||
|
||||
**MoveC**
|
||||
|
||||
## Min
|
||||
|
||||
Moves the servo to 0.
|
||||
|
||||
#### API Command
|
||||
|
||||
**MinC**
|
||||
|
||||
## Center
|
||||
|
||||
Moves the servo to 90
|
||||
|
||||
#### API Command
|
||||
|
||||
**CenterC**
|
||||
|
||||
## Max
|
||||
|
||||
Moves the servo to 180
|
||||
|
||||
#### API Command
|
||||
|
||||
**MaxC**
|
||||
|
@ -1,3 +0,0 @@
|
||||
# Events
|
||||
|
||||
no events
|
@ -1,10 +0,0 @@
|
||||
# Events
|
||||
|
||||
## push
|
||||
|
||||
This event gets triggered when the button changes state from released to pushed.
|
||||
|
||||
## release
|
||||
|
||||
This event gets triggered when the button changes state from pushed to released.
|
||||
|
@ -1,3 +0,0 @@
|
||||
# Events
|
||||
|
||||
no events
|
@ -1,3 +0,0 @@
|
||||
# Events
|
||||
|
||||
no events
|
@ -1,9 +0,0 @@
|
||||
# Events
|
||||
|
||||
## push
|
||||
|
||||
This event gets triggered when the button changes state from released to pushed.
|
||||
|
||||
## release
|
||||
|
||||
This event gets triggered when the button changes state from pushed to released.
|
@ -1,3 +0,0 @@
|
||||
# Events
|
||||
|
||||
no events
|
@ -1,3 +0,0 @@
|
||||
# Events
|
||||
|
||||
no events
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
This package provides drivers for i2c (https://en.wikipedia.org/wiki/I%C2%B2C)devices . It is normally not used directly, but instead is registered by an adaptor such as firmata (https://github.com/hybridgroup/gobot/platforms/firmata) that supports the needed interfaces for i2c devices.
|
||||
Package i2c provides Gobot drivers for i2c devices.
|
||||
|
||||
Installing:
|
||||
|
||||
go get github.com/hybridgroup/gobot && go install github.com/hybridgroup/gobot/platforms/i2c
|
||||
go get github.com/hybridgroup/gobot/platforms/i2c
|
||||
|
||||
For further information refer to i2c README:
|
||||
https://github.com/hybridgroup/gobot/blob/master/platforms/i2c/README.md
|
||||
|
BIN
platforms/i2c/docs/.DS_Store
vendored
Before Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 87 KiB |
Before Width: | Height: | Size: 84 KiB |
@ -1,53 +0,0 @@
|
||||
# Functions
|
||||
|
||||
## FirmwareVersion
|
||||
|
||||
Returs the version of the current Frimware.
|
||||
|
||||
### Returns
|
||||
|
||||
- **string** - Firmware Version
|
||||
|
||||
#### API Command
|
||||
|
||||
**FirmwareVersionC**
|
||||
|
||||
## Color
|
||||
|
||||
Returns the color of the LED.
|
||||
|
||||
#### Returns
|
||||
|
||||
- **[]byte** - the RGB LED color
|
||||
|
||||
#### API Command
|
||||
|
||||
**ColorC**
|
||||
|
||||
## Rgb(r byte, g byte, b byte)
|
||||
|
||||
Sets the RGB color.
|
||||
|
||||
#### Params
|
||||
|
||||
- **r** - **byte** - Red
|
||||
- **g** - **byte** - Green
|
||||
- **b** - **byte** - Blue
|
||||
|
||||
#### API Command
|
||||
|
||||
**RgbC**
|
||||
|
||||
## Fade(r byte, g byte, b byte)
|
||||
|
||||
Fades the RGB color.
|
||||
|
||||
#### Params
|
||||
|
||||
- **r** - **byte** - Red
|
||||
- **g** - **byte** - Green
|
||||
- **b** - **byte** - Blue
|
||||
|
||||
#### API Command
|
||||
|
||||
**FadeC**
|
@ -1,3 +0,0 @@
|
||||
# Function
|
||||
|
||||
no commands
|
@ -1,3 +0,0 @@
|
||||
# Function
|
||||
|
||||
no commands
|
@ -1,3 +0,0 @@
|
||||
# Events
|
||||
|
||||
no events
|
@ -1,3 +0,0 @@
|
||||
# Events
|
||||
|
||||
no events
|
@ -1,13 +0,0 @@
|
||||
# Events
|
||||
|
||||
## z_button
|
||||
|
||||
Get's triggered every interval amount of time if the z button is pressed.
|
||||
|
||||
## c_button
|
||||
|
||||
Get's triggered every interval amount of time if the c button is pressed.
|
||||
|
||||
## joystick
|
||||
|
||||
Get's triggered every "interval" amount of time if a joystick event occured, you can access values x, y.
|
7
platforms/intel-iot/edison/doc.go
Normal file
@ -0,0 +1,7 @@
|
||||
/*
|
||||
Package edison contains the Gobot adaptor for the Intel Edison.
|
||||
|
||||
For further information refer to intel-iot README:
|
||||
https://github.com/hybridgroup/gobot/blob/master/platforms/intel-iot/edison/README.md
|
||||
*/
|
||||
package edison
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
This package contains the Gobot adaptor for the Intel Edison (http://www.intel.com/content/www/us/en/do-it-yourself/edison.html) IoT platform.
|
||||
Package inteliot contains Gobot adaptors for the Intel IoT platforms.
|
||||
|
||||
This package currently supports the following Intel IoT hardware:
|
||||
- Intel Edison with the Arduino breakout board
|
||||
|
@ -1,12 +1,12 @@
|
||||
/*
|
||||
This package provides the Gobot adaptor and drivers for the PS3 controller, Xbox 360 controller, or any other joysticks and game controllers that are compatible with Simple DirectMedia Layer (http://www.libsdl.org/).
|
||||
Package joystick provides the Gobot adaptor and drivers for game controllers that are compatible with SDL.
|
||||
|
||||
Installing:
|
||||
|
||||
This package requires `sdl2` to be installed on your system
|
||||
Then install package with:
|
||||
|
||||
go get github.com/hybridgroup/gobot && go install github.com/hybridgroup/gobot/platforms/joystick
|
||||
go get github.com/hybridgroup/gobot/platforms/joystick
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -1,154 +0,0 @@
|
||||
# Events
|
||||
|
||||
## left_x
|
||||
|
||||
Gets triggered every interval amount of time if the `left_x` button is pressed.
|
||||
|
||||
## left_y
|
||||
|
||||
Gets triggered every interval amount of time if the `left_y` button is pressed.
|
||||
|
||||
## right_x
|
||||
|
||||
Gets triggered every interval amount of time if the `right_x` button is pressed.
|
||||
|
||||
## right_y
|
||||
|
||||
Gets triggered every interval amount of time if the `right_y` button is pressed.
|
||||
|
||||
## square_press
|
||||
|
||||
Gets triggered every interval amount of time if the `square_press` button is pressed.
|
||||
|
||||
## triangle_press
|
||||
|
||||
Gets triggered every interval amount of time if the `triangle_press` button is pressed.
|
||||
|
||||
## circle_press
|
||||
|
||||
Gets triggered every interval amount of time if the `circle_press` button is pressed.
|
||||
|
||||
## x_press
|
||||
|
||||
Gets triggered every interval amount of time if the `x_press` button is pressed.
|
||||
|
||||
## up_press
|
||||
|
||||
Gets triggered every interval amount of time if the `up_press` button is pressed.
|
||||
|
||||
## down_press
|
||||
|
||||
Gets triggered every interval amount of time if the `down_press` button is pressed.
|
||||
|
||||
## left_press
|
||||
|
||||
Gets triggered every interval amount of time if the `left_press` button is pressed.
|
||||
|
||||
## right_press
|
||||
|
||||
Gets triggered every interval amount of time if the `right_press` button is pressed.
|
||||
|
||||
## left_stick_press
|
||||
|
||||
Gets triggered every interval amount of time if the `left_stick_press` button is pressed.
|
||||
|
||||
## right_stick_press
|
||||
|
||||
Gets triggered every interval amount of time if the `right_stick_press` button is pressed.
|
||||
|
||||
## l1_press
|
||||
|
||||
Gets triggered every interval amount of time if the `l1_press` button is pressed.
|
||||
|
||||
## l2_press
|
||||
|
||||
Gets triggered every interval amount of time if the `l2_press` button is pressed.
|
||||
|
||||
## r1_press
|
||||
|
||||
Gets triggered every interval amount of time if the `r1_press` button is pressed.
|
||||
|
||||
## r2_press
|
||||
|
||||
Gets triggered every interval amount of time if the `r2_press` button is pressed.
|
||||
|
||||
## start_press
|
||||
|
||||
Gets triggered every interval amount of time if the `start_press` button is pressed.
|
||||
|
||||
## select_press
|
||||
|
||||
Gets triggered every interval amount of time if the `select_press` button is pressed.
|
||||
|
||||
## home_press
|
||||
|
||||
Gets triggered every interval amount of time if the `home_press` button is pressed.
|
||||
|
||||
## square_release
|
||||
|
||||
Gets triggered every interval amount of time if the `square_release` button is pressed.
|
||||
|
||||
## triangle_release
|
||||
|
||||
Gets triggered every interval amount of time if the `triangle_release` button is pressed.
|
||||
|
||||
## circle_release
|
||||
|
||||
Gets triggered every interval amount of time if the `circle_release` button is pressed.
|
||||
|
||||
## x_release
|
||||
|
||||
Gets triggered every interval amount of time if the `x_release` button is pressed.
|
||||
|
||||
## up_release
|
||||
|
||||
Gets triggered every interval amount of time if the `up_release` button is pressed.
|
||||
|
||||
## down_release
|
||||
|
||||
Gets triggered every interval amount of time if the `down_release` button is pressed.
|
||||
|
||||
## left_release
|
||||
|
||||
Gets triggered every interval amount of time if the `left_release` button is pressed.
|
||||
|
||||
## right_release
|
||||
|
||||
Gets triggered every interval amount of time if the `right_release` button is pressed.
|
||||
|
||||
## left_stick_release
|
||||
|
||||
Gets triggered every interval amount of time if the `left_stick_release` button is pressed.
|
||||
|
||||
## right_stick_release
|
||||
|
||||
Gets triggered every interval amount of time if the `right_stick_release` button is pressed.
|
||||
|
||||
## l1_release
|
||||
|
||||
Gets triggered every interval amount of time if the `l1_release` button is pressed.
|
||||
|
||||
## l2_release
|
||||
|
||||
Gets triggered every interval amount of time if the `l2_release` button is pressed.
|
||||
|
||||
## r1_release
|
||||
|
||||
Gets triggered every interval amount of time if the `r1_release` button is pressed.
|
||||
|
||||
## r2_release
|
||||
|
||||
Gets triggered every interval amount of time if the `r2_release` button is pressed.
|
||||
|
||||
## start_release
|
||||
|
||||
Gets triggered every interval amount of time if the `start_release` button is pressed.
|
||||
|
||||
## select_release
|
||||
|
||||
Gets triggered every interval amount of time if the `select_release` button is pressed.
|
||||
|
||||
## home_release
|
||||
|
||||
Gets triggered every interval amount of time if the `home_release` button is pressed.
|
||||
|
@ -1,137 +0,0 @@
|
||||
# Events
|
||||
|
||||
## down
|
||||
|
||||
Gets triggered every interval amount of time if the `down` button is pressed.
|
||||
|
||||
## up
|
||||
|
||||
Gets triggered every interval amount of time if the `up` button is pressed.
|
||||
|
||||
## left
|
||||
|
||||
Gets triggered every interval amount of time if the `left` button is pressed.
|
||||
|
||||
## right
|
||||
|
||||
Gets triggered every interval amount of time if the `right` button is pressed.
|
||||
|
||||
## released
|
||||
|
||||
Gets triggered every interval amount of time if the `released` button is pressed.
|
||||
|
||||
## left_x
|
||||
|
||||
Gets triggered every interval amount of time if the `left_x` button is pressed.
|
||||
|
||||
## left_y
|
||||
|
||||
Gets triggered every interval amount of time if the `left_y` button is pressed.
|
||||
|
||||
## right_x
|
||||
|
||||
Gets triggered every interval amount of time if the `right_x` button is pressed.
|
||||
|
||||
## right_y
|
||||
|
||||
Gets triggered every interval amount of time if the `right_y` button is pressed.
|
||||
|
||||
## rt
|
||||
|
||||
Gets triggered every interval amount of time if the `rt` button is pressed.
|
||||
|
||||
## lt
|
||||
|
||||
Gets triggered every interval amount of time if the `lt` button is pressed.
|
||||
|
||||
## x_press
|
||||
|
||||
Gets triggered every interval amount of time if the `x_press` button is pressed.
|
||||
|
||||
## a_press
|
||||
|
||||
Gets triggered every interval amount of time if the `a_press` button is pressed.
|
||||
|
||||
## b_press
|
||||
|
||||
Gets triggered every interval amount of time if the `b_press` button is pressed.
|
||||
|
||||
## y_press
|
||||
|
||||
Gets triggered every interval amount of time if the `y_press` button is pressed.
|
||||
|
||||
## lb_press
|
||||
|
||||
Gets triggered every interval amount of time if the `lb_press` button is pressed.
|
||||
|
||||
## rb_press
|
||||
|
||||
Gets triggered every interval amount of time if the `rb_press` button is pressed.
|
||||
|
||||
## back_press
|
||||
|
||||
Gets triggered every interval amount of time if the `back_press` button is pressed.
|
||||
|
||||
## start_press
|
||||
|
||||
Gets triggered every interval amount of time if the `start_press` button is pressed.
|
||||
|
||||
## home_press
|
||||
|
||||
Gets triggered every interval amount of time if the `home_press` button is pressed.
|
||||
|
||||
## right_stick_press
|
||||
|
||||
Gets triggered every interval amount of time if the `right_stick_press` button is pressed.
|
||||
|
||||
## left_stick_press
|
||||
|
||||
Gets triggered every interval amount of time if the `left_stick_press` button is pressed.
|
||||
|
||||
## x_release
|
||||
|
||||
Gets triggered every interval amount of time if the `x_release` button is released.
|
||||
|
||||
## a_release
|
||||
|
||||
Gets triggered every interval amount of time if the `a_release` button is released.
|
||||
|
||||
## b_release
|
||||
|
||||
Gets triggered every interval amount of time if the `b_release` button is released.
|
||||
|
||||
## y_release
|
||||
|
||||
Gets triggered every interval amount of time if the `y_release` button is released.
|
||||
|
||||
## lb_release
|
||||
|
||||
Gets triggered every interval amount of time if the `lb_release` button is released.
|
||||
|
||||
## rb_release
|
||||
|
||||
Gets triggered every interval amount of time if the `rb_release` button is released.
|
||||
|
||||
## back_release
|
||||
|
||||
Gets triggered every interval amount of time if the `back_release` button is released.
|
||||
|
||||
## start_release
|
||||
|
||||
Gets triggered every interval amount of time if the `start_release` button is released.
|
||||
|
||||
## home_release
|
||||
|
||||
Gets triggered every interval amount of time if the `home_release` button is released.
|
||||
|
||||
## right_stick_release
|
||||
|
||||
Gets triggered every interval amount of time if the `right_stick_release` button is released.
|
||||
|
||||
## left_stick_release
|
||||
|
||||
Gets triggered every interval amount of time if the `left_stick_release` button is released.
|
||||
|
||||
|
||||
|
||||
|
@ -1,13 +1,12 @@
|
||||
/*
|
||||
|
||||
This package provides the Gobot adaptor and driver for the Leap Motion (https://www.leapmotion.com/)
|
||||
Package leap provides the Gobot adaptor and driver for the Leap Motion.
|
||||
|
||||
Installing:
|
||||
|
||||
* First install the [Leap Motion Software](https://www.leapmotion.com/setup).
|
||||
* Then install the package:
|
||||
|
||||
go get github.com/hybridgroup/gobot && go install github.com/hybridgroup/gobot/platforms/leap
|
||||
go get github.com/hybridgroup/gobot/platforms/leap
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -1,170 +0,0 @@
|
||||
# Events
|
||||
|
||||
## hand
|
||||
|
||||
Gets triggered when doing a hand motion, makes hand input available.
|
||||
|
||||
Leap Hand contains:
|
||||
|
||||
- **position** (palm x-y-z coords)
|
||||
- **wrist rotation** (axis,angle,matrix)
|
||||
|
||||
##### Example JSON
|
||||
|
||||
|
||||
|
||||
{
|
||||
"direction": [
|
||||
0.772435,
|
||||
0.520335,
|
||||
-0.364136
|
||||
],
|
||||
"id": 57,
|
||||
"palmNormal": [
|
||||
-0.0100593,
|
||||
-0.563263,
|
||||
-0.826217
|
||||
],
|
||||
"palmPosition": [
|
||||
117.546,
|
||||
236.007,
|
||||
76.3394
|
||||
],
|
||||
"palmVelocity": [
|
||||
-866.196,
|
||||
-100.749,
|
||||
275.692
|
||||
],
|
||||
"r": [
|
||||
[
|
||||
0.999844,
|
||||
0.0142022,
|
||||
0.0105289
|
||||
],
|
||||
[
|
||||
-0.0141201,
|
||||
0.99987,
|
||||
-0.00783186
|
||||
],
|
||||
[
|
||||
-0.0106388,
|
||||
0.00768197,
|
||||
0.999914
|
||||
]
|
||||
],
|
||||
"s": 0.992511,
|
||||
"sphereCenter": [
|
||||
156.775,
|
||||
227.378,
|
||||
48.3453
|
||||
],
|
||||
"sphereRadius": 75.3216,
|
||||
"stabilizedPalmPosition": [
|
||||
119.009,
|
||||
236.071,
|
||||
75.951
|
||||
],
|
||||
"t": [
|
||||
-38.0468,
|
||||
28.2341,
|
||||
-21.3291
|
||||
],
|
||||
"timeVisible": 0.051952
|
||||
}
|
||||
|
||||
|
||||
## gesture
|
||||
|
||||
Gets triggered when doing a gesture motion, makes hand input available.
|
||||
|
||||
There is 4 Gesture types :
|
||||
|
||||
- **Circle** - A circular movement by a finger.
|
||||
- **Swipe** - A straight line movement by the hand with fingers extended.
|
||||
- **KeyTap** - A downward tapping movement by a finger.
|
||||
- **ScreenTap** - A forward tapping movement by a finger.
|
||||
|
||||
##### Example JSON
|
||||
|
||||
|
||||
{
|
||||
"direction": [
|
||||
-0.647384,
|
||||
0.750476,
|
||||
-0.132964
|
||||
],
|
||||
"duration": 0,
|
||||
"handIds": [
|
||||
57
|
||||
],
|
||||
"id": 72,
|
||||
"pointableIds": [
|
||||
14
|
||||
],
|
||||
"position": [
|
||||
117.665,
|
||||
313.471,
|
||||
27.2095
|
||||
],
|
||||
"speed": 1050.66,
|
||||
"startPosition": [
|
||||
195.438,
|
||||
223.313,
|
||||
43.183
|
||||
],
|
||||
"state": "start",
|
||||
"type": "swipe"
|
||||
}
|
||||
|
||||
|
||||
## pointable
|
||||
|
||||
Gets triggered when doing a pointable motion, makes hand input available.
|
||||
|
||||
Leap Pointable contains:
|
||||
|
||||
- **length**
|
||||
- **touch zone**
|
||||
|
||||
##### Example JSON
|
||||
|
||||
|
||||
{
|
||||
"direction": [
|
||||
0.54044,
|
||||
0.174084,
|
||||
-0.823176
|
||||
],
|
||||
"handId": 57,
|
||||
"id": 1,
|
||||
"length": 48.393,
|
||||
"stabilizedTipPosition": [
|
||||
194.714,
|
||||
291.812,
|
||||
20.6219
|
||||
],
|
||||
"timeVisible": 0.13873,
|
||||
"tipPosition": [
|
||||
194.714,
|
||||
291.812,
|
||||
20.6219
|
||||
],
|
||||
"tipVelocity": [
|
||||
-716.414,
|
||||
686.468,
|
||||
-427.914
|
||||
],
|
||||
"tool": false,
|
||||
"touchDistance": 0.333333,
|
||||
"touchZone": "hovering"
|
||||
}
|
||||
|
||||
## frame
|
||||
|
||||
Gets triggered with every motion detected, makes frame input available.
|
||||
|
||||
## Message
|
||||
|
||||
Gets triggered when receiving a message.
|
||||
|
||||
More information abour the parser [https://github.com/hybridgroup/gobot-leapmotion/blob/master/parser.go](https://github.com/hybridgroup/gobot-leapmotion/blob/master/parser.go).
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
This package contains the Gobot adaptor and driver for the MAVlink Communication Protocol (http://qgroundcontrol.org/mavlink/start).
|
||||
Package mavlink contains the Gobot adaptor and driver for the MAVlink Communication Protocol.
|
||||
|
||||
Installing:
|
||||
|
||||
go get github.com/hybridgroup/gobot && go install github.com/hybridgroup/gobot/platforms/mavlink
|
||||
go get github.com/hybridgroup/gobot/platforms/mavlink
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
This package contains the Gobot adaptor and driver for the Neurosky Mindwave Mobile EEG (http://store.neurosky.com/products/mindwave-mobile).
|
||||
Package neurosky contains the Gobot adaptor and driver for the Neurosky Mindwave Mobile EEG.
|
||||
|
||||
Installing:
|
||||
|
||||
go get github.com/hybridgroup/gobot && go install github.com/hybridgroup/gobot/platforms/neurosky
|
||||
go get github.com/hybridgroup/gobot/platforms/neurosky
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -1,43 +0,0 @@
|
||||
# Events
|
||||
|
||||
## Attention(data)
|
||||
|
||||
Event with the user's current attention level.
|
||||
|
||||
## Blink(data)
|
||||
|
||||
Event with the user's current blink level.
|
||||
|
||||
## EEG(data)
|
||||
|
||||
Event showing EEG data.
|
||||
|
||||
{ 'Delta': 7023617,
|
||||
'Theta': 15294464,
|
||||
'LoAlpha': 15209472,
|
||||
'HiAlpha': 13321984,
|
||||
'LoBeta': 4527616,
|
||||
'HiBeta': 12073472,
|
||||
'LoGamma': 862464,
|
||||
'MidGamma': 13637632 }
|
||||
|
||||
## Extended(data)
|
||||
|
||||
Event with the user's current extended level.
|
||||
|
||||
## Meditation(data)
|
||||
|
||||
Event with the user's current meditation level.
|
||||
|
||||
## Signal(data)
|
||||
|
||||
Event showing signal strength.
|
||||
|
||||
## Wave(data)
|
||||
|
||||
Event showing wave data.
|
||||
|
||||
## Start
|
||||
|
||||
Gets triggered when the Mindwave is started and ready to be used.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
This repository contains the Gobot drivers for opencv.
|
||||
Packge opencv contains the Gobot drivers for opencv.
|
||||
|
||||
Installing:
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
/*
|
||||
This package contains the Gobot adaptor for Pebble smart watch (http://getpebble.com/).
|
||||
Package pebble contains the Gobot adaptor and driver for Pebble smart watch.
|
||||
|
||||
Installing:
|
||||
|
||||
It requires the 2.x iOS or Android app, and "watchbot" app (https://github.com/hybridgroup/watchbot)
|
||||
installed on Pebble watch. Then install running:
|
||||
|
||||
go get github.com/hybridgroup/gobot && go install github.com/hybridgroup/gobot/platforms/pebble
|
||||
go get github.com/hybridgroup/gobot/platforms/pebble
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -1,34 +0,0 @@
|
||||
# Functions
|
||||
|
||||
## PublishEvent(name string, data string)
|
||||
|
||||
It publishes an event.
|
||||
|
||||
#### Params
|
||||
|
||||
- **name** - **string** - event name
|
||||
- **data** - **string** - value
|
||||
|
||||
#### API Command
|
||||
|
||||
**publish_event**
|
||||
|
||||
## PendingMessage()
|
||||
|
||||
It returns messages to be sent as notifications to pebble (Not intented to be used directly)
|
||||
|
||||
#### API Command
|
||||
|
||||
**pending_message**
|
||||
|
||||
## SendNotification(message string)
|
||||
|
||||
Sends notification to watch.
|
||||
|
||||
#### Params
|
||||
|
||||
- **message** - **string** - notification text
|
||||
|
||||
#### API Command
|
||||
|
||||
**send_notification**
|
@ -1,13 +0,0 @@
|
||||
# Events
|
||||
|
||||
## button
|
||||
|
||||
Sent when a pebble button is pressed.
|
||||
|
||||
## accel
|
||||
|
||||
Pebble watch acceleromenter data.
|
||||
|
||||
## tap
|
||||
|
||||
When a pebble watch tap event is detected.
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
This package provides the Gobot adaptor for the Spark Core (https://www.spark.io/)
|
||||
Package spark provides the Gobot adaptor for the Spark Core.
|
||||
|
||||
Installing:
|
||||
|
||||
|
@ -1,10 +1,9 @@
|
||||
/*
|
||||
|
||||
This package provides the Gobot adaptor and driver for the Sphero (http://www.gosphero.com/) robot from Orbotix .
|
||||
Package sphero provides the Gobot adaptor and driver for the Sphero.
|
||||
|
||||
Installing:
|
||||
|
||||
go get github.com/hybridgroup/gobot && go install github.com/hybridgroup/gobot/platforms/sphero
|
||||
go get github.com/hybridgroup/gobot/platforms/sphero
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -1,88 +0,0 @@
|
||||
# Functions
|
||||
|
||||
## Roll(speed uint8, heading uint16)
|
||||
|
||||
This commands Sphero to roll along the provided vector. Both a speed
|
||||
and a heading are required; the latter is considered relative to the last
|
||||
calibrated direction.
|
||||
|
||||
#### Params
|
||||
|
||||
- **speed** - **uint8** - rotation speed
|
||||
- **heading** - **uint16** - direction
|
||||
|
||||
#### API Command
|
||||
|
||||
**RollC**
|
||||
|
||||
## Stop
|
||||
|
||||
Stops the Sphero from rolling around.
|
||||
|
||||
#### API Command
|
||||
|
||||
**StopC**
|
||||
|
||||
|
||||
## SetBackLED(level uint8)
|
||||
|
||||
This allows you to control the brightness of the back LED. The value does
|
||||
not persist across power cycles.
|
||||
|
||||
#### Params
|
||||
|
||||
- **level** - **uint8** - brightness of back lED
|
||||
|
||||
#### API Command
|
||||
|
||||
**SetBackLEDC**
|
||||
|
||||
## SetRGB(r uint8, g uint8, b uint8)
|
||||
|
||||
Sets the sphero's LED color
|
||||
|
||||
#### Params
|
||||
|
||||
- **r** - **uint8** - Red
|
||||
- **g** - **uint8** - Green
|
||||
- **b** - **uintu** - Blue
|
||||
|
||||
#### API Command
|
||||
|
||||
**SetRGBC**
|
||||
|
||||
## GetRGB()
|
||||
|
||||
This retrieves the "user LED color" which is stored in the config block.
|
||||
|
||||
#### Returns
|
||||
|
||||
- **[]uint8** - the sphero's LED color
|
||||
|
||||
#### API Command
|
||||
|
||||
**GetRGBC**
|
||||
|
||||
## SetStabalisation(on bool)
|
||||
|
||||
Sets whether the Sphero should have stabilization enabled
|
||||
|
||||
- **on** - **bool** - whether or not the sphero should have stabilization
|
||||
|
||||
#### API Command
|
||||
|
||||
**SetStabalisationC**
|
||||
|
||||
## SetHeading(heading uint16)
|
||||
|
||||
This allows the client to adjust the orientation of Sphero
|
||||
by commanding a new reference heading in degrees, which ranges from 0 to 359.
|
||||
|
||||
#### Params
|
||||
|
||||
- **heading** - **uint16** - heading
|
||||
|
||||
#### API Command
|
||||
|
||||
**SetHeadingC**
|
||||
|
@ -1,5 +0,0 @@
|
||||
# Events
|
||||
|
||||
## Collision
|
||||
|
||||
Emitted when the sphero hits something, falls from a step, or otherwise detects a collision.
|