Showing preview only (7,627K chars total). Download the full file or copy to clipboard to get everything.
Repository: hybridgroup/gobot
Branch: release
Commit: 798be8ce070d
Files: 973
Total size: 7.1 MB
Directory structure:
gitextract_4majm_s_/
├── .chglog/
│ ├── CHANGELOG.gobot.md
│ ├── README.md
│ └── config_gobot.yml
├── .circleci/
│ └── config.yml
├── .github/
│ ├── FUNDING.yml
│ ├── dependabot.yml
│ ├── pull_request_template.md
│ └── workflows/
│ └── golangci-lint.yml
├── .gitignore
├── .golangci.yml
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE.txt
├── MIGRATION.md
├── Makefile
├── README.md
├── adaptor.go
├── api/
│ ├── api.go
│ ├── api_test.go
│ ├── basic_auth.go
│ ├── basic_auth_test.go
│ ├── cors.go
│ ├── cors_test.go
│ ├── doc.go
│ ├── helpers_test.go
│ └── robeaux/
│ └── robeaux.go
├── appveyor.yml
├── commander.go
├── commander_test.go
├── connection.go
├── debug.go
├── device.go
├── doc.go
├── driver.go
├── drivers/
│ ├── aio/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── aio_driver.go
│ │ ├── aio_driver_test.go
│ │ ├── analog_actuator_driver.go
│ │ ├── analog_actuator_driver_test.go
│ │ ├── analog_sensor_driver.go
│ │ ├── analog_sensor_driver_test.go
│ │ ├── doc.go
│ │ ├── grove_drivers.go
│ │ ├── grove_drivers_test.go
│ │ ├── grove_temperature_sensor_driver.go
│ │ ├── grove_temperature_sensor_driver_test.go
│ │ ├── helpers_test.go
│ │ ├── temperature_sensor_driver.go
│ │ ├── temperature_sensor_driver_test.go
│ │ ├── thermalzone_driver.go
│ │ └── thermalzone_driver_test.go
│ ├── ble/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── battery_driver.go
│ │ ├── battery_driver_test.go
│ │ ├── ble_driver.go
│ │ ├── ble_driver_test.go
│ │ ├── device_information_driver.go
│ │ ├── device_information_driver_test.go
│ │ ├── doc.go
│ │ ├── generic_access_driver.go
│ │ ├── generic_access_driver_test.go
│ │ ├── microbit/
│ │ │ ├── LICENSE
│ │ │ ├── accelerometer_driver.go
│ │ │ ├── accelerometer_driver_test.go
│ │ │ ├── button_driver.go
│ │ │ ├── button_driver_test.go
│ │ │ ├── doc.go
│ │ │ ├── io_pin_driver.go
│ │ │ ├── io_pin_driver_test.go
│ │ │ ├── led_driver.go
│ │ │ ├── led_driver_test.go
│ │ │ ├── magnetometer_driver.go
│ │ │ ├── magnetometer_driver_test.go
│ │ │ ├── temperature_driver.go
│ │ │ └── temperature_driver_test.go
│ │ ├── parrot/
│ │ │ ├── LICENSE
│ │ │ ├── doc.go
│ │ │ ├── minidrone_driver.go
│ │ │ └── minidrone_driver_test.go
│ │ ├── serial_port.go
│ │ ├── serial_port_test.go
│ │ ├── sphero/
│ │ │ ├── LICENSE
│ │ │ ├── doc.go
│ │ │ ├── sphero_bb8_driver.go
│ │ │ ├── sphero_bb8_driver_test.go
│ │ │ ├── sphero_ollie_driver.go
│ │ │ ├── sphero_ollie_driver_test.go
│ │ │ ├── sphero_sprkplus_driver.go
│ │ │ └── sphero_sprkplus_driver_test.go
│ │ └── testutil/
│ │ └── testutil.go
│ ├── common/
│ │ ├── bit/
│ │ │ ├── bit.go
│ │ │ └── bit_test.go
│ │ ├── mfrc522/
│ │ │ ├── mfrc522_connectionwrapper.go
│ │ │ ├── mfrc522_pcd.go
│ │ │ ├── mfrc522_pcd_register.go
│ │ │ ├── mfrc522_pcd_test.go
│ │ │ └── mfrc522_picc.go
│ │ └── spherocommon/
│ │ ├── spherocommon.go
│ │ ├── spherocommon_packets.go
│ │ └── spherocommon_test.go
│ ├── gpio/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── aip1640_driver.go
│ │ ├── aip1640_driver_test.go
│ │ ├── button_driver.go
│ │ ├── button_driver_test.go
│ │ ├── buzzer_driver.go
│ │ ├── buzzer_driver_test.go
│ │ ├── direct_pin_driver.go
│ │ ├── direct_pin_driver_test.go
│ │ ├── doc.go
│ │ ├── easy_driver.go
│ │ ├── easy_driver_test.go
│ │ ├── gpio_driver.go
│ │ ├── gpio_driver_test.go
│ │ ├── grove_drivers.go
│ │ ├── grove_drivers_test.go
│ │ ├── hcsr04_driver.go
│ │ ├── hcsr04_driver_test.go
│ │ ├── hd44780_driver.go
│ │ ├── hd44780_driver_test.go
│ │ ├── helpers_test.go
│ │ ├── led_driver.go
│ │ ├── led_driver_test.go
│ │ ├── max7219_driver.go
│ │ ├── max7219_driver_test.go
│ │ ├── motor_driver.go
│ │ ├── motor_driver_test.go
│ │ ├── pir_motion_driver.go
│ │ ├── pir_motion_driver_test.go
│ │ ├── relay_driver.go
│ │ ├── relay_driver_test.go
│ │ ├── rgb_led_driver.go
│ │ ├── rgb_led_driver_test.go
│ │ ├── servo_driver.go
│ │ ├── servo_driver_test.go
│ │ ├── stepper_driver.go
│ │ ├── stepper_driver_test.go
│ │ ├── tm1638_driver.go
│ │ └── tm1638_driver_test.go
│ ├── i2c/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── adafruit1109_driver.go
│ │ ├── adafruit1109_driver_test.go
│ │ ├── adafruit2327_driver.go
│ │ ├── adafruit2327_driver_test.go
│ │ ├── adafruit2348_driver.go
│ │ ├── adafruit2348_driver_test.go
│ │ ├── ads1x15_driver.go
│ │ ├── ads1x15_driver_1015_test.go
│ │ ├── ads1x15_driver_1115_test.go
│ │ ├── ads1x15_driver_test.go
│ │ ├── adxl345_driver.go
│ │ ├── adxl345_driver_test.go
│ │ ├── bh1750_driver.go
│ │ ├── bh1750_driver_test.go
│ │ ├── blinkm_driver.go
│ │ ├── blinkm_driver_test.go
│ │ ├── bme280_driver.go
│ │ ├── bme280_driver_test.go
│ │ ├── bmp180_driver.go
│ │ ├── bmp180_driver_test.go
│ │ ├── bmp280_driver.go
│ │ ├── bmp280_driver_test.go
│ │ ├── bmp388_driver.go
│ │ ├── bmp388_driver_test.go
│ │ ├── ccs811_driver.go
│ │ ├── ccs811_driver_test.go
│ │ ├── doc.go
│ │ ├── drv2605l_driver.go
│ │ ├── drv2605l_driver_test.go
│ │ ├── generic_driver.go
│ │ ├── generic_driver_test.go
│ │ ├── grove_drivers.go
│ │ ├── grove_drivers_test.go
│ │ ├── grovepi_driver.go
│ │ ├── grovepi_driver_test.go
│ │ ├── helpers_test.go
│ │ ├── hmc5883l_driver.go
│ │ ├── hmc5883l_driver_test.go
│ │ ├── hmc6352_driver.go
│ │ ├── hmc6352_driver_test.go
│ │ ├── i2c_config.go
│ │ ├── i2c_config_test.go
│ │ ├── i2c_connection.go
│ │ ├── i2c_connection_test.go
│ │ ├── i2c_driver.go
│ │ ├── i2c_driver_test.go
│ │ ├── ina3221_driver.go
│ │ ├── ina3221_driver_test.go
│ │ ├── jhd1313m1_driver.go
│ │ ├── jhd1313m1_driver_test.go
│ │ ├── l3gd20h_driver.go
│ │ ├── l3gd20h_driver_test.go
│ │ ├── lidarlite_driver.go
│ │ ├── lidarlite_driver_test.go
│ │ ├── mcp23017_driver.go
│ │ ├── mcp23017_driver_test.go
│ │ ├── mfrc522_driver.go
│ │ ├── mma7660_driver.go
│ │ ├── mma7660_driver_test.go
│ │ ├── mpl115a2_driver.go
│ │ ├── mpl115a2_driver_test.go
│ │ ├── mpu6050_driver.go
│ │ ├── mpu6050_driver_test.go
│ │ ├── pca9501_driver.go
│ │ ├── pca9501_driver_test.go
│ │ ├── pca953x_driver.go
│ │ ├── pca953x_driver_test.go
│ │ ├── pca9685_driver.go
│ │ ├── pca9685_driver_test.go
│ │ ├── pcf8583_driver.go
│ │ ├── pcf8583_driver_test.go
│ │ ├── pcf8591_driver.go
│ │ ├── pcf8591_driver_test.go
│ │ ├── sht2x_driver.go
│ │ ├── sht2x_driver_test.go
│ │ ├── sht3x_driver.go
│ │ ├── sht3x_driver_test.go
│ │ ├── ssd1306_driver.go
│ │ ├── ssd1306_driver_test.go
│ │ ├── th02_driver.go
│ │ ├── th02_driver_test.go
│ │ ├── tsl2561_driver.go
│ │ ├── tsl2561_driver_test.go
│ │ ├── wiichuck_driver.go
│ │ ├── wiichuck_driver_test.go
│ │ ├── yl40_driver.go
│ │ └── yl40_driver_test.go
│ ├── onewire/
│ │ ├── README.md
│ │ ├── ds18b20_driver.go
│ │ ├── ds18b20_driver_test.go
│ │ ├── helpers_test.go
│ │ ├── onewire_connection.go
│ │ ├── onewire_connection_test.go
│ │ ├── onewire_driver.go
│ │ └── onewire_driver_test.go
│ ├── serial/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── doc.go
│ │ ├── megapi/
│ │ │ └── motor_driver.go
│ │ ├── neurosky/
│ │ │ ├── LICENSE
│ │ │ ├── mindwave_driver.go
│ │ │ └── mindwave_driver_test.go
│ │ ├── serial_driver.go
│ │ ├── serial_driver_test.go
│ │ ├── sphero/
│ │ │ ├── LICENSE
│ │ │ ├── sphero_driver.go
│ │ │ └── sphero_driver_test.go
│ │ └── testutil/
│ │ └── testutil.go
│ └── spi/
│ ├── README.md
│ ├── apa102.go
│ ├── apa102_test.go
│ ├── doc.go
│ ├── helpers_test.go
│ ├── mcp3002.go
│ ├── mcp3002_test.go
│ ├── mcp3004.go
│ ├── mcp3004_test.go
│ ├── mcp3008.go
│ ├── mcp3008_test.go
│ ├── mcp3202.go
│ ├── mcp3202_test.go
│ ├── mcp3204.go
│ ├── mcp3204_test.go
│ ├── mcp3208.go
│ ├── mcp3208_test.go
│ ├── mcp3304.go
│ ├── mcp3304_test.go
│ ├── mfrc522_driver.go
│ ├── mfrc522_driver_test.go
│ ├── spi_config.go
│ ├── spi_connection.go
│ ├── spi_connection_test.go
│ ├── spi_driver.go
│ ├── spi_driver_test.go
│ ├── ssd1306_driver.go
│ └── ssd1306_driver_test.go
├── event.go
├── eventer.go
├── eventer_test.go
├── examples/
│ ├── ardrone.go
│ ├── ardrone_face_tracking.go
│ ├── ardrone_ps3.go
│ ├── audio.go
│ ├── batty.go
│ ├── beaglebone_basic_direct_pin.go
│ ├── beaglebone_blink.go
│ ├── beaglebone_blink_usr_led.go
│ ├── beaglebone_blinkm.go
│ ├── beaglebone_button.go
│ ├── beaglebone_grove_accelerometer.go
│ ├── beaglebone_led_brightness.go
│ ├── beaglebone_led_brightness_with_analog_input.go
│ ├── beaglepocket_direct_pin.go
│ ├── bebop.go
│ ├── bebop.sdp
│ ├── bebop_ps3.go
│ ├── bebop_ps3_video.go
│ ├── bebop_rtp_video.go
│ ├── bleclient_battery.go
│ ├── bleclient_bb8-collision.go
│ ├── bleclient_bb8.go
│ ├── bleclient_device_info.go
│ ├── bleclient_firmata_blink.go
│ ├── bleclient_firmata_curie_imu.go
│ ├── bleclient_generic_access.go
│ ├── bleclient_microbit_accelerometer.go
│ ├── bleclient_microbit_blink.go
│ ├── bleclient_microbit_buttons.go
│ ├── bleclient_microbit_buttons_leds.go
│ ├── bleclient_microbit_io_button.go
│ ├── bleclient_microbit_led.go
│ ├── bleclient_microbit_magnetometer.go
│ ├── bleclient_microbit_temperature.go
│ ├── bleclient_minidrone.go
│ ├── bleclient_minidrone_events.go
│ ├── bleclient_minidrone_mambo_ps3.go
│ ├── bleclient_minidrone_ps3.go
│ ├── bleclient_multiple_generic.go
│ ├── bleclient_multiple_info.go
│ ├── bleclient_ollie.go
│ ├── bleclient_ollie_boost.go
│ ├── bleclient_ollie_crazy.go
│ ├── bleclient_ollie_mqtt.go
│ ├── bleclient_ollie_multiple.go
│ ├── bleclient_ollie_roll.go
│ ├── bleclient_ollie_spin.go
│ ├── bleclient_sprkplus.go
│ ├── bleclient_sprkplus_collision.go
│ ├── chip_blink.go
│ ├── chip_blinkm.go
│ ├── chip_button.go
│ ├── chip_button_led.go
│ ├── chip_drv2605l.go
│ ├── chip_grove_accelerometer.go
│ ├── chip_grove_lcd.go
│ ├── chip_mpu6050.go
│ ├── chip_tsl2561.go
│ ├── chip_wiichuck.go
│ ├── digispark_api.go
│ ├── digispark_blink.go
│ ├── digispark_blinkm.go
│ ├── digispark_driver.go
│ ├── digispark_led_brightness.go
│ ├── digispark_mpl115a2.go
│ ├── digispark_pca9501.go
│ ├── digispark_servo.go
│ ├── dragonboard_button.go
│ ├── edison_blink.go
│ ├── edison_blink_without_all_gobot_framework.go
│ ├── edison_blinkm.go
│ ├── edison_bme280.go
│ ├── edison_button.go
│ ├── edison_button_led.go
│ ├── edison_button_led_api.go
│ ├── edison_grove_accelerometer.go
│ ├── edison_grove_buzzer.go
│ ├── edison_grove_lcd.go
│ ├── edison_grove_light_sensor.go
│ ├── edison_grove_piezo_vibration.go
│ ├── edison_grove_rotary_sensor.go
│ ├── edison_grove_sound_sensor.go
│ ├── edison_grove_temperature_sensor.go
│ ├── edison_led_brightness.go
│ ├── edison_led_brightness_with_analog_input.go
│ ├── edison_miniboard_grove_accelerometer.go
│ ├── every_done.go
│ ├── firmata_adxl345.go
│ ├── firmata_aip1640.go
│ ├── firmata_blink.go
│ ├── firmata_blink_api.go
│ ├── firmata_blink_metal.go
│ ├── firmata_blink_robot.go
│ ├── firmata_blinkm.go
│ ├── firmata_bme280.go
│ ├── firmata_bmp180.go
│ ├── firmata_bmp280.go
│ ├── firmata_button.go
│ ├── firmata_buzzer.go
│ ├── firmata_cat_toy.go
│ ├── firmata_curie_imu.go
│ ├── firmata_curie_imu_shock_detect.go
│ ├── firmata_curie_imu_step_counter.go
│ ├── firmata_curie_imu_tap_detect.go
│ ├── firmata_direct_pin.go
│ ├── firmata_gpio_max7219.go
│ ├── firmata_grove_lcd.go
│ ├── firmata_grove_sound_sensor.go
│ ├── firmata_hmc6352.go
│ ├── firmata_integration.go
│ ├── firmata_led_brightness.go
│ ├── firmata_led_brightness_with_analog_input.go
│ ├── firmata_lidarlite.go
│ ├── firmata_metal_button.go
│ ├── firmata_mma7660.go
│ ├── firmata_motor.go
│ ├── firmata_mpl115a2.go
│ ├── firmata_mpu6050.go
│ ├── firmata_pca9685.go
│ ├── firmata_pir_motion.go
│ ├── firmata_rgb_led.go
│ ├── firmata_servo.go
│ ├── firmata_ssd1306.go
│ ├── firmata_temp36.go
│ ├── firmata_tm1638.go
│ ├── firmata_travis.go
│ ├── firmata_wiichuck.go
│ ├── gopigo3.go
│ ├── gopigo3_grove_button.go
│ ├── gopigo3_grove_lcd.go
│ ├── gopigo3_grove_light_sensor.go
│ ├── gopigo3_led_brightness.go
│ ├── gopigo3_servo.go
│ ├── haarcascade_frontalface_alt.xml
│ ├── hello.go
│ ├── hello_api.go
│ ├── hello_api_auth.go
│ ├── hello_api_custom.go
│ ├── hello_api_video.go
│ ├── holystone_hs200.go
│ ├── jetson-nano_blink.go
│ ├── jetson-nano_servo.go
│ ├── joule_blink.go
│ ├── joule_blinkm.go
│ ├── joule_grove_lcd.go
│ ├── joule_grove_rotary_sensor.go
│ ├── joule_led_brightness.go
│ ├── joule_led_brightness_with_analog_input.go
│ ├── joule_leds.go
│ ├── joystick_ps3.go
│ ├── joystick_ps4.go
│ ├── joystick_ps5.go
│ ├── joystick_xbox360.go
│ ├── joystick_xbox360_rock_band_drums.go
│ ├── joystick_xboxone.go
│ ├── keyboard.go
│ ├── keyboard_mqtt.go
│ ├── leap_motion.go
│ ├── leap_motion_gestures.go
│ ├── leap_motion_hands.go
│ ├── leap_servos.go
│ ├── leap_sphero.go
│ ├── mavlink.go
│ ├── metal_button.go
│ ├── mqtt_driver_ping.go
│ ├── mqtt_firmata_blink.go
│ ├── mqtt_ping.go
│ ├── nanopct6_direct_pin.go
│ ├── nanopct6_ds18b20.go
│ ├── nanopct6_servo.go
│ ├── nanopct6_thermalzone.go
│ ├── nanopct6_yl40.go
│ ├── nanopi_button.go
│ ├── nanopi_direct_pin.go
│ ├── nanopi_direct_pin_event.go
│ ├── nanopi_led_brightness.go
│ ├── nanopi_pca9533.go
│ ├── nats.go
│ ├── nats_driver_ping.go
│ ├── opencv_face_detect.go
│ ├── opencv_window.go
│ ├── orangepi5pro_direct_pin.go
│ ├── orangepi5pro_servo.go
│ ├── orangepi5pro_thermalzone.go
│ ├── particle_api.go
│ ├── particle_blink.go
│ ├── particle_button.go
│ ├── particle_events.go
│ ├── particle_function.go
│ ├── particle_led_brightness.go
│ ├── particle_variable.go
│ ├── pebble.go
│ ├── pebble_accelerometer.go
│ ├── raspi_adafruit2327_servo.go
│ ├── raspi_adafruit2348_dcmotor.go
│ ├── raspi_adafruit2348_stepper.go
│ ├── raspi_ads1015.go
│ ├── raspi_blink.go
│ ├── raspi_blinkm.go
│ ├── raspi_button.go
│ ├── raspi_ccs811.go
│ ├── raspi_direct_pin.go
│ ├── raspi_direct_pin_event.go
│ ├── raspi_generic.go
│ ├── raspi_grove_pi_blink.go
│ ├── raspi_grove_pi_button.go
│ ├── raspi_grove_pi_dht.go
│ ├── raspi_grove_pi_rotary.go
│ ├── raspi_grove_pi_ultrasonic.go
│ ├── raspi_grove_rotary_sensor.go
│ ├── raspi_hcsr04.go
│ ├── raspi_hmc5883l.go
│ ├── raspi_ina3221.go
│ ├── raspi_led_brightness.go
│ ├── raspi_mcp3008.go
│ ├── raspi_pca9533.go
│ ├── raspi_servo.go
│ ├── raspi_sht2x.go
│ ├── raspi_sht3x.go
│ ├── raspi_ssd1306.go
│ ├── raspi_ssd1306spi.go
│ ├── raspi_stepper_move.go
│ ├── raspi_thermalzone.go
│ ├── rock64_direct_pin.go
│ ├── rock64_yl40.go
│ ├── serialport_megapi_motor.go
│ ├── serialport_mindwave.go
│ ├── serialport_sphero.go
│ ├── serialport_sphero_api.go
│ ├── serialport_sphero_calibration.go
│ ├── serialport_sphero_conways.go
│ ├── serialport_sphero_dpad.go
│ ├── serialport_sphero_master.go
│ ├── serialport_sphero_multiple.go
│ ├── square.go
│ ├── square_fire.go
│ ├── tello.go
│ ├── tello_facetracker.go
│ ├── tello_keyboard.go
│ ├── tello_opencv.go
│ ├── tello_ps3.go
│ ├── tello_video.go
│ ├── tinkerboard2_direct_pin_bin_counter.go
│ ├── tinkerboard2_yl40.go
│ ├── tinkerboard_adafruit1109_lcd_keys.go
│ ├── tinkerboard_ads1115.go
│ ├── tinkerboard_adxl345.go
│ ├── tinkerboard_blink.go
│ ├── tinkerboard_bme280.go
│ ├── tinkerboard_bmp280.go
│ ├── tinkerboard_button.go
│ ├── tinkerboard_direct_pin.go
│ ├── tinkerboard_ds18b20.go
│ ├── tinkerboard_generic.go
│ ├── tinkerboard_grove_lcd.go
│ ├── tinkerboard_hcsr04.go
│ ├── tinkerboard_hmc5883l.go
│ ├── tinkerboard_mfcrc522gpio.go
│ ├── tinkerboard_mfcrc522spi.go
│ ├── tinkerboard_motor.go
│ ├── tinkerboard_mpl115a2.go
│ ├── tinkerboard_mpu6050.go
│ ├── tinkerboard_pca9533.go
│ ├── tinkerboard_pcf8583_clock.go
│ ├── tinkerboard_pcf8583_counter.go
│ ├── tinkerboard_pcf8591.go
│ ├── tinkerboard_thermalzone.go
│ ├── up2_lcd.go
│ ├── up2_leds.go
│ ├── wifi_firmata_analog_input.go
│ ├── wifi_firmata_blink.go
│ ├── zero_analog.go
│ ├── zero_direct_pin.go
│ ├── zero_servo.go
│ └── zero_yl40.go
├── go.mod
├── go.sum
├── helpers_test.go
├── manager.go
├── manager_test.go
├── platforms/
│ ├── adaptors/
│ │ ├── analogpinsadaptor.go
│ │ ├── analogpinsadaptor_test.go
│ │ ├── analogpinsadaptoroptions.go
│ │ ├── analogpinsadaptoroptions_test.go
│ │ ├── analogpintranslator.go
│ │ ├── analogpintranslator_test.go
│ │ ├── busnumbervalidator.go
│ │ ├── busnumbervalidator_test.go
│ │ ├── digitalpinsadaptor.go
│ │ ├── digitalpinsadaptor_test.go
│ │ ├── digitalpinsadaptoroptions.go
│ │ ├── digitalpinsadaptoroptions_test.go
│ │ ├── digitalpintranslator.go
│ │ ├── digitalpintranslator_test.go
│ │ ├── i2cbusadaptor.go
│ │ ├── i2cbusadaptor_test.go
│ │ ├── i2cbusadaptoroptions.go
│ │ ├── i2cbusadaptoroptions_test.go
│ │ ├── onewirebusadaptor.go
│ │ ├── onewirebusadaptor_test.go
│ │ ├── onewirebusadaptoroptions.go
│ │ ├── onewirebusadaptoroptions_test.go
│ │ ├── piblasterpwm_pin.go
│ │ ├── piblasterpwm_pin_test.go
│ │ ├── pwmpinsadaptor.go
│ │ ├── pwmpinsadaptor_test.go
│ │ ├── pwmpinsadaptoroptions.go
│ │ ├── pwmpinsadaptoroptions_test.go
│ │ ├── pwmpintranslator.go
│ │ ├── pwmpintranslator_test.go
│ │ ├── spibusadaptor.go
│ │ ├── spibusadaptor_test.go
│ │ ├── spibusadaptoroptions.go
│ │ └── spibusadaptoroptions_test.go
│ ├── asus/
│ │ ├── tinkerboard/
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── adaptor.go
│ │ │ ├── adaptor_test.go
│ │ │ ├── doc.go
│ │ │ └── pinmap.go
│ │ └── tinkerboard2/
│ │ ├── README.md
│ │ ├── adaptor.go
│ │ ├── adaptor_test.go
│ │ └── pinmap.go
│ ├── audio/
│ │ ├── LICENSE
│ │ ├── audio_adaptor.go
│ │ ├── audio_adaptor_test.go
│ │ ├── audio_driver.go
│ │ ├── audio_driver_test.go
│ │ └── doc.go
│ ├── beagleboard/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── beaglebone/
│ │ │ ├── adaptor.go
│ │ │ ├── adaptor_test.go
│ │ │ └── pinmap.go
│ │ ├── doc.go
│ │ └── pocketbeagle/
│ │ ├── adaptor.go
│ │ ├── adaptor_test.go
│ │ └── pinmap.go
│ ├── bleclient/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── ble_client_adaptor.go
│ │ ├── ble_client_adaptor_options.go
│ │ ├── ble_client_adaptor_options_test.go
│ │ ├── ble_client_adaptor_test.go
│ │ ├── btwrapper.go
│ │ ├── doc.go
│ │ ├── helpers_test.go
│ │ ├── uuid.go
│ │ └── uuid_test.go
│ ├── chip/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── chip_adaptor.go
│ │ ├── chip_adaptor_test.go
│ │ ├── chip_pinmap.go
│ │ ├── chippro_adaptor.go
│ │ ├── chippro_adaptor_test.go
│ │ ├── chippro_pinmap.go
│ │ └── doc.go
│ ├── dexter/
│ │ ├── README.md
│ │ ├── dexter.go
│ │ └── gopigo3/
│ │ ├── README.md
│ │ ├── driver.go
│ │ └── driver_test.go
│ ├── digispark/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── digispark_adaptor.go
│ │ ├── digispark_adaptor_test.go
│ │ ├── digispark_i2c.go
│ │ ├── digispark_i2c_test.go
│ │ ├── doc.go
│ │ ├── littleWire.c
│ │ ├── littleWire.go
│ │ ├── littleWire.h
│ │ ├── littleWire_servo.c
│ │ ├── littleWire_servo.h
│ │ ├── littleWire_util.c
│ │ ├── littleWire_util.h
│ │ ├── opendevice.c
│ │ └── opendevice.h
│ ├── dji/
│ │ ├── README.md
│ │ ├── dji.go
│ │ └── tello/
│ │ ├── README.md
│ │ ├── crc.go
│ │ ├── driver.go
│ │ ├── driver_test.go
│ │ ├── pitch.go
│ │ └── pitch_test.go
│ ├── dragonboard/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── doc.go
│ │ ├── dragonboard_adaptor.go
│ │ └── dragonboard_adaptor_test.go
│ ├── firmata/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── ble_firmata_adaptor.go
│ │ ├── ble_firmata_adaptor_test.go
│ │ ├── client/
│ │ │ ├── client.go
│ │ │ ├── client_test.go
│ │ │ └── examples/
│ │ │ └── blink.go
│ │ ├── doc.go
│ │ ├── firmata_adaptor.go
│ │ ├── firmata_adaptor_test.go
│ │ ├── firmata_i2c.go
│ │ ├── firmata_i2c_test.go
│ │ ├── tcp_firmata_adaptor.go
│ │ └── tcp_firmata_adaptor_test.go
│ ├── friendlyelec/
│ │ ├── nanopct6/
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── adaptor.go
│ │ │ ├── adaptor_test.go
│ │ │ ├── doc.go
│ │ │ └── pinmap.go
│ │ └── nanopi/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── adaptor.go
│ │ ├── adaptor_test.go
│ │ ├── doc.go
│ │ └── neo_pinmap.go
│ ├── holystone/
│ │ ├── README.md
│ │ ├── holystone.go
│ │ └── hs200/
│ │ ├── README.md
│ │ ├── doc.go
│ │ ├── hs200_driver.go
│ │ └── hs200_driver_test.go
│ ├── intel-iot/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── curie/
│ │ │ ├── README.md
│ │ │ ├── doc.go
│ │ │ ├── imu_driver.go
│ │ │ └── imu_driver_test.go
│ │ ├── edison/
│ │ │ ├── README.md
│ │ │ ├── arduino_pinmap.go
│ │ │ ├── doc.go
│ │ │ ├── edison_adaptor.go
│ │ │ ├── edison_adaptor_test.go
│ │ │ ├── miniboard_pinmap.go
│ │ │ └── sparkfun_pinmap.go
│ │ ├── intel-iot.go
│ │ └── joule/
│ │ ├── README.md
│ │ ├── doc.go
│ │ ├── joule_adaptor.go
│ │ ├── joule_adaptor_test.go
│ │ └── tuchuck_pinmap.go
│ ├── jetson/
│ │ ├── README.md
│ │ ├── adaptor.go
│ │ ├── adaptor_test.go
│ │ ├── doc.go
│ │ └── pinmap.go
│ ├── joystick/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── bin/
│ │ │ └── scanner.go
│ │ ├── configs/
│ │ │ ├── dualsense.json
│ │ │ ├── dualshock3.json
│ │ │ ├── dualshock4.json
│ │ │ ├── magicseer1.json
│ │ │ ├── shield.json
│ │ │ └── xbox360_power_a_mini_proex.json
│ │ ├── doc.go
│ │ ├── events.go
│ │ ├── joystick_adaptor.go
│ │ ├── joystick_adaptor_test.go
│ │ ├── joystick_driver.go
│ │ ├── joystick_driver_test.go
│ │ ├── joystick_dualsense.go
│ │ ├── joystick_dualshock3_darwin.go
│ │ ├── joystick_dualshock3_linux.go
│ │ ├── joystick_dualshock3_windows.go
│ │ ├── joystick_dualshock4_darwin.go
│ │ ├── joystick_dualshock4_linux.go
│ │ ├── joystick_dualshock4_windows.go
│ │ ├── joystick_nintendo_joycon.go
│ │ ├── joystick_shield.go
│ │ ├── joystick_tflight_hotas_x.go
│ │ ├── joystick_xbox360.go
│ │ ├── joystick_xbox360_rock_band_drums.go
│ │ ├── joystick_xboxone.go
│ │ └── test_helper.go
│ ├── keyboard/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── doc.go
│ │ ├── keyboard.go
│ │ ├── keyboard_driver.go
│ │ ├── keyboard_driver_test.go
│ │ └── keyboard_test.go
│ ├── leap/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── doc.go
│ │ ├── leap_motion_adaptor.go
│ │ ├── leap_motion_adaptor_test.go
│ │ ├── leap_motion_driver.go
│ │ ├── leap_motion_driver_test.go
│ │ ├── parser.go
│ │ └── test/
│ │ └── support/
│ │ └── example_frame.json
│ ├── mavlink/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── common/
│ │ │ ├── common.go
│ │ │ ├── mavlink.go
│ │ │ └── version.go
│ │ ├── doc.go
│ │ ├── mavlink_adaptor.go
│ │ ├── mavlink_adaptor_test.go
│ │ ├── mavlink_driver.go
│ │ ├── mavlink_driver_test.go
│ │ ├── mavlink_udp_adaptor.go
│ │ └── mavlink_udp_adaptor_test.go
│ ├── megapi/
│ │ ├── README.md
│ │ └── doc.go
│ ├── microbit/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── doc.go
│ ├── mqtt/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── doc.go
│ │ ├── mqtt_adaptor.go
│ │ ├── mqtt_adaptor_test.go
│ │ ├── mqtt_driver.go
│ │ └── mqtt_driver_test.go
│ ├── nats/
│ │ ├── README.md
│ │ ├── doc.go
│ │ ├── nats_adaptor.go
│ │ ├── nats_adaptor_test.go
│ │ ├── nats_driver.go
│ │ ├── nats_driver_test.go
│ │ └── test_certs/
│ │ ├── catest-key.pem
│ │ ├── catest.pem
│ │ ├── client-cert.pem
│ │ ├── client-key.pem
│ │ ├── server-cert.pem
│ │ └── server-key.pem
│ ├── neurosky/
│ │ ├── LICENSE
│ │ └── README.md
│ ├── opencv/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── camera_driver.go
│ │ ├── camera_driver_test.go
│ │ ├── doc.go
│ │ ├── haarcascade_frontalface_alt.xml
│ │ ├── helpers_test.go
│ │ ├── utils.go
│ │ ├── utils_test.go
│ │ ├── window_driver.go
│ │ └── window_driver_test.go
│ ├── orangepi/
│ │ └── orangepi5pro/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── adaptor.go
│ │ ├── adaptor_test.go
│ │ ├── doc.go
│ │ └── pinmap.go
│ ├── parrot/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── ardrone/
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── ardrone_adaptor.go
│ │ │ ├── ardrone_adaptor_test.go
│ │ │ ├── ardrone_driver.go
│ │ │ ├── ardrone_driver_test.go
│ │ │ ├── doc.go
│ │ │ ├── pitch.go
│ │ │ ├── pitch_test.go
│ │ │ └── test_helper.go
│ │ ├── bebop/
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── bebop_adaptor.go
│ │ │ ├── bebop_adaptor_test.go
│ │ │ ├── bebop_driver.go
│ │ │ ├── bebop_driver_test.go
│ │ │ ├── client/
│ │ │ │ ├── client.go
│ │ │ │ ├── constants.go
│ │ │ │ ├── examples/
│ │ │ │ │ ├── ff.conf
│ │ │ │ │ ├── takeoff.go
│ │ │ │ │ └── video.go
│ │ │ │ └── networkframegenerator.go
│ │ │ ├── doc.go
│ │ │ ├── pitch.go
│ │ │ ├── pitch_test.go
│ │ │ └── test_helper.go
│ │ ├── minidrone/
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ └── doc.go
│ │ └── parrot.go
│ ├── particle/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── adaptor.go
│ │ ├── adaptor_test.go
│ │ └── doc.go
│ ├── pebble/
│ │ ├── README.md
│ │ ├── doc.go
│ │ ├── pebble_adaptor.go
│ │ ├── pebble_adaptor_test.go
│ │ ├── pebble_driver.go
│ │ └── pebble_driver_test.go
│ ├── pine64/
│ │ └── rock64/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── adaptor.go
│ │ ├── adaptor_test.go
│ │ ├── doc.go
│ │ └── pinmap.go
│ ├── radxa/
│ │ ├── rockpi/
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── adaptor.go
│ │ │ ├── adaptor_test.go
│ │ │ ├── doc.go
│ │ │ └── pinmap.go
│ │ └── zero/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── adaptor.go
│ │ ├── adaptor_test.go
│ │ ├── doc.go
│ │ └── pinmap.go
│ ├── raspi/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── adaptor.go
│ │ ├── adaptor_test.go
│ │ ├── doc.go
│ │ └── pinmap.go
│ ├── serialport/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── adaptor.go
│ │ ├── adaptor_options.go
│ │ ├── adaptor_options_test.go
│ │ ├── adaptor_test.go
│ │ ├── doc.go
│ │ └── helpers_test.go
│ ├── sphero/
│ │ ├── bb8/
│ │ │ ├── LICENSE
│ │ │ └── README.md
│ │ ├── ollie/
│ │ │ ├── LICENSE
│ │ │ └── README.md
│ │ ├── sphero/
│ │ │ ├── LICENSE
│ │ │ └── README.md
│ │ └── sprkplus/
│ │ ├── LICENSE
│ │ └── README.md
│ └── upboard/
│ ├── README.md
│ ├── up2/
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── adaptor.go
│ │ ├── adaptor_test.go
│ │ ├── doc.go
│ │ └── pinmap.go
│ └── upboard.go
├── robot.go
├── robot_test.go
├── robot_work.go
├── robot_work_test.go
├── system/
│ ├── GPIO.md
│ ├── I2C.md
│ ├── ONEWIRE.md
│ ├── PWM.md
│ ├── README.md
│ ├── analogpin_sysfs.go
│ ├── analogpin_sysfs_test.go
│ ├── digitalpin_bench_test.go
│ ├── digitalpin_cdev.go
│ ├── digitalpin_cdev_test.go
│ ├── digitalpin_mock.go
│ ├── digitalpin_poll.go
│ ├── digitalpin_poll_test.go
│ ├── digitalpin_sysfs.go
│ ├── digitalpin_sysfs_test.go
│ ├── digitalpinaccess.go
│ ├── digitalpinaccess_test.go
│ ├── digitalpinoptions.go
│ ├── digitalpinoptions_test.go
│ ├── doc.go
│ ├── fs.go
│ ├── fs_mock.go
│ ├── fs_mock_test.go
│ ├── fs_test.go
│ ├── i2c_device.go
│ ├── i2c_device_test.go
│ ├── onewiredevice_sysfs.go
│ ├── onewiredevice_sysfs_test.go
│ ├── pwmpin_sysfs.go
│ ├── pwmpin_sysfs_test.go
│ ├── spi_gpio.go
│ ├── spi_gpio_test.go
│ ├── spi_mock.go
│ ├── spi_periphio.go
│ ├── spiaccess.go
│ ├── spiaccess_test.go
│ ├── syscall.go
│ ├── syscall_mock.go
│ ├── sysfsfileaccess.go
│ ├── system.go
│ ├── system_test.go
│ ├── systemoptions.go
│ └── systemoptions_test.go
├── utils.go
└── utils_test.go
================================================
FILE CONTENTS
================================================
================================================
FILE: .chglog/CHANGELOG.gobot.md
================================================
# {{ .Info.Title }}
Please adjust manually before add content to CHANGELOG.md.
{{ if .Versions -}}
## [Unreleased]({{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD)
{{ if .Unreleased.CommitGroups -}}
{{ range .Unreleased.CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
* {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}
{{ range .Versions }}## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})
{{ range .CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
* {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}
{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### {{ .Title }}
{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}
================================================
FILE: .chglog/README.md
================================================
# Creating a changelog automatically
## Install and configure tool
We using <https://github.com/git-chglog/git-chglog>, so refer to this side for installation instructions.
It is possible to test the tool by `git-chglog --init` without overriding anything.
## Usage
Example for a new release "v2.6.0":
```sh
# optional update tool by: go install github.com/git-chglog/git-chglog/cmd/git-chglog@latest
git checkout release
git pull
git fetch --tags
git checkout dev
git pull upstream dev
git checkout -b rel/prepare_for_release_v260
git-chglog --config .chglog/config_gobot.yml --no-case --next-tag v2.6.0 v2.5.0.. > .chglog/chglog_tmp.md
```
## Compare
If unsure about any result of running git-chglog, just use:
`git log --since=2025-02-16 --pretty="- %s"`
## Manual adjustment
Most likely some manual work is needed to bring the items in the correct position. We use the style from
["keep a changelog"](https://keepachangelog.com/en/1.1.0/), together with the [standard template](https://github.com/git-chglog/example-type-scope-subject/blob/master/CHANGELOG.standard.md).
The changelog will be generated based on the commit messages, so please follow the
[Convention for Pull Request Descriptions](../CONTRIBUTING.md).
An example for the following commits:
* type(scope): description
* i2c(PCF8583): added
* gpio(HD44780): fix wrong constants
* raspi(PWM): refactor usage
* docs(core): usage of Kernel driver
* or alternative: core(docs): usage of Kernel driver
* build(style): adjust rule for golangci-lint
```md
### Build
* **style**: adjust rule for golangci-lint
### Docs
* **core**: usage of Kernel driver
### I2c
* **PCF8583**: added
### Gpio
* **HD44780**: fix wrong constants
### Raspi
* **PWM**: refactor usage
### Type
* **scope:** description
```
If in doubt, please refer to the current CHANGELOG.md to find the correct way.
## Finalization
After all work is done in the temporary changelog file, the content can be moved to the real one and the "chglog_tmp.md"
file can be removed.
================================================
FILE: .chglog/config_gobot.yml
================================================
style: github
template: CHANGELOG.gobot.md
info:
title: Auto-Generated Changelog
repository_url: https://github.com/hybridgroup/gobot
options:
header:
pattern: "^(\\w*|1-wire)(?:\\(([\\w\\$\\.\\,\\-\\*\\s]*)\\))?\\:?\\s(.*)$"
pattern_maps:
- Type
- Scope
- Subject
notes:
keywords:
- BREAKING CHANGE
================================================
FILE: .circleci/config.yml
================================================
# Since switch to cimg, the GOPATH has been changed from /go to $HOME/go.
# The latter will expand to the full path of /home/circleci/go.
# On first run, this change may affect caching and some other commands if
# you don’t correct the page in your config.
#
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/circleci-images
# - image: cimg/postgres:14.5.0
#
# For more information, please read https://github.com/CircleCI-Public/cimg-go/blob/main/README.md
version: 2
jobs:
"test_core_and_drivers_with_coverage":
docker:
- image: cimg/go:1.24
steps:
- checkout
- run:
name: Debug version
command: go version
- run:
name: Core and drivers tests
command: |
go test -race -v -coverprofile=coverage.txt -covermode=atomic . ./drivers/...
- run:
name: Code coverage
command: |
bash <(curl -s https://codecov.io/bash)
"test_platforms":
docker:
- image: cimg/go:1.24
steps:
- checkout
- run:
name: Debug version
command: go version
- run:
# digispark needs libusb, opencv needs opencv
name: Platform tests (except digispark and opencv)
command: |
go test -race -v $(go list ./platforms/... | grep -v platforms/digispark | grep -v platforms/opencv)
"check_examples":
docker:
- image: cimg/go:1.24
steps:
- checkout
- run:
name: Debug version
command: go version
- run:
# digispark needs libusb, opencv needs opencv
name: Check examples (except digispark, opencv)
command: |
ALL=$(grep -l -r --include "*.go" 'build example' ./)
SOME=$(grep -L 'digispark' $(grep -L 'gocv' ${ALL}))
for e in ${SOME} ; do go vet "${e}" ; done
"fmt_check_examples":
docker:
- image: golangci/golangci-lint:v2.4.0
steps:
- checkout
- run:
name: Debug linter version
command: golangci-lint --version
- run:
# digispark needs libusb, opencv needs opencv
name: Check examples for linter issues (except digispark, opencv)
command: |
ALL=$(grep -l -r --include "*.go" 'build example' ./)
SOME=$(grep -L 'digispark' $(grep -L 'gocv' ${ALL}))
for e in ${SOME} ; do golangci-lint run "${e}" --build-tags example --disable forcetypeassert --disable noctx ; done
workflows:
version: 2
build:
jobs:
- "test_core_and_drivers_with_coverage"
- "test_platforms"
- "check_examples"
- "fmt_check_examples"
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
# github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: deadprogram
# open_collective: # Replace with a single Open Collective username
# ko_fi: # Replace with a single Ko-fi username
# tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
# custom: # Replace with a single custom sponsorship URL
================================================
FILE: .github/dependabot.yml
================================================
# package-ecosystem, directory and schedule is mandatory
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
# Raise pull requests for version updates
# for go modules against the `dev` branch
target-branch: "dev"
================================================
FILE: .github/pull_request_template.md
================================================
## Solved issues and/or description of the change
...
## Manual test
- OS and Version (Win/Mac/Linux):
- Adaptor(s) and/or driver(s):
...
## Checklist
- [ ] The PR's target branch is 'hybridgroup:dev'
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes (e.g. by run `make test_race`)
- [ ] No linter errors exist locally (e.g. by run `make fmt_check`)
- [ ] I have performed a self-review of my own code
If this is a new driver or adaptor:
- [ ] I have added the name to the corresponding README.md
- [ ] I have added an example to see how to setup and use it
- [ ] I have checked or build at least my new example (e.g. by run `make examples_check`)
If this is a Go version or module update:
- [ ] go.mod to new version updated
- [ ] modules updated (go get -u -t ./...)
- [ ] CI files updated
- [ ] linter setting and linter version (if a newer one exist) updated
- [ ] linter issues fixed or suppressed by config
If this is a PR for release:
- [ ] The PR's target branch is 'hybridgroup:release'
- [ ] I have adjusted the CHANGELOG.md (or already prepared and will be merged as soon as possible)
================================================
FILE: .github/workflows/golangci-lint.yml
================================================
name: golangci-lint
on:
push:
tags:
- v*
branches:
- dev
pull_request:
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v7
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v2.4.0
# Optional: working directory, useful for monorepos
# working-directory: v2
# Optional: golangci-lint command line arguments.
# Note: exclude arguments, e.g. --exclude-files="my_file", will not affect the "typecheck" linter,
# at least since v1.61.0 - use build tags instead.
#args: --exclude-files="platforms/digispark/digispark_adaptor.go"
# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
# Optional: if set to true then the all caching functionality will be complete disabled,
# takes precedence over all other caching options.
# skip-cache: true
================================================
FILE: .gitignore
================================================
.sass-cache
*.test
*.swp
*.snap
profile.cov
count.out
/parts
/prime
/stage
vendor/
output/
.idea/
coverage.txt
.chglog/chglog_tmp*.md
.chglog/CHANGELOG.tpl*.md
.chglog/config.yml
================================================
FILE: .golangci.yml
================================================
# note: GolangCI-Lint also searches for config files in all directories from the directory of the first analyzed path up to the root.
version: "2"
run:
build-tags:
- utils
# Timeout for analysis, e.g. 30s, 5m.
# gobot is very expensive, on a machine with heavy load it takes some minutes
# for first run or after empty the cache by 'golangci-lint cache clean'
# Default: 1m
timeout: 5m
# If set we pass it to "go list -mod={option}". From "go help modules":
# If invoked with -mod=readonly, the go command is disallowed from the implicit
# automatic updating of go.mod described above. Instead, it fails when any changes
# to go.mod are needed. This setting is most useful to check that go.mod does
# not need updates, such as in a continuous integration and testing system.
# If invoked with -mod=vendor, the go command assumes that the vendor
# directory holds the correct copies of dependencies and ignores
# the dependency descriptions in go.mod.
#
# Allowed values: readonly|vendor|mod
# By default, it isn't set.
modules-download-mode: readonly
# https://golangci-lint.run/usage/linters/#enabled-by-default
# note: typecheck can not be disabled, it is used to check code compilation
linters:
default: all
disable:
# deprecated: none
# not used for this go version: none
# not used for any reason
- err113 # not used (we allow error creation at return statement)
- exhaustive # not used (we allow incomplete usage of enum switch, e.g. with default case)
- forbidigo # not used (we allow print statements)
- ginkgolinter # not needed (enforces standards of using ginkgo and gomega)
- gochecknoglobals # not used (we allow definition of unexposed variables at top level)
- godot # not used (seems to be counting peas)
- godox # not used (we have many TODOs, so not useful)
- gosmopolitan # not needed (report i18n/l10n anti-patterns)
- importas # not needed (there is no alias rule at the moment)
- ireturn # not used (we allow return interfaces)
- loggercheck # not needed (relates to kitlog, klog, logr, zap)
- noinlineerr # this violates best practices in other style guides
- paralleltest # not used
- promlinter # not needed (prometheus metrics naming)
- rowserrcheck # not needed (sql related)
- sqlclosecheck # not needed (sql related)
- testpackage # not needed, we use the same name for test package to have access to unexposed items
- wrapcheck # not needed (we allow errors from interface methods)
- zerologlint # not needed (related to zerolog package)
# useful for the future
- cyclop # useful with some tweeks (better understandable code), see also gocyclo
- dupl # useful with some tweeks (reduce bugs and lines of code)
- errname # useful for common style
- exhaustruct # useful with some exclusions for existing code (e.g. mavlink/common/common.go)
- funcorder # common style, but too many findings
- funlen # useful with some tweeks (reduce bugs, simplify code, better understandable code)
- gocognit # useful with some tweeks (better understandable code)
- goconst # useful (reduce bugs)
- gocyclo # useful with some tweeks (better understandable code)
- goheader # useful, if we introduce a common header (e.g. for copyright)
- interfacebloat # useful with some exclusions at usage of external packages
- intrange # introduced with go 1.22, will simplify the range syntax
- maintidx # useful with some tweeks (better understandable code), maybe use instead "gocyclo", "gocognit" , "cyclop"
- mnd # useful with some exclusions for existing code (e.g. mavlink.go)
- nestif # useful (reduce bugs, simplify code, better understandable code)
- nlreturn # more common style, but could become annoying
- tagliatelle # maybe useful with some tweaking or excluding
- varnamelen # maybe useful with some tweaking, but many findings
- whitespace # more common style, but could become annoying
- wsl # more common style, but could become annoying
- wsl_v5 # same as above
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
settings:
depguard:
# Rules to apply.
#
# Variables:
# - File Variables
# you can still use and exclamation mark ! in front of a variable to say not to use it.
# Example !$test will match any file that is not a go test file.
#
# `$all` - matches all go files
# `$test` - matches all go test files
#
# - Package Variables
#
# `$gostd` - matches all of go's standard library (Pulled from `GOROOT`)
#
# Default: Only allow $gostd in all files.
rules:
main:
# Packages that are not allowed where the value is a suggestion.
deny:
- pkg: github.com/pkg/errors
desc: Should be replaced by standard lib errors package
dupword:
# Keywords for detecting duplicate words.
# If this list is not empty, only the words defined in this list will be detected.
# Default: []
keywords:
- the
- and
- a
errorlint:
# Default: true
# %v should be used by default over %w, see https://github.com/uber-go/guide/blob/master/style.md#error-wrapping
errorf: false
# Permit more than 1 %w verb, valid per Go 1.20 (Requires errorf:true)
# Default: true
errorf-multi: false
gocritic:
disabled-checks:
- assignOp # very opinionated
- appendAssign # mostly used by intention
nolintlint:
# Enable to require an explanation of nonzero length after each nolint directive.
# Default: false
require-explanation: true
# Enable to require nolint directives to mention the specific linter being suppressed.
# Default: false
require-specific: true
perfsprint:
# Optimizes `fmt.Errorf`.
# Default: true
errorf: false
# Optimizes `fmt.Sprintf` with only one argument
# Default: true
sprintf1: false
revive:
rules:
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-return
# disable this rule, because sometimes it has its justification
- name: unexported-return
severity: warning
disabled: true
formatters:
enable:
- gci
- gofmt
- gofumpt
- goimports
exclusions:
generated: lax
settings:
gci:
# Section configuration to compare against.
# Section names are case-insensitive and may contain parameters in ().
# The default order of sections is `standard > default > custom > blank > dot`,
# If `custom-order` is `true`, it follows the order of `sections` option.
# Default: ["standard", "default"]
sections:
- standard # Standard section: captures all standard packages.
- default # Default section: contains all imports that could not be matched to another section type.
- prefix(gobot.io/x/gobot/) # Custom section: groups all imports with the specified Prefix.
#- blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled.
#- dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled.
# Enable custom order of sections.
# If `true`, make the section order the same as the order of `sections`.
# Default: false
custom-order: true
================================================
FILE: CHANGELOG.md
================================================
# CHANGELOG
## [Unreleased](https://github.com/hybridgroup/gobot/compare/v2.6.0...HEAD)
## [v2.6.0](https://github.com/hybridgroup/gobot/compare/v2.5.0...v2.6.0) (2025-10-18)
### Adaptors
* **all:** add debug option ([#1181](https://github.com/hybridgroup/gobot/issues/1181))
### Ble
* fix some issues in connect and disconnect ([#1161](https://github.com/hybridgroup/gobot/issues/1161))
### Build
* **deps:** update modules ([#1186](https://github.com/hybridgroup/gobot/issues/1186))
* **go, deps:** switch to Go 1.24 linter 2.4.0 and update modules ([#1162](https://github.com/hybridgroup/gobot/issues/1162))
### Common
* improve robot level errors ([#1180](https://github.com/hybridgroup/gobot/issues/1180))
### Doc
* **core:** prepare for release v2.6.0
### Drivers
* fix nil connector check ([#1178](https://github.com/hybridgroup/gobot/issues/1178))
### I2c
* **adafruit1109:** rework debug messages ([#1182](https://github.com/hybridgroup/gobot/issues/1182))
* **all:** ensure halt is idempotent ([#1171](https://github.com/hybridgroup/gobot/issues/1171))
* **bme280:** fix default name ([#1177](https://github.com/hybridgroup/gobot/issues/1177))
* **mcp23017:** fix missing code for halt is idempotent ([#1175](https://github.com/hybridgroup/gobot/issues/1175))
### Onewire
* **all:** ensure halt is idempotent ([#1174](https://github.com/hybridgroup/gobot/issues/1174))
### Platforms
* **bleclient:** improve errors and add sleep option ([#1179](https://github.com/hybridgroup/gobot/issues/1179))
### Spi
* **all:** ensure halt is idempotent ([#1173](https://github.com/hybridgroup/gobot/issues/1173))
### Wiichuck
* fix go routine leaking and concurrency problem ([#1172](https://github.com/hybridgroup/gobot/issues/1172))
## [v2.5.0](https://github.com/hybridgroup/gobot/compare/v2.4.0...v2.5.0) (2025-02-16)
### Build
* **deps:** update modules ([#1131](https://github.com/hybridgroup/gobot/issues/1131))
* **linter:** update linter to v1.64.5 and fix issues ([#1130](https://github.com/hybridgroup/gobot/issues/1130))
### Core
* **system:** split system accesser features ([#1121](https://github.com/hybridgroup/gobot/issues/1121))
### Doc
* **core:** prepare for release v2.5.0
### Drivers
* fix some function names in comment ([#1103](https://github.com/hybridgroup/gobot/issues/1103))
### Examples
* correct all usage of ps3 joystick reads, which are now int instead of int16 ([#1085](https://github.com/hybridgroup/gobot/issues/1085))
### Gpio
* rename gpiod to gpiocdev ([#1116](https://github.com/hybridgroup/gobot/issues/1116))
* **adaptors:** fix so now gpiodev is used as default ([#1112](https://github.com/hybridgroup/gobot/issues/1112))
* **core:** fix sporadic hang on finish for discrete edge polling ([#1107](https://github.com/hybridgroup/gobot/issues/1107))
### Nanopct6
* introduce adaptor for FriendlyELEC NanoPC-T6 ([#1126](https://github.com/hybridgroup/gobot/issues/1126))
### Onewire
* **ds18b20:** introduce 1-wire device access by sysfs and temp driver ([#1091](https://github.com/hybridgroup/gobot/issues/1091))
### Orangepi5pro
* introduce adaptor for OrangePi 5 Pro ([#1129](https://github.com/hybridgroup/gobot/issues/1129))
### Platforms
* file name and folder unification ([#1127](https://github.com/hybridgroup/gobot/issues/1127))
### Pocketbeagle
* introduce and use cdev by default ([#1118](https://github.com/hybridgroup/gobot/issues/1118))
### Rock64
* introduce adaptor for PINE64-ROCK64 ([#1122](https://github.com/hybridgroup/gobot/issues/1122))
### Sphero
* fix panic by removing unnecessary go routine ([#1117](https://github.com/hybridgroup/gobot/issues/1117))
### Tests
* fix for arm64 environment and stabilize ([#1115](https://github.com/hybridgroup/gobot/issues/1115))
### Tinkerboard2
* introduce adapter for Asus Tinker Board 2 ([#1108](https://github.com/hybridgroup/gobot/issues/1108))
### Zero
* introduce adaptor for Radxa Zero ([#1128](https://github.com/hybridgroup/gobot/issues/1128))
## [v2.4.0](https://github.com/hybridgroup/gobot/compare/v2.3.0...v2.4.0) (2024-11-05)
### Bebop
* fix concurrent map writes ([#1063](https://github.com/hybridgroup/gobot/issues/1063))
### Ble
* add support for functional options, add tests ([#1059](https://github.com/hybridgroup/gobot/issues/1059))
* introduce in drivers folder ([#1057](https://github.com/hybridgroup/gobot/issues/1057))
* **client:** add scan timout ([#1051](https://github.com/hybridgroup/gobot/issues/1051))
* **module:** update tinygo.org/x/bluetooth to v0.10 and adapt code ([#1084](https://github.com/hybridgroup/gobot/issues/1084))
### Build
* **go, deps:** switch to Go 1.22 and update modules, linter v1.61.0 and adapt code ([#1093](https://github.com/hybridgroup/gobot/issues/1093),[#1092](https://github.com/hybridgroup/gobot/issues/1092))
* **go, deps:** switch to Go 1.20 and update modules ([#1067](https://github.com/hybridgroup/gobot/issues/1067))
* **linter:** update linter to v1.56.1 and fix issues ([#1068](https://github.com/hybridgroup/gobot/issues/1068))
### Doc
* update links to release or tagged branch ([#1069](https://github.com/hybridgroup/gobot/issues/1069))
* **core:** prepare for release v2.4.0
### Examples
* fix missing checks of return values ([#1060](https://github.com/hybridgroup/gobot/issues/1060))
### Gobot
* rename Master to Manager ([#1070](https://github.com/hybridgroup/gobot/issues/1070))
### Megapi
* use serialport adaptor and move driver to drivers/serial ([#1062](https://github.com/hybridgroup/gobot/issues/1062))
### Neurosky
* use serialport adaptor and move driver to drivers/serial ([#1061](https://github.com/hybridgroup/gobot/issues/1061))
### Test
* try to stabilize eventer tests ([#1066](https://github.com/hybridgroup/gobot/issues/1066))
* try to stabilize firmata tests ([#1097](https://github.com/hybridgroup/gobot/issues/1097))
## [v2.3.0](https://github.com/hybridgroup/gobot/compare/v2.2.0...v2.3.0) (2024-01-06)
### Adaptors
* **pwm:** introduce scale option for servo ([#1046](https://github.com/hybridgroup/gobot/issues/1046))
* **analogpins:** add a generic analog pin adaptor ([#1041](https://github.com/hybridgroup/gobot/issues/1041))
### Aio
* fix data race in AnalogSensorDriver ([#1024](https://github.com/hybridgroup/gobot/issues/1024))
* **all:** introduce functional options ([#1039](https://github.com/hybridgroup/gobot/issues/1039))
* **analog sensor:** fix deadlock in cyclic reading ([#1042](https://github.com/hybridgroup/gobot/issues/1042))
* **thermalzone:** add driver for read a thermalzone from system ([#1040](https://github.com/hybridgroup/gobot/issues/1040))
### Build
* **go, deps:** update modules ([#1047](https://github.com/hybridgroup/gobot/issues/1047), [#1052](https://github.com/hybridgroup/gobot/issues/1052))
### Doc
* **test:** use -race for tests by default ([#1035](https://github.com/hybridgroup/gobot/issues/1035))
### Gpio
* fix data race in StepperDriver ([#1029](https://github.com/hybridgroup/gobot/issues/1029))
* fix data race in PIRMotionDriver ([#1028](https://github.com/hybridgroup/gobot/issues/1028))
* fix data race in ButtonDriver ([#1027](https://github.com/hybridgroup/gobot/issues/1027))
* fix data race in EasyDriver ([#1025](https://github.com/hybridgroup/gobot/issues/1025))
* **all:** introduce functional options ([#1045](https://github.com/hybridgroup/gobot/issues/1045))
### I2c
* **core:** fix problems with usage of uintptr ([#1033](https://github.com/hybridgroup/gobot/issues/1033))
### Lint
* **all:** fix issues of errorlint etc ([#1037](https://github.com/hybridgroup/gobot/issues/1037))
* **all:** switch to 1.55.2 and adjust linter issues ([#1036](https://github.com/hybridgroup/gobot/issues/1036))
### Ollie
* **test:** fix data race in test ([#1034](https://github.com/hybridgroup/gobot/issues/1034))
### Raspi
* **pwm:** add support for sysfs and fix pi-blaster ([#1048](https://github.com/hybridgroup/gobot/issues/1048))
## [v2.2.0](https://github.com/hybridgroup/gobot/compare/v2.1.1...v2.2.0) (2023-10-29)
### Adaptors
* **PWM:** fix wrong duty cycle after kill program ([#994](https://github.com/hybridgroup/gobot/issues/994))
### Beaglebone
* **doc:** fix preceding typo ([#985](https://github.com/hybridgroup/gobot/issues/985))
### Build
* **deps:** module update ([#992](https://github.com/hybridgroup/gobot/issues/992))
* **go, deps:** switch to Go 1.19 and update modules ([#1008](https://github.com/hybridgroup/gobot/issues/1008))
* **style:** switch to gofumpt and add linters ([#1009](https://github.com/hybridgroup/gobot/issues/1009))
### Doc
* **roadmap:** remove file ROADMAP.md after creating issues ([#1005](https://github.com/hybridgroup/gobot/issues/1005))
### Dragonboard
* fix example and documentation ([#977](https://github.com/hybridgroup/gobot/issues/977))
### Gpio
* **hcsr04:** add driver for ultrasonic ranging module ([#1012](https://github.com/hybridgroup/gobot/issues/1012))
### I2c
* **PCA9685, adafruit, adafruit2327, adafruit2348:** clean up architecture and fix init ([#1021](https://github.com/hybridgroup/gobot/issues/1021))
### Jetson
* **PWM:** fix set period ([#1019](https://github.com/hybridgroup/gobot/issues/1019))
### Joystick
* **core:** replace sdl with 0xcafed00d/joystick package ([#988](https://github.com/hybridgroup/gobot/issues/988))
### Sphero
* Add support for calibration
### System
* **gpio:** add edge polling function ([#1015](https://github.com/hybridgroup/gobot/issues/1015))
### Test
* **all:** substitude assert.Nil by assert.NoError if useful ([#1016](https://github.com/hybridgroup/gobot/issues/1016))
* **all:** substitude assert.Error by assert.ErrorContains ([#1014](https://github.com/hybridgroup/gobot/issues/1014), [#1011](https://github.com/hybridgroup/gobot/issues/1011))
* **all:** switch to test package stretchr testify ([#1006](https://github.com/hybridgroup/gobot/issues/1006))
* **gpio, aio:** cleanup helper_test ([#1018](https://github.com/hybridgroup/gobot/issues/1018))
## [v2.1.1](https://github.com/hybridgroup/gobot/compare/v2.1.0...v2.1.1) (2023-07-07)
### All
* upgrade modules
* substitute deprecated ioutil methods ([#923](https://github.com/hybridgroup/gobot/issues/923))
* **linter:** activate linters "errcheck", "ineffassign", "unused" and fix issues ([#950](https://github.com/hybridgroup/gobot/issues/950))
* **linter, format:** format code and list of linter todo's ([#962](https://github.com/hybridgroup/gobot/issues/962))
* **linter:** activate linter "makezero" and fix issue ([#965](https://github.com/hybridgroup/gobot/issues/965))
### Ble
* simplify and substitute errors.Wrap() ([#958](https://github.com/hybridgroup/gobot/issues/958))
### Build
* **go:** switch to Go 1.18 ([#940](https://github.com/hybridgroup/gobot/issues/940))
### Core
* CLI removed ([#946](https://github.com/hybridgroup/gobot/issues/946))
### Doc
* fix and improve documentation regarding to installation ([#946](https://github.com/hybridgroup/gobot/issues/946), [#970](https://github.com/hybridgroup/gobot/issues/970))
### Mavlink
* fix linter issues of errcheck ([#959](https://github.com/hybridgroup/gobot/issues/959))
### System
* **syscall:** switch to x/sys ([#963](https://github.com/hybridgroup/gobot/issues/963))
### Tello
* fix wifiMessage and lightMessage ([#957](https://github.com/hybridgroup/gobot/issues/957))
* fix partially [#793](https://github.com/hybridgroup/gobot/issues/793) by initialize doneCh in NewDriverWithIP ([#931](https://github.com/hybridgroup/gobot/issues/931))
## [v2.1.0](https://github.com/hybridgroup/gobot/compare/v2.0.3...v2.1.0) (2023-05-29)
### Build
* **v2:** revert of [#927](https://github.com/hybridgroup/gobot/pull/927), no usage of a v2 subfolder anymore (issue [#920](https://github.com/hybridgroup/gobot/issues/920))
## [v2.0.3](https://github.com/hybridgroup/gobot/compare/v2.0.2...v2.0.3) (2023-05-24)
* accidentally created release without any changes
## [v2.0.2](https://github.com/hybridgroup/gobot/compare/v2.0.1...v2.0.2) (2023-05-22)
### Build
* **v2:** fix usage by moving code to a v2 subfolder ([#927](https://github.com/hybridgroup/gobot/pull/927))
## [v2.0.1](https://github.com/hybridgroup/gobot/compare/v2.0.0...v2.0.1) (2023-05-21)
### Build
* **style:** add golangci-lint workflow configuration ([#916](https://github.com/hybridgroup/gobot/issues/916))
* **style:** fix linter findings of "gosimple", "govet" and "staticcheck" ([#917](https://github.com/hybridgroup/gobot/issues/917))
### Bump
* periph.io/x/conn/v3 from 3.6.10 to 3.7.0 ([#913](https://github.com/hybridgroup/gobot/issues/913))
* github.com/gofrs/uuid from 4.3.0+incompatible to 4.4.0+incompatible ([#914](https://github.com/hybridgroup/gobot/issues/914))
* golang.org/x/net from 0.1.0 to 0.10.0 ([#915](https://github.com/hybridgroup/gobot/issues/915))
* github.com/nats-io/nats-server/v2 from 2.1.0 to 2.7.4 ([#906](https://github.com/hybridgroup/gobot/issues/906))
### Core
* fix Semantic Import Versioning for v2 ([#921](https://github.com/hybridgroup/gobot/issues/921))
### Docs
* **core:** adjust changelog generation ([#924](https://github.com/hybridgroup/gobot/issues/924))
## [v2.0.0](https://github.com/hybridgroup/gobot/compare/v1.16.0...v2.0.0) (2023-05-15)
### ble
* update to TinyGo Bluetooth package v0.6.0 release
### build
* update appveyor for go 1.19
* switch to new cimg with golang 1.17
* new home path for cimg
* check examples in CI ([#884](https://github.com/hybridgroup/gobot/issues/884))
* add tests of more platforms to CI
* add configuration file for dependabot ([#907](https://github.com/hybridgroup/gobot/issues/907))
* add PR template
### core
* use base driver for all I2C devices
* rename package "sysfs" to "system"
* go.mod to 1.17 and all modules incl. code upgrades
## digispark
* add example for generic i2c.Driver
* fix i2c.ReadBlockData(), Read_Data() and some small other fixes
### dji tello
* Halt does not terminate all the related goroutines and may wait forever when it is called multiple times
### docs
* README for gpio, pwm, i2c and add example
* document fields for flight data
### aio
* analog sensor driver to prevent ReadValue() to get float64
### gopigo3
* fix examples and driver
### gpio
* add advanced digital pin options (pull, bias, drive, debounce, event)
* add support for new character device Kernel ABI for GPIO
* add read firmware version and DHT sensors for grovepi
### i2c
* add generic i2c driver
* fix I2C connection-bus caching and multiple device usage
* introduce I2cBusAdaptor for composition in platforms
* **Adafruit1109:** fix driver shows bad characters after Halt()
* **ads1x15:** fix driver not working stable when reading multiple inputs
* **ADXL345:** use ReadBlockData()
* **bmxy8z:** use ReadBlockData
* **BMP180, BMP280 BMP388 BME280:** use ReadBlockData()
* **CCS811:** use ReadBlockData()
* **HMC5883L:** fix I2C driver typo: change from HMC8553L
* **HMC5883L:** fix driver returns wrong values
* **L3GD20H:** fix full scale range usage
* **MPL115A2:** use ReadBlockData(), WriteByteData()
* **MPU6050:** fix wrong initialize and reduced temperature resolution
* **PCA9501:** add driver
* **PCA953x:** add driver
* **PCF8583:** add driver
* **TH02:** fix wrong register usage for read heater
### jetson nano
* add Jetson Nano adpator
* fix pwm feature
### joystick
* add Xbox-One controller
* add configuration for Nintendo Switch controllers ([#903](https://github.com/hybridgroup/gobot/issues/903))
* add Dualsense joystick (PlayStation 5) ([#880](https://github.com/hybridgroup/gobot/issues/880))
### nanopi neo
* add platform
### piblaster
* add unused but missing interface implementation
### radxa rock pi 4(c+)
* add platform ([#902](https://github.com/hybridgroup/gobot/issues/902))
### raspi
* fix pwm cache
* fix Stopping and Starting Robot and LED Driver/LED does not toggle on restart
### spi
* fix spi.SpiConnection is not gobot.Connection: missing method Connect
* using GPIO's is now possible
* **MFRC522:** add driver
### test
* increase some timings to make tests a little less fragile
* skip test TestNatsAdaptorFailedConnect when flaky
* stabilize "every"-test
* stabilize flaky utils_test
* stabilize firmata tests
* fix tests with sysfs mocks, ReadBlockData, WriteBlockData
* fix keyboard tests and exclude opencv
* fix PWM related read/write tests
* add check for examples in Makefile
### tinkerboard
* fix new pwm behaviour
### BREAKING CANGES
* some interfaces moved, see folder system and adaptor.go
## [v1.16.0](https://github.com/hybridgroup/gobot/compare/v1.15.0...v1.16.0) (2022-05-02)
### bugfix
* failing leftovers after usage of PR #569
* Fix servo and DC motors presence
* FIX the bug #568 without further impact, heavy improvements of tests
* fixed PinMode, SetPullUp and SetPolarity, unit tests activated
* ReadGPIO fixed with #576, failing leftovers for PinMode, SetPullUp and SetPolarity
* helper_test ReadByteData, ReadWordData to use reg
### core
* update uuid package and directly access it; remove archived uuid package
### digispark
* fix ReadByte & WriteByte, rework and add i2c tests
* remove useless code in i2c test
### drivers
* add AnalogActuatorDriver, analog temperature sensor, driver for PCF8591 (with 400kbit stabilization), driver for YL-40
* Adding support for hmc5883l compass
* bmp388 fix missing address write byte in test of Measurements
* drv2605l fix missing address write byte in test of Halt()
* introduce adafruit1109 2x16 LCD with 5 keys
* mcp23017: add mutex for write, hd44780: fix mutexes
* MCP3004: correct number of channels
### raspi
* fix raspi PWMPin.SetDutyCycle (#800)
### tello
* Guards Dji Tello Halt against nil dereference
### test
* don't panic on 'With*' allow simpler wrapping of drivers
### tinkerboard
* fix tinkerboard i2c0 to i2c4, improve comments in pin map, improve README
## [v1.15.0](https://github.com/hybridgroup/gobot/compare/v1.14.0...v1.15.0) (2020-11-30)
### build
* Switch to CircleCI
### ble
* replace go-ble with tinygo bluetooth package, restore macOS functionality
### gpio
* Update RelayDriver to invert value written on Inverted
* Add tests for DigitalWrite value
* Add support for HD44780 LCD controller
* Add delay for Run function of StepperDriver
### spi
* fixes #700 * Avoid to close the connection.
### i2c
* add SHT2x device
* add BMP388 Barometric Pressure/Temperature/Altitude Sensor
### pwm
* Resolve issue with PWM for PWMWrite
### mqtt
* Add method to publish MQTT messages with retain flag
### tello
* Add graceful halt for Tello driver
* Add Tello EDU driver
### keyboard
* add symbol keys for platform/keyboard
### examples
* Update ffmpeg command to decrease latency in tello example
## [v1.14.0](https://github.com/hybridgroup/gobot/compare/v1.13.0...v1.14.0) (2019-10-15)
### core
* migrating from dep to go modules
* update codegangsta to urfave (#690)
### docs
* Fix a link in package docs' example code.
### examples
* fixed broken imports due to changed path causing go get to fail
### gpio
* Added ability to make a relay driver inverted (#674)
### opencv
* Update to GoCV 0.21.0
### spi
* Apa102 use default brightness (#671)
### tello
* Updated videoPort for DJI Tello to 11111
## [v1.13.0](https://github.com/hybridgroup/gobot/compare/v1.12.0...v1.13.0) (2019-05-22)
### api
* Initial stab at Robot-based work
### build
* correct package version as suggested by @dlisin thanks
* only build last 2 versions of Go plus tip for CI
* Update dep script for AppVeyor
* update deps to latest versions of dependencies for GoCV and others
* Update Gopkg and add test dep to Travis YML
* update OpenCV build script for OpenCV 4.1.0
### docs
* update to remove Gitter and replace with Slack, and update copyright dates
### example
* add missing nobuild header
### gpio
* Add SparkFun’s EasyDriver (and BigEasyDriver)
* Add unit tests for TH02 & Minor improvement
* Added rudiementary support for TH02 Grove Sensor
* pwm_pin * Fix DutyCycle() parse error, need to trim off trailing '\n' before calling strconv.Atoi(), as other functions in this package do
* Simplify code as suggested in #617
### grovepi
* add mutex to control transactionality of the device communication
### i2c
* add 128x32 and 96x16 sizes to the i2c ssd1306 driver
* build out the ccs811 driver
* update PCA9685 driver to use same protocol as Adafruit Python lib
### leapmotion
* Parser error in Pointable.Bases: Write test and fix
* Update gobot leap platform to support Leap Motion API v6
### mavlink
* fix mavlink README to use correct example code
### mqtt
* Add some new MQTT adaptor functions with QOS
* Allow setting QoS on MTT adaptor
* make tests run correctly even when a local MQTT server is in fact running
* Do not skip verification of root CA certificates by default InsecureSkipVerify
### nats
* Update Go NATS client library import
### opencv
* minor updates to opencv README
* update to OpenCV 4.1.0
### sphero
* Added methods to read Sphero Power States
* Added some new features to the sphero ollie, bb-8 and sprkplus
### spi
* correct param used for APA102 Draw() method
* Stop using Red parameter for brightness value
### tello
* add direct vector access
* add example with keyboard
* Change fps to 60
* Check for error immediately and skip publish if error occurred
* update FlightData struct
### up2
* add support for built-in LEDs
* correct i2c default bus information to match correct values
* finalize docs for UP2 config steps
* update README to include more complete setup information
* useful constant values to access the built-in LEDs
## [v1.12.0](https://github.com/hybridgroup/gobot/compare/1.11.1...v1.12.0) (2018-08-27)
### api
* further improvement of the modular API changes
* modify Start() for more modular initialization, and add StartRaw() for completely custom API implementations
* settled on StartWithoutDefaults() as the method to start API without default routes
### core
* add Rescale utility function for straight linear rescaling
### digispark
* add examples using digispark with i2c devices blinkm and mlp115a2
* Added i2c to digispark, but not working yet
* Added some tests for digispark i2c connector
* Digispark i2c fixes, added Test for checking available addresses
* remove test method that should not be in adaptor
* remove test that is expected to ofail, but passes when digispark board is actually connected
### docs
* add GrovePi to README
* adjust order of badges in README
* Fixing broken link
### examples
* add example that uses both the API and also a custom handler with MJPEG streaming from an attached camera
* small improvements to Tello examples
* update Tello examples for main thread friendly macOS/Windows, add Tello face tracker
### i2c
* add commands to JHD1313MDriver
* add commands to PCA9685Driver
* add missing methods so the GrovePi fully implements the Adaptor interface
* add ShowImage() function to ssd1306 driver based on @mikegleasonjr suggestion
* GrovePi digitalwrite implemented
* implemented DigitalRead, DigitalWrite, and AnalogRead for GrovePi
* improve godocs for PCA9685
* mention that GrovePi requires running firmware 1.3.0
* update GrovePi to v1.3.0 firmware
* work in progress on GrovePi plus driver
### joystick
* add config file for Magicsee R1 contributed by @carl-ranson
* add some additional test coverage for file-based config
* added error handling for config loading in joystick driver
* mention need to be running a Linux kernel v4.14+ for controller mappings to work as expected
* provide constant values for existing joystick configurations
### raspi
* export PiBlasterPeriod in Adaptor
### spi
* add ShowImage() function to ssd1306 driver based on @mikegleasonjr suggestion
### tello
* specify end of msgType position
* add handleResponse testing
* Add motion cessation commands to Tello
* handleResponse only needs an io.Reader
* handleResponse should not send commands
* rename reqConn to cmdConn
* reqConn is only an io.WriteCloser
* send Land() command to drone on Halt() to avoid floating mid-air
## [1.11.1](https://github.com/hybridgroup/gobot/compare/1.11.0...1.11.1) (2018-07-10)
### build
* exclude vendor and other previously excluded subpackages
* update Travis build to use OpenCV 3.4.2 release
* update deps for GoCV to v0.14.0 release
* Bump periph.io/x/periph to v3.0.0
* update to Go 1.10.3 and 1.9.7 for Travis builds
### docs
* Fix Leap Motion package link
### i2c
* fix write/read gpio on mcp23017, and cleaned up some comments
* correct pca9685 SetPWMFreq function scaling
### gopigo3
* update with default spi values, cleanup
## [1.11.0](https://github.com/hybridgroup/gobot/compare/1.10.2...1.11.0) (2018-05-31)
### build
* correct profile file location for codecov upload
* Make Go Lint happier by adding some explicit type conversions and ignoring unused error returns
* single quotes needed to upload any .cov file to codecov for reporting
* update deps to latest versions for Paho MQTT, go-sdl, and gocv
* upload any .cov file to codecov for reporting
* use go 1.10.2 and 1.9.6 for Travis builds
* add step to call dep ensure before contributing #524
### examples
* correct events used by XBox360 joystick example
### firmata
* Update the Firmata homepage in platform README
### gpio
* Improve Stepper Driver
* Initial support for MAX7219 (gpio) led driver
### joystick
* full corrected ds3 and ds4 mappings plus examples to match for latest sdl 2.0.8
* add instructions to README on how to install SDL on Linux from source
* add missing type conversion
* add new contributions to README
* Add T-Flight Hotas X flight controoller
* add xbox360 rock band drums controller
* Correct Dualshock4 controller mappings and add ps/left/right buttons
* correct test issue
* exclude scanner from test builds
* Fix joystick_driver to detect dpad input for xbox controllers
* Update dualshock4.json to match joystick_dualshock4.go
* update scanner to match go-sdl 0.3 API changes
* Update the joystick driver test to read DPAD properly
### leapmotion
* change timestamp to uint64 to fix #516
### tello
* slow/fast mode switch function
* StopLanding feature
* Add Bounce() and PalmLand() funcs and their associated events.
* bug fix
* Change several fields in FlightData struct from int16 to bool
* Export the FlightData fields (see Issue #531)
## [1.10.2](https://github.com/hybridgroup/gobot/compare/1.10.1...1.10.2) (2018-04-24)
### opencv
* update GoCV to latest version
## [1.10.1](https://github.com/hybridgroup/gobot/compare/1.10.0...1.10.1) (2018-04-24)
### tello
* improve support for DJI Tello drone, especially video
## [1.10.0](https://github.com/hybridgroup/gobot/compare/v1.9.0...1.10.0) (2018-04-20)
### docs
* add gitter badge to readme
### gpio
* AIP1640 led driver, used in Wemos D1 mini's matrix LED shield
### spi
* switch to using periph.io for SPI interfaces
* add support for ssd1306
* add optional params such as bus/chip to all current drivers
* complete refactoring to spi.Connection
* remove unneeded code as suggested by @maruel
* remove unneeded type and cleanup GoDocs
### ble
* correct spelling error in function name
### build
* update to latest version of Go 1.10 for Travis build
### cli
* remove extra newline
### docs
* add recently contributed GPIO devices to README
### joystick
* able to configure joysticks without external json file
* correct error in scanning script
* correct events used by gamepad-style up/down/left/right buttons
* correct scanner error from ID
* removed double release event
### tello
* add support for DJI Tello drone
## [v1.9.0](https://github.com/hybridgroup/gobot/compare/v1.8.0...v1.9.0) (2018-02-14)
### beaglebone
* update pin naming, docs, and examples for the latest Debian OS releases
### opencv
* update build settings needed to build OpenCV/GoCV as part of test suite
* deps for latest GoCV v0.9.0
### build
* update Travis build to use very latest Go versions
### docs
* add references to new drivers for ADXL345, BH1750, and TM1638.
* improve docs for installation and use of OpenCV/GoCV from Gobot
* update copyright date to 2018
### gpio
* Initial support for TM1638 modules
### i2c
* Added basic driver for BH1750 (light sensor), board GY-302
* support for accel ADXL345
### bb8/ollie/sprkplus
* add Boost command
* add Set Back LED Output command
* add Set Raw Motor Values command
* add Set Rotation Rate command
* add Set Stabilization command
### test
* Refactor TestAdaptorDigitalPinConcurrency test
## [v1.8.0](https://github.com/hybridgroup/gobot/compare/v1.7.1...v1.8.0) (2017-12-21)
### sysfs
* pause briefly to allow udev rules to apply when exporting PWMPin
### beaglebone
* correct uboot installation instructions
* add SPI support
* no more slots, add docs on configuring u-boot overlays
* handle gpio pinmux without relying on specific pre-existing setup
### pocketbeagle
* add support for PocketBeagle
* use universal io cape manager to initialize board setup
* improve docs for latest Debian OS
### build
* Add dep, change how tests run in CI
* update dependencies to latest GoCV version
### spi
* Add MCP3002, MCP3202, MCP3204, MCP3208, MCP3304, MCP3004, and MCP3008 A/D converter drivers
* adding initial support for APA102 LEDs, thanks to code sample from @rakyll
* extract shared SPI init code into spi package
### up2
* initial work on support for UP2 board
### gopigo3
* fixed set/get bug with motor dps
### gpio
* Adding stepper motor module
### firmata
* handle cases where out of sync data is read from serial port on first connecting
### i2c
* Change init payload sequence within jhd1313m1 driver Start() func.
## [v1.7.1](https://github.com/hybridgroup/gobot/compare/v1.7.0...v1.7.1) (2017-11-05)
### sprkplus
* add new platform for Sphero SPRK+
### firmata
* correct problem where last analog pin(s) were being ignored from capabilities query
### ble
* use go-ble/ble fork for BLE interactions
### build
* update to use latest OpenCV version
* update to use latest Golang versions
## [v1.7.0](https://github.com/hybridgroup/gobot/compare/v1.6.1...v1.7.0) (2017-10-23)
### curie
* Add Linux specific step to Intel Curie docs
### mqtt
* Added SetCleanSession
### build
* add go1.9 to versions tested in Travis CI
* add missing OpenCV lib dependency
* Update build to use latest Golang versions
* Travis build will now require sudo to install due to OpenCV
### docs
* some helpful edits for the initial spi implementation
### gopigo3
* integration of recent GoPiGo3 contributions
* Added grove support, and more gopigo3 examples
### gpio
* Add ButtonDriver.DefaultState to allow for 'reverse' buttons (ones that go from HIGH to LOW)
### holystone
* Add initial support for HS-200
### i2c
* SSD1306.WithDisplayHeight() and SSD1306.WithDisplayWidth() for SSD1306 that use different display ratios
### joystick
* add CLI utilty to scan display events to make it easier to add new joyticks
* update README to address #441
### opencv
* Switchover to use GoCV and OpenCV 3.3
* Switch to use custom domain for GoCV package
* all examples using new GoCV based code
* correct formatting in face detect example
* OpenCV face detector that is much more concurrent
* update interface and examples to indicate multipurpose
## [v1.6.1](https://github.com/hybridgroup/gobot/compare/v1.6.0...v1.6.1) (2017-07-15)
### core
* log failure errors on Robot Start()
### build
* run test coverage with covermode=set
* update build to use Golang 1.7.6 and 1.8.3
### docs
* work on ROADMAP doc
### sysfs
* increase test coverage
### bb8
* use updated ble adaptor interface for tests
### ble
* allow for characteristic writes both with and without a response
* allow override of specific HCI device to use
* eliminate race conditions from response handling
### curie
* Implement Accelerometer, Gyroscope, and Temperature sensors implemented
* motion detect implemented
* shock detect implemented
* step count implemented
* tap detect implemented
### digispark
* update blink example to display error message on Start()
* update README with latest development info
### edison
* auto-discovery of Edison board option
* removed commented lines
### firmata
* expose WriteSysex to external callers
* adjust client test timeout values
* cleanup error handling for connection code
* client tests don't need so many goroutines
* expose WriteSysex to external callers
* improve connection code to use a proper timeout
* increase test coverage
* make it possible to test external devices that use firmata adaptor
* refactoring firmata client
* remove circular import in test
* remove unused code, increase test coverage
* return connect errors to client
* switch to using go-serial package
* Sysex response events now being handled as expected
### bme280
* fix signed/unsigned bug
* Fixed incorrect error condition check when reading the 'ctrl_hum' register.
* Expanded the BME280 unit test for TestBME280DriverStart() to support reading from the 'ctrl_hum' register.
* Enables humidity readings in the BME280 driver by enforcing the write to the 'ctrl_meas' register, as per Section 5.4.3 of the BME280 data sheet
### chip
* Fixed PWM duty cycle calculation for C.H.I.P ServoWrite
* Fixed PWM init bug for C.H.I.P
* C.H.I.P PWM init robust for already enabled state
### i2c
* remove unused test code
* write config register in little endian
### joystick
* add needed constants for all PS3 buttons
### littlewire
* littlewire.cc links changed to littlewire.github.io
### mavlink
* switch to using go-serial package
### megapi
* switch to using go-serial package
### microbit
* use updated ble adaptor interface for tests
### minidrone
* add example for Parrot Mambo
* add support for Mambo external accessories
* increase test coverage
* never expect responses for characteristic writes
* remove unneeded code, increase test coverage
* separate flight status processing and add test coverage
### neurosky
* switch to using go-serial package
### ollie
* use updated ble adaptor interface for tests
### sphero
* switch to using go-serial package
### tinkerboard
* Updated Tinkerboard and sysfs tests to updated PWM polarity contract
## [v1.6.0](https://github.com/hybridgroup/gobot/compare/v1.5.0...v1.6.0) (2017-06-15)
### Bb8
* use updated ble adaptor interface for tests
### Ble
* eliminate race conditions from response handling
* allow for characteristic writes both with and without a response
* allow override of specific HCI device to use
### Build
* update build to use Golang 1.8.3
* update build to use Golang 1.7.6 and 1.8.2
* run test coverage with covermode=set
### Core
* log failure errors on Robot Start()
### Curie
* update docs formatting
* add Curie to main README platform list
* more improvements for README setup instructions
* improve README info
* improve tests and examples
* increase test coverage
* increase test coverage
* motion detect implemented
* tap detect implemented
* step count implemented
* shock detect implemented
* Accelerometer, Gyroscope, and Temperature sensors implemented
* WIP on adding support for Intel Curie IMU
### Digispark
* update blink example to display error message on Start()
* update README with latest development info
### Docs
* add more wishlist to ROADMAP
* add helpful information to examples themselves
* correct installation instructions to match latest versions
* more wishlish items for roadmap
* update BLE connect info to latest
* more work on ROADMAP doc
* add first attempt at roadmap document
### Edison
* refactor auto-discovery of Edison board option
* removed commented lines
### Firmata
* remove circular import in test
* make it possible to test external devices that use firmata adaptor
* Sysex response events now being handled as expected
* expose WriteSysex to external callers
* expose WriteSysex to external callers
* cleanup error handling for connection code
* improve connection code to use a proper timeout
* remove unused code, increase test coverage
* increase test coverage
* switch to using go-serial package
* return connect errors to client
* client tests don't need so many goroutines
* adjust client test timeout values
* refactoring firmata client
### Fix
* signed/unsigned bug
### Fixed
* incorrect error condition check when reading the 'ctrl_hum' register. Expanded the BME280 unit test for TestBME280DriverStart() to support reading from the 'ctrl_hum' register.
* PWM duty cycle calculation for C.H.I.P ServoWrite
* PWM init bug for C.H.I.P
### I2c
* remove unused test code
### Improved
* BME280 humidity initialisation so that it does not override existing oversampling rates that have been set up for the ctrl_meas register.
### Issue
* [#424](https://github.com/hybridgroup/gobot/issues/424): Enables humidity readings in the BME280 driver by enforcing the write to the 'ctrl_meas' register, as per Section 5.4.3 of the BME280 data sheet
### Joystick
* add needed constants for all PS3 buttons
### Made
* C.H.I.P PWM init robust for already enabled state
### Mavlink
* switch to using go-serial package
### Megapi
* switch to using go-serial package
### Microbit
* use updated ble adaptor interface for tests
### Minidrone
* never expect responses for characteristic writes
* add example for Parrot Mambo
* separate flight status processing and add test coverage
* add support for Mambo external accessories
* remove unneeded code, increase test coverage
* increase test coverage
### Neurosky
* switch to using go-serial package
### Ollie
* use updated ble adaptor interface for tests
### Prepare
* for v1.6.0 release
### Release
* correct changelog incorrect section titles
### Sphero
* switch to using go-serial package
### Sysfs
* increase test coverage
### Updated
* Tinkerboard and sysfs tests to updated PWM polarity contract
### Write
* config register in little endian
## [v1.5.0](https://github.com/hybridgroup/gobot/compare/v1.4.0...v1.5.0) (2017-05-10)
### core
* Add Running() methods for Manager and Robot and increase test coverage accordingly
### sysfs
* define DigitalPinnerProvider and PWMPinnerProvider interfaces
* add Chip to be able to change pwmchip, and some related refactoring
* add file read/write testing for failure conditions
* proper handling of busy state vs. other errors
* return sensible result when no valid data read
### test
* increase coverage on test helpers
### build
* switching to Travis builds using Ubuntu 14.04 Trusty
### aio
* only need to support AnalogReader interface
* avoid test race conditions
* ensure that AnalogSensor event Data is always int
### gpio
* only need to support DigitalReader/DigitalWriter interface
### i2c
* Added support for the ADS1015 and ADS1115 ADCs
* Add INA3221 Voltage Monitor
* Ensure lock of i2c bus for each individual operation
* Small refactoring and increase test coverage for BMP180
### beaglebone
* implement DigitalPinner and PWMPinner interfaces
* protect against pin map races
* increase test coverage
### chip
* add preliminary support for C.H.I.P. Pro
* add back ServoWrite implementation
* implement DigitalPinnerProvider and PWMPinnerProvider interfaces
* protect against pin map races
### dragonboard
* export DigitalPin and PWMPin adaptor methods
* protect against pin map races
* increase test coverage
### edison
* auto-detect arduino breakout board, if no specific board is expected
* ensure that we initialize tristate if arduino breakout board
* export DigitalPin and PWMPin adaptor methods
* implement DigitalPinnerProvider and PWMPinnerProvider interfaces
* protect against pin map races
* refactoring to reduce code duplication
### firmata
* remove processing that might have been eating test events, increase test coverage
### joule
* implement DigitalPinnerProvider and PWMPinnerProvider interfaces
* protect against pin map races
* remove incorrect pin assignment and improve test coverage
* add examples using Joule with ADS1015 ADC
* naming system changes
* correct pin mappings and add PWM example
### mavlink
* add a Mavlink-over-UDP adaptor.
### microbit
* Add DigitalWriter, DigitalReader, and AnalogReader support using IOPinDriver
* Handle start error and increase test coverage
### mqtt
* Add a (topic, payload) event type
* change the On handler to take mqtt.Message
* increase test coverage
* update examples that use mqtt for updated notification signature
### nats
* change the On() handler to take the subject as an argument
* increase test coverage
### raspi
* implement DigitalPinnerProvider and PWMPinnerProvider interfaces
* add implementation for PWMPinner interface that wraps pi blaster
* fix adaptor race conditions
* increase test coverage
### tinkerboard
* Add support for ASUS Tinker Board
## [v1.4.0](https://github.com/hybridgroup/gobot/compare/v1.3.0...v1.4.0) (2017-04-12)
### core
* Use 10-buffered chans for events, see #374
### i2c
* Many refactors and increases in test coverage
* Eliminate race conditions introduced by tests
* Adds Altitude() function to BMP280/BME280
* bme280 driver Humidity compensation formula
* ssd1306 driver implementation
### aio
* Eliminate race conditions introduced by tests
### gpio
* Fix motor mode change when speed is set
* Eliminate race conditions introduced by tests
* Reduce test side effects
### ardrone
* Increase test coverage
### audio
* Increase test coverage
### bb8
* Refactoring to use BLEConnector interface and provide tests
### bebop
* Increase test coverage
### beaglebone
* Increase test coverage
### ble
* Increase test coverage for battery, device information, and generic access drivers
* Refactoring drivers to use BLEConnector interface and provide tests
### chip
* Added PWM0 support
* Increase test coverage
### digispark
* Increase test coverage
### dragonboard
* Increase test coverage
### edison
* Remove pointless error checking code
* Refactor digital pin creation process method
* Increase test coverage
### firmata
* Eliminate race conditions introduced by tests
* Increase test coverage for i2c commands
### joule
* Increase test coverage
### joystick
* Increase test coverage
### keyboard
* Increase test coverage
### mavlink
* Eliminate race conditions introduced by tests
* Increase test coverage
### mavlink
* Increase test coverage
### microbit
* Refactoring to use BLEConnector interface and provide tests
* Address #404 by adding info about required magnetometer calibration step to README
* Increase test coverage
### minidrone
* Refactoring to use BLEConnector interface and provide tests
### mqtt
* Increase test coverage
### nats
* Increase test coverage
### neurosky
* Update neurosky README & example
* Eliminate race conditions introduced by tests
* Increase test coverage
### ollie
* Refactoring to use BLEConnector interface and provide tests
* Correct race condition error on seq
* Increase test coverage
### opencv
* Increase test coverage
### particle
* Increase test coverage
### raspi
* Address #391 by providing more details about normal development workflow
* Increase test coverage
### sphero
* Eliminate race conditions
* Increase test coverage
### sysfs
* Address race condition from udev rules when exporting GPIO pins
* Increase test coverage
### docs
* Improve explanations for scp/ssh workflow on SoC boards
* Include entire Apache 2.0 license in the license text
### test
* Add crude travis check for gofmt; format all sources
* Significantly speed up travis and make runs
* Remove test code no longer being called
* Update Travis to run tests using Golang 1.8.1
* Increase gobottest test coverage
## [v1.3.0](https://github.com/hybridgroup/gobot/compare/v1.2.1...v1.3.0) (2017-03-22)
### microbit
* Add new platform support
### dragonboard
* Add new platform support
### gpio
* Increase test coverage
### i2c
* Update list of supported i2c devices
* Minor adjustments and test coverage improvements
* Added more capabilities checks for I2C
* Removed smbus block operations
### core
* Increase test coverage
### test
* Improvements to run tests much faster thanks @maruel
* Use codecov.io for code coverage reporting
### docs
* Update CoC based on Contributor Covenant
## [v1.2.1](https://github.com/hybridgroup/gobot/compare/v1.2.0...v1.2.1) (2017-02-16)
### Allow
* NATS options to pass in the NATS adaptor for TLS support.
### Chip
* correct docs to describe valid pin mappings
### Update
* version to 1.2.1 for point release
## [v1.2.0](https://github.com/hybridgroup/gobot/compare/v1.1.0...v1.2.0) (2017-02-16)
### core
* Use new improved default namer to avoid API conflicts
### gpio
* Removed scaling function from servo driver
* Correct servo driver to pass along angle to adaptor to sort out implementation
### i2c
* Refactored platforms and drivers to new I2C interfaces
* Change to make I2C support more than one bus
* Refactor drivers to support new optional params
### bb8
* Added collision detection support and example
### beaglebone
* Correct i2c buses to match actual mapping
### ble
* Switch to using [ble](https://github.com/currantlabs/ble) package for Bluetooth LE
* Basic serial over BLE working with Arduino101 with StandardFirmataBLE
* WIP on multiple simultaneous ble devices
### chip
* Fixed chip XIO base address lookup
### digispark
* Fix #288 by using pkg-config to locate libusb-compat includes
### firmata
* Remove race conditions identified in Firmata client
* Correct error in I2C reads not listening to board events
### mqtt
* Add driver for syntactical sugar around virtual devices
* Add SSL/TLS client options support
* Fix #277 by adding SetAutoReconnect method to set Paho MQTT client
* Change both 'On' and 'Publish' method function signatures to match Eventer interface
### nats
* Add driver to make it easier to create virtual devices
### ollie
* Added collision detection support and example
### parrot
* Add ValidatePitch helper function for Parrot Minidrone, Parrot Bebop & ARDrone 2.0 to package
### docs
* Fix #363 by using atomic.Value to protect current values used by multiple goroutines in drone examples
### test
* Remove Golang 1.5 from TravisCI tests in prep for Golang 1.8 release
## [v1.1.0](https://github.com/hybridgroup/gobot/compare/v1.0.0...v1.1.0) (2017-01-09)
### core
* use canonical import path for sysfs package
### i2c
* Add a driver for the SHT3X chip
* Add a driver for BMP180
* Add support for L3GD20H gyroscope
### firmata
* Add support for TCPFirmata connections, allowing ESP8266 and other WiFi-connected controllers
* Add mention to README to use 'tty.' serial port on OSX
* Add mention of A4 and A5 normally unavailable on Firmata
### raspi
* Correct README build instructions with missing 'go build' command
### snapcraft
* Add the packaging metadata to build the gobot snap for Ubuntu Snappy
### particle
* Update examples to take key params via command line
* Address #160 by adding support for tinker-servo sketch if installed on Particle device
### esp8266 add experimental ESP8266 support to list of supported platforms
### sysfs
* Should fix #272 by using first byte of data as command register for I2C reads
* Some additional cleanup suggested by golint
### ble
* Add generic access service driver
* Update docs to include reference to included drivers
* Move various test code to test file
### ollie
* Refactoring so no need to expose internal implementation details
### bebop
* Add support/example of RTP video
* Enable video on firmware 3.3+
* Update ps3 and video example to enable the video stream
* Update README for brief explanation of how to get drone video
* Corrected import paths for client examples
### bb8
* Correct NewDriver params and set name
* Add missing constructor to wrap Ollie implementation
### minidrone
* Update README with example and which specific models are currently supported
* Add all piloting flying state events
* Adds Emergency() and TakePicture() commands
### test
* Add Golang 1.8beta2 to Travis builds
* Correct aio references for AnalogRead tests
## [v1.0.0](https://github.com/hybridgroup/gobot/compare/v0.13.0...v1.0.0) (2016-12-21)
### core
* Refactoring to allow 'Metal' development using Gobot packages
* Able to run robots without being part of a Manager.
* Now running all work in separate goroutines
* Rename internal name of Manager type
* Refactor events to use channels all the way down.
* Eliminate potential race conditions from Events and Every functions
* Add Unsubscribe() to Eventer, now Once() works as expected
* DeleteEvent function added to Eventer interface
* Ranges over event channels instead of using select
* No longer return non-standard slices of errors, instead use hashicorp/go-multierror
* Ensure that all drivers have default names
* Now both Robot and Manager operate using AutoRun as expected
* Use canonical import domain of gobot.io for all code
* Use time.Sleep unless waiting for a timeout in a select
* Uses time.NewTimer() instead of time.After() to be more efficient
### test
* Add deps tasks to Makefile
* Add golang 1.7 to Travis CI tests
* Add golang 1.8beta1 to build matrix for Travis
* Reduce Travis builds to golang 1.4+ since it is late 2016 already
* Complete move of test interfaces into the test files where they belong
* Adds Parrot Minidrone and Sphero Ollie to Travis tests
### Add missing godocs for everything
### i2c
* Move I2C drivers into appropriately named 'drivers/i2c' directory
* Add support for Adafruit Servo/PWM HAT
### gpio
* Move GPIO drivers into appropriately named 'drivers/gpio' directory
* Add support for PIR motion detector
### beaglebone
* auto-detect Linux kernel version
* map usr LEDs to match all kernels
### ble
* Rename drivers to make them more obvious
* Add test placeholders
### chip
* Auto-detect OS version to adjust pin mappings
* Correct base for new 4.4 GPIO
### edison
* Support for other breakout boards besides Arduino
### firmata
* Use io.ReadFull in platforms/firmata/client
* Update tarm/goserial to tarm/serial
### joule
* Add support for Intel Joule
### megapi
* Adding support for MakeBlock megapi
### nats
* Add support for NATS server
### particle
* Complete renaming Spark platform to Particle
### parrot
* Move Parrot Minidrone into own platform
* Move both ARDrone and Bebop under Parrot package
### raspi
* Add missing godocs and small refactors for platform
### sphero
* Add initial support for Sphero BB-8 platform
* Move Sphero Ollie into own platform
## [v0.13.0](https://github.com/hybridgroup/gobot/compare/v0.12.1...v0.13.0) (2016-10-10)
### Add
* PinMode test case
* PinMode func for MCP23017
* example for Edison blink demo without gobot initialization.
* ServoConfig to the FirmataAdaptor
* unit tests for ServoConfig
### Adding
* support for MakeBlock megapi
* tests for the Adafruit driver, and corresponding minor driver changes.
* support for MakeBlock megapi
* a Servo example program for the Adafruit Servo Hat driver code.
* support for the Adafruit Servo/PWM HAT. This required a slight refactor to the existing Motor HAT code to support multiple I2C addresses.
* two API funcs for the Adafruit driver with respect to the DC Motor, fleshing out the raspi_adafruit example with a runner function.
* the initial NATS platform support
### Another
* attempt at correct Travis syntax for gnatsd -[#5](https://github.com/hybridgroup/gobot/issues/5)
* attempt at correct Travis syntax for gnatsd -[#4](https://github.com/hybridgroup/gobot/issues/4)
* attempt at correct Travis syntax for gnatsd -[#3](https://github.com/hybridgroup/gobot/issues/3)
* attempt at correct Travis syntax for gnatsd -[#2](https://github.com/hybridgroup/gobot/issues/2)
* attempt at correct Travis syntax for gnatsd
### Ble
* fix unused var
* populate descriptors after descovering characterisitcs
### Bug
* fix in the Adafruit stepper code, specifically with respect to the AdafruitDouble step-style.
### Code
* cleanups suggested by gosimple
### Core
* update README with an example of 'Metal' Gobot
* should correct occasional test errors due to event overlap with test
* correct behavior in Mavlink driver, correct tests to match
* Add Unsubscribe() to eventer, now Once() works as expected
* Add further tests for Eventer
* cleanup comments on Eventer interface
* function DeleteEvent added to Eventer interface
* Refactor tests to allow 'metal' development using Gobot adaptors/drivers.
* Refactor tests to allow 'metal' development using Gobot adaptors/drivers.
* Refactor tests to allow 'metal' development using Gobot adaptors/drivers.
* Refactor examples to allow 'metal' development using Gobot adaptors/drivers.
* Refactoring to allow 'metal' development using Gobot adaptors/drivers.
* Continue refactoring to allow 'metal' development using Gobot libs.
* Refactor events to use channels all the way down. Allows 'metal' development using Gobot libs.
* update README with an example of 'Metal' Gobot
* should correct occasional test errors due to event overlap with test
* correct behavior in Mavlink driver, correct tests to match
* Add Unsubscribe() to eventer, now Once() works as expected
* Add further tests for Eventer
* cleanup comments on Eventer interface
* function DeleteEvent added to Eventer interface
* Refactor tests to allow 'metal' development using Gobot adaptors/drivers.
* Refactor tests to allow 'metal' development using Gobot adaptors/drivers.
* Refactor tests to allow 'metal' development using Gobot adaptors/drivers.
* Refactor examples to allow 'metal' development using Gobot adaptors/drivers.
* Refactoring to allow 'metal' development using Gobot adaptors/drivers.
* Continue refactoring to allow 'metal' development using Gobot libs.
* Refactor events to use channels all the way down. Allows 'metal' development using Gobot libs.
### Docs
* go fmt files that needed it from recent changes
* go fmt files that needed it from recent changes
### File
* rename, adding a test file for the Adafruit driver, and slight func naming changes.
* rename, adding a test file for the Adafruit driver, and slight func naming changes.
### Fix
* a typo and update the doc comment for FirmataAdaptor.ServoConfig
* the ServoConfig byte order
* issues flagged by 'go vet'
* misspellings
### Fixing
* some code and finally have Travis building
* tests, adding a few more, adding nats server to Travis CI for testing
### Initial
* significant changes to the Adafruit Motor HAT driver to support Stepper Motors.
* commit of driver code, with accompanying example, for the Adafruit_MotorHat.
### Joule
* add i2c example and notes to README about pullup resistors
* adds pin mappings from the second header
* add pin mapping info to README
* go fmt the multi-LED example
### Merge
* branch 'dev' of github.com:jfinken/gobot into dev
* branch 'dev' of github.com:jfinken/gobot into dev
### Misc
* update all LICENSE files for current year
### More
* explicit initialization in Start, slight refactor, and separate DC Motor and Stepper Motor examples.
### Move
* interface assertions to test files.
### Release
* update to version 0.13.0
### Remove
* debug message from i2c_device.go
### Removing
* the raspi_adafruit program as it has been split into three separate programs, removing my Makefile for the raspi adafruit programs, and fixing up a few comments.
* my fork from the Adafruit tests.
### Starting
* support for Intel Joule with the built-in LEDs and more
### Test
* add golang 1.7 to Travis CI tests
* add golang 1.7 to Travis CI tests
### Tests
* complete move of test interfaces into the test files where they belong
* refactor test interfaces out of implementations and into the tests where they belong
### Update
* READMEs with up to date info for Edison/Joule
### Updating
* platform support info
## [v0.12.1](https://github.com/hybridgroup/gobot/compare/v0.12.0...v0.12.1) (2016-07-13)
### A
* little more WIP, can open a connection to a specific peripheral
### Add
* MQTT authentication support
* MQTT authentication support
* Go Reportcard badge for fun
* Go Reportcard badge for fun
### Added
* example of how to use temp36 temperature sensor with firmata
* example of how to use temp36 temperature sensor with firmata
### Adds
* support for Dualshock4 wireless gamepad
* support for Dualshock4 wireless gamepad
### Allow
* failures in Travis builds for Golang 1.3 due to SDL changes
### Almost
* reading battery info
### BLE
* seems to require Golang 1.4+
### Can
* see BLE devices, and connect to a specific one
### Change
* default value for PCMD flag to match the Bebop 2.0.57+ expectations
* default value for PCMD flag to match the Bebop 2.0.57+ expectations
* test delay to 50ms
* test delay to 50ms
### Code
* cleanup, improve go report card
* cleanup, improve go report card
### Fix
* specs
* specs
* for analog (quick changes lag)
* for analog (quick changes lag)
* [#201](https://github.com/hybridgroup/gobot/issues/201) by add 'make examples' command to Makefile
* mavlink link typo
### Fixes
* failing test
* failing test
### Go
* fmt the code
### Increase
* hover time and remove cruft from simple Bebop drone example
* hover time and remove cruft from simple Bebop drone example
### Introduce
* `gobottest` package with test helpers
* `gobottest` package with test helpers
### Make
* dev branch target more explicit
### Making
* sure tests pass
### Merge
* branch 'feature/audio' into dev
* branch 'bugfix/gpio-button-tests' into dev
* branch 'feature/ble' into feature/ble-wip
### More
* WIP on reading characteristics
### Pin
* 229 value left out of test fixture on edison
### Refactor
* to use `gobottest` test helpers
* to use `gobottest` test helpers
### Remove
* fmt no longer used here
* commented lines
* test code
### Resolve
* merge conflicts
* merge conflict in Travis CI file
### Simple
* implementation that can read data
### Support
* gpio pin turn on and off
* gpio pin turn on and off
### Switching
* to currantlabs fork of gatt, and some related refactoring
### Test
* generated error messages as well
* generated error messages as well
### Tests
* also need to be pointed to [@veandco](https://github.com/veandco) go-sdl2 fork
### Update
* to 0.12.1
* missing changelog entries
* missing changelog entries
* ARDrone face tracking example to use main go-opencv fork
### Use
* main go-sdl fork from [@veandco](https://github.com/veandco) to pickup any upstream changes
* OpenCV 2.4, as well as switch to main fork of go-opencv
* Seek to speed up read/write in sysfs
### WIP
* on BLE
## [v0.12.0](https://github.com/hybridgroup/gobot/compare/v.0.11.1...v0.12.0) (2016-07-13)
### Refactor Gobot test helpers into separate package
### Improve Gobot.Every method to return channel, allowing it to be halted
### Refactor of sysfs adds substantial speed improvements
### ble
* Experimental support for Bluetooth LE.
* Initial support for Battery & Device Information services
* Initial support for Sphero BLE robots such as Ollie
* Initial support for Parrot Minidrone
### audio
* Add new platform for Audio playback
### gpio
* Support added for new GPIO device:
* RGB LED
* Bugfixes:
* Correct analog to better handle quick changes
* Correct handling of errors and buffering for Wiichuk
### mqtt
* Add support for MQTT authentication
### opencv
* Switching to use main fork of OpenCV
* Some minor bugfixes related to face tracking
## [v.0.11.1](https://github.com/hybridgroup/gobot/compare/v0.11.0...v.0.11.1) (2016-02-17)
### Add
* support for 'hand' and 'gesture' Leap Motion events
* MMA7660 accelerometer example for C.H.I.P.
* C.H.I.P. to supported platforms
* support for the CHIP platform
* MCP23017 write and read functionality to GPIO
### Adds
* MCP23017 i2c device to README
* additional examples for C.H.I.P.
### Better
* I2C device descriptions in README
### Correct
* the release command sent to pi-blaster.
* Intel Edison docs location thanks to [@seanmarcia](https://github.com/seanmarcia)
### Default
* the new MQTT 'AutoReconnect' to false
### Failure
* is no longer an option for Go 1.6
### Fix
* [#236](https://github.com/hybridgroup/gobot/issues/236) & fix [#239](https://github.com/hybridgroup/gobot/issues/239) by correcting initialization and temperature conversion for MPU-6050
### Fixed
* event race condition
### Get
* I2C functionality before doing SMBus block I/O
### Golang
* 1.3.3 still works, adding back to build
### Increase
* button delay hack for test suite
* test delay hack for button tests
### Name
* C.H.I.P. pins according to printed names
### Need
* to explicitly set content type to text/html for Robeaux main page
### No
* coveralls repo token for provate repos?
### Remove
* coveralls badge
### Run
* builds against the latest major releases
### The
* take-off-before-event-handling bug again
### Trying
* to remove coveralls based code coverage
* conditional build before_install
* conditional build
### Update
* version to v.0.11.1
* version to 0.11
* MQTT README for latest info
* targeted golang versions to include 1.6, and to begin deprecating 1.3.3 and earlier
* coveralls badge in README
* API example
### Use
* newer naming system for C.H.I.P. pins
### What
* about -v
### Why
* do this twice?
## [v0.11.0](https://github.com/hybridgroup/gobot/compare/0.10.0...v0.11.0) (2016-02-17)
### Support for Golang 1.6
### Determine I2C adaptor capabilities dynamically to avoid use of block I/O when unavailable
### chip
* Add support for GPIO & I2C interfaces on C.H.I.P. $9 computer
### leap motion
* Add support additional "hand" and "gesture" events
### mqtt
* Support latest update to Eclipse Paho MQTT client library
### raspberry pi
* Proper release of Pi Blaster for PWM pins
### bebop
* Prevent event race conditions on takeoff/landing
### i2c
* Support added for new i2c device:
* MCP23017 Port Expander
* Bugfixes:
* Correct init and data parsing for MPU-6050
* Correct handling of errors and buffering for Wiichuk
## [0.10.0](https://github.com/hybridgroup/gobot/compare/0.8.2...0.10.0) (2015-10-27)
### Refactor core to cleanup robot initialization and shutdown
### Remove unnecessary goroutines spawned by NewEvent
### api
* Update Robeaux to v0.5.0
### bebop
* Add support for the Parrot Bebop drone
### keyboard
* Add support for keyboard control
### gpio
* Support added for 10 new Grove GPIO devices:
* Grove Touch Sensor
* Grove Sound Sensor
* Grove Button
* Grove Buzzer
* Grove Led
* Grove Light Sensor
* Grove Vibration Sensor
* Grove Rotary
* Grove Relay
* Grove Temperature Sensor
### i2c
* Support added for 2 new Grove i2c devices:
* Grove Accelerometer
* Grove LCD with RGB backlit display
### docs
* Many useful fixes and updates for docs, mostly contributed by our wonderful community.
## [0.8.2](https://github.com/hybridgroup/gobot/compare/0.8.1...0.8.2) (2015-06-30)
### firmata
* Refactor firmata adaptor and split firmata protocol implementation into sub `client` package
### gpio
* Add support for LIDAR-Lite
### raspi
* Add PWM support via pi-blaster
### sphero
* Add `ConfigureLocator`, `ReadLocator` and `SetRotationRate`
## [0.8.1](https://github.com/hybridgroup/gobot/compare/0.8...0.8.1) (2014-12-28)
### spark
* Add support for spark Events, Functions and Variables
### sphero
* Add `SetDataStreaming` and `ConfigureCollisionDetection` methods
## [0.8](https://github.com/hybridgroup/gobot/compare/0.7.1...0.8) (2014-12-24)
### Refactor core, gpio, and i2c interfaces
### Correctly pass errors throughout packages and remove all panics
### Numerous bug fixes and performance improvements
### api
* Update robeaux to v0.3.0
### firmata
* Add optional io.ReadWriteCloser parameter to FirmataAdaptor
* Fix `thread exhaustion` error
### cli
* generator
* Update generator for new adaptor and driver interfaces
* Add driver, adaptor and project generators
* Add optional package name parameter
## [0.7.1](https://github.com/hybridgroup/gobot/compare/0.7...0.7.1) (2014-11-17)
### opencv
* Fix pthread_create issue on Mac OS
## [0.7](https://github.com/hybridgroup/gobot/compare/0.6.3...0.7) (2014-11-10)
### Dramatically increased test coverage and documentation
### api
* Conform to the [cppp.io](https://gobot.io/x/cppp-io) spec
* Add support for basic middleware
* Add support for custom routes
* Add SSE support
### ardrone
* Add optional parameter to specify the drones network address
### core
* Add `Once(e *Event, f func(s interface{})` Event function
* Rename `Expect` to `Assert` and add `Refute` test helper function
### i2c
* Add support for MPL115A2
* Add support for MPU6050
### mavlink
* Add support for `common` mavlink messages
### mqtt
* Add support for mqtt
### raspi
* Add support for the Raspberry Pi
### sphero
* Enable stop on sphero disconnect
* Add `Collision` data struct
### sysfs
* Add generic linux filesystem gpio implementation
## [0.6.3](https://github.com/hybridgroup/gobot/compare/0.6.2...0.6.3) (2014-09-24)
### Add support for the Intel Edison
## [0.6.2](https://github.com/hybridgroup/gobot/compare/0.6.1...0.6.2) (2014-07-28)
### cli
* Fix typo in generator
### leap
* Fix incorrect Port reference
* Fix incorrect Event name
### neurosky
* Fix incorrect Event names
### sphero
* Correctly format output of GetRGB
## [0.6.1](https://github.com/hybridgroup/gobot/compare/0.6...0.6.1) (2014-07-12)
### cli
* Fix template error in generator
## [0.6](https://github.com/hybridgroup/gobot/compare/0.5.2...0.6) (2014-07-11)
### api
* Add robeaux support
### core
* Refactor `Connection` and `Device`
* Connections are now a collection of Adaptors
* Devices are now a collection of Drivers
* Add `Event(string)` function instead of `Events[string]` for retrieving Driver event
* Add `AddEvent(string)` function to register an event on a Driver
### firmata
* Fix slice bounds out of range error
### sphero
* Fix issue where the driver would not halt correctly on OSX
## [0.5.2](https://github.com/hybridgroup/gobot/compare/0.5.1...0.5.2) (2014-06-30)
### beaglebone
* Add `DirectPinDriver`
* Ensure slots are properly loaded
## [0.5.1](https://github.com/hybridgroup/gobot/compare/0.5...0.5.1) (2014-06-28)
### core
* Add `Version()` function for Gobot version retrieval
### firmata
* Fix issue with reading analog inputs
* Add `data` event for `AnalogSensorDriver`
## [0.5](https://github.com/hybridgroup/gobot/compare/0.4...0.5) (2014-06-17)
### Idomatic clean up
* Removed reflections throughout packages
* All officially supported platforms are now in ./platforms
* API is now a new package ./api
* All platforms examples are in ./examples
* Replaced martini with net/http
* Replaced ginkgo/gomega with system testing package
* Refactor gobot/robot/device commands
* Added Event type
* Replaced Manager type with Gobot type
* Every` and `After` now accept `time.Duration`
* Removed reflection helper methods
## [0.4](https://github.com/hybridgroup/gobot/compare/0.3...0.4) (2014-06-12)
### API
* commands now return an array of results
### Add
* cors support
* basic auth support to api
* Joystick & Neurosky platforms to README
* utils tests
* coveralls
### Allow
* user to set Host and Port when starting up Api
### Change
* README image source to gobot-site repo
* startApi to private function
### Display
* warning when using API without SSL
### Fixed
* the logo link
### Format
* device and connection type
### Green
* tests
### More
* api test coverage
* tests
### Refactor
* tests
### Remove
* Travis build from IRC
* ConnectToSerial
* ConnectToTcp util
* Reconnect and Disconnect from AdaptorInterface
### Robot
* is now a pointer
### SSL
* support in Api
### Update
* README.md
* README for new API security features
* api robeaux api compatibility
* .travis.yml
* generated driver
* examples
* coveralls badge
* platforms and drivers
### Use
* go-martini/martini
### WIP
* for API host/port params
* api tests
## [0.3](https://github.com/hybridgroup/gobot/compare/0.2...0.3) (2014-04-07)
### Add
* Godeps file
* IRC notifications to Travis builds
* tests for generated projects
* Init function to DriverInterface
* Halt function to DriverInterface
* more GPIO devices to README
* scale functions
### All
* updates for new gonuts/commander api
### Fix
* typo in generator
### Merge
* branch 'master' of github.com:hybridgroup/gobot
### Update
* generator
## [0.2](https://github.com/hybridgroup/gobot/compare/0.1...0.2) (2014-02-04)
### Add
* robeaux submodule
* Finalize on SIGINT
* Publish function for driver events
* device test coverage
* manager and robot test coverage
### Clean
* up tests
### Do
* not run tests on gobot.io branch
### JSON
* compatibility with cylon and artoo
### More
* test coverage
### Refactor
* robot and manager
### Remove
* robeaux submodule
### Update
* README.md
* examples
### Use
* golang log
### WIP
* robeaux support
## 0.1 (2013-12-30)
### Accept
* POST and GET for commands
### Adaptor
* and driver generator
### Add
* support for additional parameters
* serialport support
* Travis banner to README
* api commands
* POST command
* manager example
* robot manager
* Sphero example
* Digispark to list of supported platforms
* helper functions
* Driver channel for events
* port to adaptor
### Alter
* structure
### Beaglebone
* Black GPIO
### Clean
* up files
* up variables
* up some comments
### Correctly
* start drivers
### DRY
* up On function
### Dots
* for ignoring imports
### Drop
* unnecessary api parameters
### Expose
* robot functions via api
### Fix
* example
### Go
* fmt examples
### Initial
* GETs for api
* commit
### Install
* ginkgo and gomega dependencies
### Merge
* branch 'examples'
* branch 'master' into ginkgo
* branch 'master' into ginkgo
### More
* WIP of base structs
### Now
* using Connection.Connect()
### Pending
* tests for Robot
### Proper
* formatting for README example
### Properly
* set default interval
### Refactor
* robot name assignment func, and tests to prove it
### Reformat
* examples using gofmt
* source using gofmt
### Remove
* Params from driver struct
* extra nesting
### Rename
* Gobot struct to Manager
### Set
* GOMAXPROCS property in GobotManager
### Skeleton
* for ginkgo/gomega testing
### Small
* refactor
* robot refactor
### StartDriver
* is now optional
### Switch
* to adaptor, driver, connection and device interfaces
### Travis
* lang build
### Tweak
* json output
### Update
* examples
* README.md
* timers and fix issues
### WIP
* multiple robot support
* connections and devices
### Work
* is optional
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at gobot@hybridgroup.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to Gobot
## Target Branch
**Please open all non-hotfix PRs against the `dev` branch!**
Gobot follows a ["git flow"](http://nvie.com/posts/a-successful-git-branching-model/)-style model for managing development.
## Issue Contributions
When opening new issues or commenting on existing issues on this repository
please make sure discussions are related to concrete technical issues with the
Gobot software.
## Code Contributions
The Gobot project welcomes new contributors.
This document will guide you through the contribution process.
What do you want to contribute?
* I want to otherwise correct or improve the docs or examples
* I want to report a bug
* I want to add some feature or functionality to an existing hardware platform
* I want to add support for a new hardware platform
Descriptions for each of these will eventually be provided below.
## General Guidelines
* All active development is in the `dev` branch. New or updated features must be added to the `dev` branch.
* All patches must be provided under the Apache 2.0 License
* Please use the -S option in git to "sign off" that the commit is your work and you are providing it under the
Apache 2.0 License
* Submit a Github Pull Request to the appropriate branch and describe the changes sufficient.
* Please follow our naming conventions for Pull Requests.
* We will look at the patch, test it out, and give you feedback.
* Avoid doing minor whitespace changes, renamings, etc. along with merged content. These will be done by the maintainers
from time to time but they can complicate merges and should be done separately.
* Take care to maintain the existing coding style.
* `golangci-lint` your code, see [instruction for local installation](https://golangci-lint.run/usage/install/#local-installation)
* `gofumpt` your code (the go version will be automatically obtained from go.mod), see [instructions](https://github.com/mvdan/gofumpt/blob/master/README.md)
* Add unit tests for any new or changed functionality and run tests with `-race` flag activated.
* All pull requests should be "fast forward"
* If there are commits after yours use “git rebase -i <new_head_branch>”
* If you have local changes you may need to use “git stash”
* For git help see [progit](http://git-scm.com/book) which is an awesome (and free) book on git
* Use one of the latest existing platforms/drivers etc. as a blueprint for creating a new one
## Creating Pull Requests
Because Gobot makes use of self-referencing import paths, you will want
to implement the local copy of your fork as a remote on your copy of the
original Gobot repo. Katrina Owen has [an excellent post on this workflow](https://splice.com/blog/contributing-open-source-git-repositories-go/).
The basics are as follows:
1. Fork the project via the GitHub UI
2. `git clone` the upstream repo and set it up as the `upstream` remote and your own repo as the `origin` remote:
`git clone https://github.com/hybridgroup/gobot.git`
`cd $GOPATH/src/gobot.io/x/gobot`
`git remote rename origin upstream`
`git remote add origin git@github.com/YOUR_GITHUB_NAME/gobot`
All import paths should now work fine assuming that you've got the
proper branch checked out.
3. Get all dependencies:
* `cd $GOPATH/src/gobot.io/x/gobot`
* `go mod tidy` will fetch all the dependencies at their needed version.
## Landing Pull Requests
(This is for committers only. If you are unsure whether you are a committer, you are not.)
1. Set the contributor's fork as an upstream on your checkout
`git remote add contrib1 https://github.com/contrib1/gobot`
2. Fetch the contributor's repo
`git fetch contrib1`
3. Checkout a copy of the PR branch
`git checkout pr-1234 --track contrib1/branch-for-pr-1234`
4. Review the PR as normal
5. Land when you're ready via the GitHub UI
## Convention for Pull Request Descriptions
Making unified descriptions helps a lot to generate the [CHANGELOG](./CHANGELOG.md) for the next release.
We support the style from <https://www.conventionalcommits.org>, so you can use something like this:
* type(scope): description
* i2c(PCF8583): added
* gpio(HD44780): fix wrong constants
* raspi(PWM): refactor usage
* docs(core): usage of Kernel driver
* or alternative: core(docs): usage of Kernel driver
* build(style): adjust rule for golangci-lint
We try to keep it as simple as possible:
* Do not use "fix" or "bugfix" for `type`
* Please assign "fix", "style", "refactor", "perf", "test" etc. to the related `type` (driver-type/platform-name etc.),
and start the description with e.g. "fix...", "test..." etc.
* For `type` use the name of the deepest folder (e.g. i2c/raspi/system). Feel free to order "examples" to the
related driver.
* Further values for `type` are: "docs", "build", "core"
* Please use "build" instead of "CI"
* For the `scope` use the name of the driver or feature (e.g. grove/PWM).
* If unsure don't panic, follow your feeling. Possibly the reviewer will correct it or suggest a better description.
## Developer's Certificate of Origin 1.0
By making a contribution to this project, I certify that:
* (a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license indicated
in the file; or
* (b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source license
and I have the right under that license to submit that work with
modifications, whether created in whole or in part by me, under the
same open source license (unless I am permitted to submit under a
different license), as indicated in the file; or
* (c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified it.
## Code of Conduct
Gobot is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
[You can read about it here](CODE_OF_CONDUCT.md).
## Origins
This document is based on the original [io.js contribution guidelines](https://github.com/nodejs/io.js/blob/main/CONTRIBUTING.md)
================================================
FILE: LICENSE.txt
================================================
Copyright (c) 2013-2020 The Hybrid Group
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: MIGRATION.md
================================================
# Migration guide
From time to time a breaking change of API can happen. Following to [SemVer](https://semver.org/), the gobot main version
should be increased. In such case all users needs to adjust there projects for the next update, although they not using
a driver or platform with changed API.
To prevent this scenario for most users, the main version will not always increased, but affected drivers and platforms
are listed here and a migration strategy is provided.
## Switch from version 2.4.0 (applications using the gpiod options and some import paths affected)
### RockPi adaptor was moved to radxa folder
For cleanup purposes and future preparation the folders and files were moved. Please search and replace to change the
import path as follows.
```go
// old
...
"gobot.io/x/gobot/v2/platforms/rockpi"
...
// new
...
"gobot.io/x/gobot/v2/platforms/radxa/rockpi"
...
```
### Tinkerboard adaptors were moved to asus folder
For cleanup purposes and future preparation the folders and files were moved. Please search and replace to change the
import path as follows.
```go
// old
...
"gobot.io/x/gobot/v2/platforms/tinkerboard/tinkerboard2"
...
// new
...
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard2"
...
```
```go
// old
...
"gobot.io/x/gobot/v2/platforms/tinkerboard"
...
// new
...
"gobot.io/x/gobot/v2/platforms/asus/tinkerboard"
...
```
### NanoPi NEO adaptor was moved to friendlyelec folder
With introduce of FriendlyELEC NanoPC-T6 a second adaptor from FriendlyELEC (formerly friendlarm) now exists. Please
search and replace to change the import path of nanopi as follows.
```go
// old
...
"gobot.io/x/gobot/v2/platforms/nanopi"
...
// new
...
"gobot.io/x/gobot/v2/platforms/friendlyelec/nanopi"
...
```
### The term gpiod was renamed to cdev
Using the term "cdev" (short for character device Kernel ABI for GPIO access) is more suitable than using "gpiod" (the
name of the user space driver in Linux). Also it relates better to the term "sysfs" (the legacy sysfs Kernel ABI for
GPIO access). The former name was chosen so there would be no difference to the used go module "gpiod". Since also this
module is now renamed to "go-gpiocdev", we choose the better name "cdev" from now on.
This change affects all applications, which using the With... options of "gpiod" or "sysfs". A search and replace is
suitable:
```go
// old
...
a := NewAdaptor(adaptors.WithGpiodAccess())
...
// new
...
a := NewAdaptor(adaptors.WithGpioCdevAccess())
...
```
```go
// old
...
a := NewAdaptor(adaptors.WithSysfsAccess())
...
// new
...
a := NewAdaptor(adaptors.WithGpioSysfsAccess())
...
```
Also those findings needs to be replaced, which usually affects developers, but not users:
* `system.WithDigitalPinGpiodAccess()` --> `system.WithDigitalPinCdevAccess()`
* `IsGpiodDigitalPinAccess()` --> `HasDigitalPinCdevAccess()`
### PocketBeagle adaptor goes cdev
The beagle board "PocketBeagle" supports with latest images the Linux Kernel character device API, so the adaptor was
changed to use this as the default.
By "adaptors.WithSysfsAccess()" the old behavior can be forced. This is most likely needed if an old image with old
Kernel is used which does not support this new API.
A small renaming is also done, please search and replace:
```go
// old
...
"gobot.io/x/gobot/v2/platforms/beaglebone"
...
beaglebone.NewPocketBeagleAdaptor(...)
...
// new
...
"gobot.io/x/gobot/v2/platforms/beagleboard/pocketbeagle"
...
pocketbeagle.NewAdaptor(...)
...
```
## Switch from version 2.3.0 (ble and sphero adaptors affected)
### BLE drivers and client adaptor
All BLE drivers now can be found in the folder "drivers/ble". Formerly the drivers are located below "platforms/ble".
In addition the location of the BLE client adaptor was changed to "platforms/bleclient". Therefore a change for the
import paths is needed. The constructor function was also renamed, see below.
```go
// old
import(
...
"gobot.io/x/gobot/v2/platforms/ble"
...
)
...
bleAdaptor := ble.NewClientAdaptor(os.Args[1])
...
// new
import(
...
"gobot.io/x/gobot/v2/drivers/ble"
"gobot.io/x/gobot/v2/platforms/bleclient"
...
)
...
bleAdaptor := bleclient.NewAdaptor(os.Args[1])
...
```
### BLE client adaptor changed signature for Subscribe()
Since introducing the usage of "github.com/muka/go-bluetooth" in 2020, the callback do not support the given error
parameter anymore. The switch to usage of "tinygo.org/x/bluetooth" has not changed this. Therefore it is removed now
from the function.
### BLE generic drivers changed signature for Get*() functions
All those functions log an error only or panic, so the caller gets no nice programmatic feedback. The error is now
returned instead and the log output needs to be done at caller side.
```go
// old
...
devName := access.GetDeviceName()
appearance := access.GetAppearance()
modelNo := info.GetModelNumber()
fwRev := info.GetFirmwareRevision()
hwRev := info.GetHardwareRevision()
manuName := info.GetManufacturerName()
pid := info.GetPnPId()
level := battery.GetBatteryLevel()
...
// new
...
devName, err := access.GetDeviceName()
if err != nil {
fmt.Println(err)
}
appearance, err := access.GetAppearance()
if err != nil {
fmt.Println(err)
}
...
...
```
### Sphero adaptor split off
The Serial Based Sphero adaptor was split off into a generic serial adaptor and the driver part. With this, the imports
needs to be adjusted. In addition all events now have a suffix "Event", see below.
```go
// old
import(
...
"gobot.io/x/gobot/v2/platforms/sphero"
...
)
...
adaptor := sphero.NewAdaptor("/dev/rfcomm0")
spheroDriver := sphero.NewSpheroDriver(adaptor)
...
_ = spheroDriver.On(sphero.Collision, func(data interface{}) {
...
// new
import(
...
"gobot.io/x/gobot/v2/drivers/common/spherocommon"
"gobot.io/x/gobot/v2/drivers/serial"
"gobot.io/x/gobot/v2/platforms/serialport"
...
)
...
adaptor := serialport.NewAdaptor("/dev/rfcomm0")
spheroDriver := sphero.NewSpheroDriver(adaptor)
...
_ = spheroDriver.On(sphero.CollisionEvent, func(data interface{}) {
...
```
### Neurosky adaptor split off
The Neurosky adaptor now use the generic serial adaptor. The driver part was moved. With this, the imports needs to be
adjusted. In addition all events now have a suffix "Event", see below.
```go
// old
import(
...
"gobot.io/x/gobot/v2/platforms/neurosky"
...
)
...
adaptor := neurosky.NewAdaptor("/dev/rfcomm0")
neuro := neurosky.NewDriver(adaptor)
...
_ = neuro.On(neurosky.Extended, func(data interface{}) {
...
// new
import(
...
"gobot.io/x/gobot/v2/drivers/serial/neurosky"
"gobot.io/x/gobot/v2/platforms/serialport"
...
)
...
adaptor := serialport.NewAdaptor("/dev/rfcomm0", serialport.WithName("Neurosky"), serialport.WithBaudRate(57600))
neuro := neurosky.NewMindWaveDriver(adaptor)
...
_ = neuro.On(neurosky.ExtendedEvent, func(data interface{}) {
...
```
### MegaPi adaptor split off
The MegaPi adaptor now use the generic serial adaptor. The driver part was moved. With this, the imports needs to be
adjusted.
```go
// old
import(
...
"gobot.io/x/gobot/v2/platforms/megapi"
...
)
...
megaPiAdaptor := megapi.NewAdaptor("/dev/ttyS0")
motor := megapi.NewMotorDriver(megaPiAdaptor, 1)
...
// new
import(
...
"gobot.io/x/gobot/v2/drivers/serial/megapi"
"gobot.io/x/gobot/v2/platforms/serialport"
...
)
...
adaptor := serialport.NewAdaptor("/dev/ttyS0", serialport.WithName("MegaPi"))
motor := megapi.NewMotorDriver(adaptor, 1)
...
```
## Switch from version 2.2.0 (gpio drivers affected)
### gpio.ButtonDriver, gpio.PIRMotionDriver: substitute parameter "v time.duration"
A backward compatible case is still included, but it is recommended to use "WithButtonPollInterval" instead, see example
below.
```go
// old
d := gpio.NewButtonDriver(adaptor, "1", 50*time.Millisecond)
// new
d := gpio.NewButtonDriver(adaptor, "1", gpio.WithButtonPollInterval(50*time.Millisecond))
```
### gpio.EasyDriver: optional pins
There is no need to use the direction, enable or sleep feature of the driver. Therefore the parameters are removed from
constructor. Please migrate according to the examples below. The order of the optional functions does not matter.
```go
// old
d0 := gpio.NewEasyDriver(adaptor, 0.80, "1", "", "", "")
d1 := gpio.NewEasyDriver(adaptor, 0.81, "11", "12", "", "")
d2 := gpio.NewEasyDriver(adaptor, 0.82, "21", "22", "23", "")
d3 := gpio.NewEasyDriver(adaptor, 0.83, "31", "32", "33", "34")
// new
d0 := gpio.NewEasyDriver(adaptor, 0.80, "1")
d1 := gpio.NewEasyDriver(adaptor, 0.81, "11", gpio.WithEasyDirectionPin("12"))
d2 := gpio.NewEasyDriver(adaptor, 0.82, "21", gpio.WithEasyDirectionPin("22"), gpio.WithEasyEnablePin("23"))
d3 := gpio.NewEasyDriver(adaptor, 0.83, "31", gpio.WithEasyDirectionPin("32"), gpio.WithEasyEnablePin("33"),
gpio.WithEasySleepPin("34"))
```
### gpio.BuzzerDriver: unexport 'BPM' attribute
```go
d := gpio.NewBuzzerDriver(adaptor, "1")
// old
d.BPM = 120.0
fmt.Println("BPM:", d.BPM)
// new
d.SetBPM(120.0)
fmt.Println("BPM:", d.BPM())
```
### gpio.RelayDriver: unexport 'Inverted' attribute
Usually the relay is inverted or not, except be rewired. From now on the inverted behavior can only be changed on
initialization. If there is really a different use case, please file a new issue.
```go
// old
d := gpio.NewRelayDriver(adaptor, "1")
d.Inverted = true
fmt.Println("is inverted:", d.Inverted)
// new
d := gpio.NewRelayDriver(adaptor, "1", gpio.WithRelayInverted())
fmt.Println("is inverted:", d.IsInverted())
```
### gpio.HD44780Driver: make 'SetRWPin()' an option
```go
// old
d := gpio.NewHD44780Driver(adaptor, ...)
d.SetRWPin("10")
// new
d := gpio.NewHD44780Driver(adaptor, ..., gpio.WithHD44780RWPin("10"))
```
### gpio.ServoDriver: unexport 'CurrentAngle' and rename functions 'Min()', 'Max()', 'Center()'
```go
d := gpio.NewServoDriver(adaptor, "1")
// old
d.Min()
fmt.Println("current position:", d.CurrentAngle)
d.Center()
d.Max()
// new
d.ToMin()
fmt.Println("current position:", d.Angle())
d.ToCenter()
d.ToMax()
```
### gpio.MotorDriver: unexport pin and state attributes, rename functions
The motor driver was heavily revised - sorry for the inconveniences.
affected pins:
* SpeedPin
* SwitchPin (removed, was unused)
* DirectionPin
* ForwardPin
* BackwardPin
Usually the pins will not change without a hardware rewiring. All pins, except the speed pin are optionally, so options
are designed for that.
```go
// old
d := gpio.NewMotorDriver(adaptor, "1")
d.DirectionPin = "10"
// new
d := gpio.NewMotorDriver(adaptor, "1", gpio.WithMotorDirectionPin("10"))
```
```go
// old
d := gpio.NewMotorDriver(adaptor, "1")
d.ForwardPin = "10"
d.BackWardPin = "11"
// new
d := gpio.NewMotorDriver(adaptor, "1", gpio.WithMotorForwardPin("10"), gpio.WithMotorBackwardPin("11"))
```
affected functions:
* Speed() --> SetSpeed()
* Direction() --> SetDirection()
* Max() --> RunMax()
* Min() --> RunMin()
affected states:
* CurrentState
* CurrentSpeed
* CurrentMode
* CurrentDirection
Most of the attributes were used only for reading. If there is something missing, please file a new issue.
```go
d := gpio.NewMotorDriver(adaptor, "1")
// old
d.On()
fmt.Println("is on:", d.CurrentState==1)
fmt.Println("speed:", d.CurrentSpeed)
d.Off()
fmt.Println("is off:", d.CurrentState==0)
fmt.Println("mode is digital:", d.CurrentMode=="digital")
fmt.Println("direction:", d.CurrentDirection)
// new
d.On()
fmt.Println("is on:", d.IsOn())
d.Off()
fmt.Println("is on:", d.IsOff())
fmt.Println("speed:", d.Speed())
fmt.Println("mode is digital:", d.IsDigital())
fmt.Println("direction:", d.Direction())
```
```go
d := gpio.NewMotorDriver(adaptor, "1")
// old
d.Speed(123)
fmt.Println("is mode now analog?", d.CurrentMode!="digital")
// new
d.SetSpeed(123)
fmt.Println("is mode now analog?", d.IsAnalog())
```
Although, it is working like above, it will be more clear, if the mode is defined at the beginning, like so.
```go
// old
d := gpio.NewMotorDriver(adaptor, "1")
d.CurrentMode=="analog"
d.Max()
// new
d := gpio.NewMotorDriver(adaptor, "1", gpio.WithMotorAnalog())
d.RunMax()
```
================================================
FILE: Makefile
================================================
# include also examples in other than ./examples folder
ALL_EXAMPLES := $(shell grep -l -r --include "*.go" 'build example' ./)
# prevent examples with gocv (opencv) dependencies
EXAMPLES_NO_GOCV := $(shell grep -L 'gocv' $(ALL_EXAMPLES))
# used examples
EXAMPLES := $(EXAMPLES_NO_GOCV)
.PHONY: test test_race test_cover robeaux version_check fmt_check fmt_fix examples examples_check examples_fmt_fix $(EXAMPLES)
# opencv platform currently skipped to prevent install of preconditions
including_except := $(shell go list ./... | grep -v platforms/opencv)
# Run tests on nearly all directories without test cache, with race detection
test_race:
go test -failfast -count=1 -race $(including_except) -tags libusb
# Run tests on nearly all directories without test cache
test:
go test -failfast -count=1 $(including_except)
# Test, generate and show coverage in browser
test_cover:
go test -v $(including_except) -coverprofile=coverage.txt ; \
go tool cover -html=coverage.txt ; \
robeaux:
ifeq (,$(shell which go-bindata))
$(error robeaux not built! https://github.com/jteeuwen/go-bindata is required to build robeaux assets )
endif
cd api ; \
npm install robeaux ; \
cp -r node_modules/robeaux robeaux-tmp ; \
cd robeaux-tmp ; \
rm Makefile package.json README.markdown ; \
touch css/fonts.css ; \
echo "Updating robeaux..." ; \
go-bindata -pkg="robeaux" -o robeaux.go -ignore=\\.git ./... ; \
mv robeaux.go ../robeaux ; \
cd .. ; \
rm -rf robeaux-tmp/ ; \
rm -rf node_modules/ ; \
go fmt ./robeaux/robeaux.go ; \
# Check for installed and module version match. Will exit with code 50 if not match.
# There is nothing bad in general, if you program with a higher version.
# At least the recipe "fmt_fix" will not work in that case.
version_check:
@gv=$$(echo $$(go version) | sed "s/^.* go\([0-9].[0-9]*\).*/\1/") ; \
mv=$$(grep -m 1 'go 1.' ./go.mod | sed "s/^go \([0-9].[0-9]*\).*/\1/") ; \
echo "go: $${gv}.*, go.mod: $${mv}" ; \
if [ "$${gv}" != "$${mv}" ]; then exit 50; fi ; \
# Check for bad code style and other issues (gofumpt and gofmt check is activated for the linter)
fmt_check:
golangci-lint run -v
# Fix bad code style (the go version will be automatically obtained from go.mod)
fmt_fix:
$(MAKE) version_check || true
gofumpt -l -w .
golangci-lint run -v --fix
examples: $(EXAMPLES)
examples_check:
$(MAKE) CHECK=ON examples
examples_fmt_fix:
$(MAKE) CHECK=FMT examples
$(EXAMPLES):
ifeq ($(CHECK),ON)
go vet -tags libusb ./$@
else ifeq ($(CHECK),FMT)
gofumpt -l -w ./$@
golangci-lint run ./$@ --fix --build-tags example,libusb --disable forcetypeassert --disable noctx
else
go build -tags libusb -o /tmp/gobot_examples/$@ ./$@
endif
================================================
FILE: README.md
================================================
[](http://gobot.io/)
[](https://godoc.org/gobot.io/x/gobot/v2)
[](https://circleci.com/gh/hybridgroup/gobot/tree/dev)
[](https://ci.appveyor.com/project/deadprogram/gobot/branch/dev)
[](https://codecov.io/gh/hybridgroup/gobot)
[](https://goreportcard.com/report/hybridgroup/gobot)
[](https://github.com/hybridgroup/gobot/blob/release/LICENSE.txt)
Gobot (<https://gobot.io/>) is a framework using the Go programming language (<https://golang.org/>) for robotics, physical
computing, and the Internet of Things.
It provides a simple, yet powerful way to create solutions that incorporate multiple, different hardware devices at the
same time.
Want to run Go directly on microcontrollers? Check out our sister project TinyGo (<https://tinygo.org/>)
## Getting Started
### Get in touch
Get the Gobot source code by running this commands:
```sh
git clone https://github.com/hybridgroup/gobot.git
git checkout release
```
Afterwards have a look at the [examples directory](./examples). You need to find an example matching your platform for your
first test (e.g. "raspi_blink.go"). Than build the binary (cross compile), transfer it to your target and run it.
`env GOOS=linux GOARCH=arm GOARM=5 go build -o ./output/my_raspi_bink examples/raspi_blink.go`
> Building the code on your local machine with the example code above will create a binary for ARMv5. This is probably not
> what you need for your specific target platform. Please read also the platform specific documentation in the platform
> subfolders.
### Create your first project
Create a new folder and a new Go module project.
```sh
mkdir ~/my_gobot_example
cd ~/my_gobot_example
go mod init my.gobot.example.com
```
Copy your example file besides the go.mod file, import the requirements and build.
```sh
cp /<path to gobot folder>/examples/raspi_blink.go ~/my_gobot_example/
go mod tidy
env GOOS=linux GOARCH=arm GOARM=5 go build -o ./output/my_raspi_bink raspi_blink.go
```
Now you are ready to modify the example and test your changes. Start by removing the build directives at the beginning
of the file.
## Examples
### Gobot with Arduino
```go
package main
import (
"time"
"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/gpio"
"gobot.io/x/gobot/v2/platforms/firmata"
)
func main() {
firmataAdaptor := firmata.NewAdaptor("/dev/ttyACM0")
led := gpio.NewLedDriver(firmataAdaptor, "13")
work := func() {
gobot.Every(1*time.Second, func() {
if err := led.Toggle(); err != nil {
fmt.Println(err)
}
})
}
robot := gobot.NewRobot("bot",
[]gobot.Connection{firmataAdaptor},
[]gobot.Device{led},
work,
)
if err := robot.Start(); err != nil {
panic(err)
}
}
```
### Gobot with Sphero
```go
package main
import (
"fmt"
"time"
"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/drivers/serial"
"gobot.io/x/gobot/v2/platforms/serialport"
)
func main() {
adaptor := serialport.NewAdaptor("/dev/rfcomm0")
driver := sphero.NewSpheroDriver(adaptor)
work := func() {
gobot.Every(3*time.Second, func() {
driver.Roll(30, uint16(gobot.Rand(360)))
})
}
robot := gobot.NewRobot("sphero",
[]gobot.Connection{adaptor},
[]gobot.Device{driver},
work,
)
if err := robot.Start(); err != nil {
panic(err)
}
}
```
### "Metal" Gobot
You can use the entire Gobot framework as shown in the examples above ("Classic" Gobot), or you can pick and choose from
the various Gobot packages to control hardware with nothing but pure idiomatic Golang code ("Metal" Gobot). For example:
```go
package main
import (
"gobot.io/x/gobot/v2/drivers/gpio"
"gobot.io/x/gobot/v2/platforms/intel-iot/edison"
"time"
)
func main() {
e := edison.NewAdaptor()
if err := e.Connect(); err != nil {
fmt.Println(err)
}
led := gpio.NewLedDriver(e, "13")
if err := led.Start(); err != nil {
fmt.Println(err)
}
for {
if err := led.Toggle(); err != nil {
fmt.Println(err)
}
time.Sleep(1000 * time.Millisecond)
}
}
```
### "Manager" Gobot
You can also use the full capabilities of the framework aka "Manager Gobot" to control swarms of robots or other features
such as the built-in API server. For example:
```go
package main
import (
"fmt"
"time"
"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/api"
"gobot.io/x/gobot/v2/drivers/common/spherocommon"
"gobot.io/x/gobot/v2/drivers/serial"
"gobot.io/x/gobot/v2/platforms/serialport"
)
func NewSwarmBot(port string) *gobot.Robot {
spheroAdaptor := serialport.NewAdaptor(port)
spheroDriver := sphero.NewSpheroDriver(spheroAdaptor, serial.WithName("Sphero" + port))
work := func() {
spheroDriver.Stop()
_ = spheroDriver.On(sphero.CollisionEvent, func(data interface{}) {
fmt.Println("Collision Detected!")
})
gobot.Every(1*time.Second, func() {
spheroDriver.Roll(100, uint16(gobot.Rand(360)))
})
gobot.Every(3*time.Second, func() {
spheroDriver.SetRGB(uint8(gobot.Rand(255)),
uint8(gobot.Rand(255)),
uint8(gobot.Rand(255)),
)
})
}
robot := gobot.NewRobot("sphero",
[]gobot.Connection{spheroAdaptor},
[]gobot.Device{spheroDriver},
work,
)
return robot
}
func main() {
manager := gobot.NewManager()
api.NewAPI(manager).Start()
spheros := []string{
"/dev/rfcomm0",
"/dev/rfcomm1",
"/dev/rfcomm2",
"/dev/rfcomm3",
}
for _, port := range spheros {
manager.AddRobot(NewSwarmBot(port))
}
if err := manager.Start(); err != nil {
panic(err)
}
}
```
## Hardware Support
Gobot has a extensible system for connecting to hardware devices. The following robotics and physical computing
platforms are currently supported:
- [Arduino](http://www.arduino.cc/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/firmata)
- [ASUS Tinker Board](https://www.asus.com/us/Single-Board-Computer/Tinker-Board/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/asus/tinkerboard)
- [ASUS Tinker Board 2](https://tinker-board.asus.com/series/tinker-board-2.html/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/asus/tinkerboard2)
- Audio <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/audio)
- [BeagleBoard BeagleBone Black](http://beagleboard.org/boards) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/beagleboard/beaglebone)
- [BeagleBoard PocketBeagle](http://beagleboard.org/pocket/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/beagleboard/pocketbeagle)
- [Bluetooth LE](https://www.bluetooth.com/what-is-bluetooth-technology/bluetooth-technology-basics/low-energy) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/bleclient)
- [C.H.I.P](http://www.nextthing.co/pages/chip) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/chip)
- [C.H.I.P Pro](https://docs.getchip.com/chip_pro.html) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/chip)
- [Digispark](http://digistump.com/products/1) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/digispark)
- [DJI Tello](https://www.ryzerobotics.com/tello) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/dji/tello)
- [DragonBoard](https://developer.qualcomm.com/hardware/dragonboard-410c) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/dragonboard)
- [ESP8266](http://esp8266.net/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/firmata)
- [FriendlyELEC NanoPi NEO](https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/friendlyelec/nanopi)
- [FriendlyELEC NanoPC-T6](https://wiki.friendlyelec.com/wiki/index.php/NanoPC-T6) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/friendlyelec/nanopct6)
- [GoPiGo 3](https://www.dexterindustries.com/gopigo3/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/dexter/gopigo3)
- [Intel Curie](https://www.intel.com/content/www/us/en/products/boards-kits/curie.html) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/intel-iot/curie)
- [Intel Edison](http://www.intel.com/content/www/us/en/do-it-yourself/edison.html) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/intel-iot/edison)
- [Intel Joule](http://intel.com/joule/getstarted) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/intel-iot/joule)
- [Jetson Nano](https://developer.nvidia.com/embedded/jetson-nano/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/jetson)
- [Joystick](http://en.wikipedia.org/wiki/Joystick) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/joystick)
- [Keyboard](https://en.wikipedia.org/wiki/Computer_keyboard) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/keyboard)
- [Leap Motion](https://www.leapmotion.com/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/leap)
- [MavLink](http://qgroundcontrol.org/mavlink/start) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/mavlink)
- [MegaPi](http://www.makeblock.com/megapi) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/megapi)
- [Microbit](http://microbit.org/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/microbit)
- [MQTT](http://mqtt.org/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/mqtt)
- [NATS](http://nats.io/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/nats)
- [Neurosky](http://neurosky.com/products-markets/eeg-biosensors/hardware/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/neurosky)
- [OpenCV](http://opencv.org/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/opencv)
- [OrangePi 5 Pro](http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-5-Pro.html) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/orangepi/orangepi5pro)
- [Particle](https://www.particle.io/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/particle)
- [Parrot ARDrone 2.0](http://ardrone2.parrot.com/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/parrot/ardrone)
- [Parrot Bebop](http://www.parrot.com/usa/products/bebop-drone/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/parrot/bebop)
- [Parrot Minidrone](https://www.parrot.com/us/minidrones) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/parrot/minidrone)
- [Pebble](https://www.getpebble.com/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/pebble)
- [PINE64 ROCK64](https://pine64.org/documentation/ROCK64/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/pine64/rock64)
- [Radxa Rock Pi 4](https://wiki.radxa.com/Rock4/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/radxa/rockpi)
- [Raspberry Pi](http://www.raspberrypi.org/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/raspi)
- [Serial Port](https://en.wikipedia.org/wiki/Serial_port) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/serialport)
- [Sphero](http://www.sphero.com/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/sphero/sphero)
- [Sphero BB-8](http://www.sphero.com/bb8) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/sphero/bb8)
- [Sphero Ollie](http://www.sphero.com/ollie) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/sphero/ollie)
- [Sphero SPRK+](http://www.sphero.com/sprk-plus) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/sphero/sprkplus)
- [UP2](http://www.up-board.org/upsquared/) <=> [Package](https://github.com/hybridgroup/gobot/blob/release/platforms/upboard/up2)
Support for many devices that use Analog Input/Output (AIO) have a shared set of drivers provided using
the `gobot/drivers/aio` package:
- [AIO](https://en.wikipedia.org/wiki/Analog-to-digital_converter) <=> [Drivers](https://github.com/hybridgroup/gobot/blob/release/drivers/aio)
- Analog Actuator
- Analog Sensor
- Grove Light Sensor
- Grove Piezo Vibration Sensor
- Grove Rotary Dial
- Grove Sound Sensor
- Grove Temperature Sensor
- Temperature Sensor (supports linear and NTC thermistor in normal and inverse mode)
- Thermal Zone Temperature Sensor
Support for many devices that use Bluetooth LE (BLE) have a shared set of drivers provided using
the `gobot/drivers/ble` package:
- [BLE](http://en.wikipedia.org/wiki/Bluetooth_low_energy) <=> [Drivers](https://github.com/hybridgroup/gobot/blob/release/drivers/ble)
- Battery Service
- Device Information Service
- Generic Access Service
- Microbit: AccelerometerDriver
- Microbit: ButtonDriver
- Microbit: IOPinDriver
- Microbit: LEDDriver
- Microbit: MagnetometerDriver
- Microbit: TemperatureDriver
- Sphero: BB8
- Sphero: Ollie
- Sphero: SPRK+
Support for many devices that use General Purpose Input/Output (GPIO) have a shared set of drivers provided using
the `gobot/drivers/gpio` package:
- [GPIO](https://en.wikipedia.org/wiki/General_Purpose_Input/Output) <=> [Drivers](https://github.com/hybridgroup/gobot/blob/release/drivers/gpio)
- AIP1640 LED Dot Matrix/7 Segment Controller
- Button
- Buzzer
- Direct Pin
- EasyDriver
- Grove Button (by using driver for Button)
- Grove Buzzer (by using driver for Buzzer)
- Grove LED (by using driver for LED)
- Grove Magnetic Switch (by using driver for Button)
- Grove Relay (by using driver for Relay)
- Grove Touch Sensor (by using driver for Button)
- HC-SR04 Ultrasonic Ranging Module
- HD44780 LCD controller
- LED
- Makey Button (by using driver for Button)
- MAX7219 LED Dot Matrix
- Motor
- Proximity Infra Red (PIR) Motion Sensor
- Relay
- RGB LED
- Servo
- Stepper Motor
- TM1638 LED Controller
Support for devices that use Inter-Integrated Circuit (I2C) have a shared set of drivers provided using
the `gobot/drivers/i2c` package:
- [I2C](https://en.wikipedia.org/wiki/I%C2%B2C) <=> [Drivers](https://github.com/hybridgroup/gobot/blob/release/drivers/i2c)
- Adafruit 1109 2x16 RGB-LCD with 5 keys
- Adafruit 2327 16-Channel PWM/Servo HAT Hat
- Adafruit 2348 DC and Stepper Motor Hat
- ADS1015 Analog to Digital Converter
- ADS1115 Analog to Digital Converter
- ADXL345 Digital Accelerometer
- BH1750 Digital Luminosity/Lux/Light Sensor
- BlinkM LED
- BME280 Barometric Pressure/Temperature/Altitude/Humidity Sensor
- BMP180 Barometric Pressure/Temperature/Altitude Sensor
- BMP280 Barometric Pressure/Temperature/Altitude Sensor
- BMP388 Barometric Pressure/Temperature/Altitude Sensor
- DRV2605L Haptic Controller
- Generic driver for read and write values to/from register address
- Grove Digital Accelerometer
- GrovePi Expansion Board
- Grove RGB LCD
- HMC6352 Compass
- HMC5883L 3-Axis Digital Compass
- INA3221 Voltage Monitor
- JHD1313M1 LCD Display w/RGB Backlight
- L3GD20H 3-Axis Gyroscope
- LIDAR-Lite
- MCP23017 Port Expander
- MMA7660 3-Axis Accelerometer
- MPL115A2 Barometric Pressure/Temperature
- MPU6050 Accelerometer/Gyroscope
- PCA9501 8-bit I/O port with interrupt, 2-kbit EEPROM
- PCA953x LED Dimmer for PCA9530 (2-bit), PCA9533 (4-bit), PCA9531 (8-bit), PCA9532 (16-bit)
- PCA9685 16-channel 12-bit PWM/Servo Driver
- PCF8583 clock and calendar or event counter, 240 x 8-bit RAM
- PCF8591 8-bit 4xA/D & 1xD/A converter
- SHT2x Temperature/Humidity
- SHT3x-D Temperature/Humidity
- SSD1306 OLED Display Controller
- TSL2561 Digital Luminosity/Lux/Light Sensor
- Wii Nunchuck Controller
- YL-40 Brightness/Temperature sensor, Potentiometer, analog input, analog output Driver
Support for many devices that use Serial communication (UART) have a shared set of drivers provided using
the `gobot/drivers/serial` package:
- [UART](https://en.wikipedia.org/wiki/Serial_port) <=> [Drivers](https://github.com/hybridgroup/gobot/blob/release/drivers/serial)
- Sphero: Sphero
- Neurosky: MindWave
- MegaPi: MotorDriver
Support for devices that use Serial Peripheral Interface (SPI) have
a shared set of drivers provided using the `gobot/drivers/spi` package:
- [SPI](https://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus) <=> [Drivers](https://github.com/hybridgroup/gobot/blob/release/drivers/spi)
- APA102 Programmable LEDs
- MCP3002 Analog/Digital Converter
- MCP3004 Analog/Digital Converter
- MCP3008 Analog/Digital Converter
- MCP3202 Analog/Digital Converter
- MCP3204 Analog/Digital Converter
- MCP3208 Analog/Digital Converter
- MCP3304 Analog/Digital Converter
- MFRC522 RFID Card Reader
- SSD1306 OLED Display Controller
Support for devices that use 1-wire bus with Linux Kernel support (w1-gpio) have
a shared set of drivers provided using the `gobot/drivers/onewire` package:
- [1-wire](https://en.wikipedia.org/wiki/1-Wire) <=> [Drivers](https://github.com/hybridgroup/gobot/blob/release/drivers/onewire)
- DS18B20 Temperature Sensor
## API
Gobot includes a RESTful API to query the status of any robot running within a group, including the connection and
device status, and execute device commands.
To activate the API, import the `gobot.io/x/gobot/v2/api` package and instantiate the `API` like this:
```go
manager := gobot.NewManager()
api.NewAPI(manager).Start()
```
You can also specify the api host and port, and turn on authentication:
```go
manager := gobot.NewManager()
server := api.NewAPI(manager)
server.Port = "4000"
server.AddHandler(api.BasicAuth("gort", "klatuu"))
server.Start()
```
You may access the [robeaux](https://github.com/hybridgroup/robeaux) React.js interface with Gobot by navigating to `http://localhost:3000/index.html`.
## CLI
Gobot uses the Gort [http://gort.io](http://gort.io) Command Line Interface (CLI) so you can access important features
right from the command line. We call it "RobotOps", aka "DevOps For Robotics". You can scan, connect, update device
firmware, and more!
## Documentation
We're always adding documentation to our web site at <https://gobot.io/> please check there as we continue to work on Gobot
Thank you!
## Need help?
- Issues: <https://github.com/hybridgroup/gobot/issues>
- Twitter: [@gobotio](https://twitter.com/gobotio)
- Slack: [https://gophers.slack.com/messages/C0N5HDB08](https://gophers.slack.com/messages/C0N5HDB08)
- Mailing list: <https://groups.google.com/forum/#!forum/gobotio>
## Contributing
For our contribution guidelines, please go to [https://github.com/hybridgroup/gobot/blob/release/CONTRIBUTING.md
](https://github.com/hybridgroup/gobot/blob/release/CONTRIBUTING.md
).
Gobot is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
[You can read about it here](https://github.com/hybridgroup/gobot/blob/release/CODE_OF_CONDUCT.md).
## License
Copyright (c) 2013-2020 The Hybrid Group. Licensed under the Apache 2.0 license.
The Contributor Covenant is released under the Creative Commons Attribution 4.0 International Public License, which
requires that attribution be included.
================================================
FILE: adaptor.go
================================================
package gobot
import (
"io"
"time"
)
// DigitalPinOptioner is the interface to provide the possibility to change pin behavior for the next usage
type DigitalPinOptioner interface {
// SetLabel change the pins label
SetLabel(label string) (changed bool)
// SetDirectionOutput sets the pins direction to output with the given initial value
SetDirectionOutput(initialState int) (changed bool)
// SetDirectionInput sets the pins direction to input
SetDirectionInput() (changed bool)
// SetActiveLow initializes the pin with inverse reaction (applies on input and output).
SetActiveLow() (changed bool)
// SetBias initializes the pin with the given bias (applies on input and output).
SetBias(bias int) (changed bool)
// SetDrive initializes the output pin with the given drive option.
SetDrive(drive int) (changed bool)
// SetDebounce initializes the input pin with the given debounce period.
SetDebounce(period time.Duration) (changed bool)
// SetEventHandlerForEdge initializes the input pin for edge detection to call the event handler on specified edge.
// lineOffset is within the GPIO chip (needs to transformed to the pin id), timestamp is the detection time,
// detectedEdge contains the direction of the pin changes, seqno is the sequence number for this event in the sequence
// of events for all the lines in this line request, lseqno is the same but for this line
SetEventHandlerForEdge(handler func(lineOffset int, timestamp time.Duration, detectedEdge string, seqno uint32,
lseqno uint32), edge int) (changed bool)
// SetPollForEdgeDetection use a discrete input polling method to detect edges. A poll interval of zero or smaller
// will deactivate this function. Please note: Using this feature is CPU consuming and less accurate than using cdev
// event handler (go-gpiocdev package) and should be done only if the former is not implemented or not working for
// the adaptor. E.g. sysfs driver in gobot has not implemented edge detection yet. The function is only useful
// together with SetEventHandlerForEdge() and its corresponding With*() functions.
SetPollForEdgeDetection(pollInterval time.Duration, pollQuitChan chan struct{}) (changed bool)
}
// DigitalPinOptionApplier is the interface to apply options to change pin behavior immediately
type DigitalPinOptionApplier interface {
// ApplyOptions apply all given options to the pin immediately
ApplyOptions(options ...func(DigitalPinOptioner) bool) error
}
// DigitalPinner is the interface for system gpio interactions
type DigitalPinner interface {
// Export exports the pin for use by the adaptor
Export() error
// Unexport releases the pin from the adaptor, so it is free for the operating system
Unexport() error
// Read reads the current value of the pin
Read() (int, error)
// Write writes to the pin
Write(val int) error
// DigitalPinOptionApplier is the interface to change pin behavior immediately
DigitalPinOptionApplier
}
// DigitalPinValuer is the interface to get pin behavior for the next usage. The interface is and should be rarely used.
type DigitalPinValuer interface {
// DirectionBehavior gets the direction behavior when the pin is used the next time.
// This means its possibly not in this direction type at the moment.
DirectionBehavior() string
}
// DigitalPinnerProvider is the interface that an Adaptor should implement to allow clients to obtain
// access to any DigitalPin's available on that board. If the pin is initially acquired, it is an input.
// Pin direction and other options can be changed afterwards by pin.ApplyOptions() at any time.
type DigitalPinnerProvider interface {
DigitalPin(id string) (DigitalPinner, error)
}
// PWMPinner is the interface for system PWM interactions
type PWMPinner interface {
// Export exports the PWM pin for use by the operating system
Export() error
// Unexport releases the PWM pin from the operating system
Unexport() error
// Enabled returns the enabled state of the PWM pin
Enabled() (bool, error)
// SetEnabled enables/disables the PWM pin
SetEnabled(val bool) error
// Polarity returns true if the polarity of the PWM pin is normal, otherwise false
Polarity() (bool, error)
// SetPolarity sets the polarity of the PWM pin to normal if called with true and to inverted if called with false
SetPolarity(normal bool) error
// Period returns the current PWM period in nanoseconds for pin
Period() (uint32, error)
// SetPeriod sets the current PWM period in nanoseconds for pin
SetPeriod(period uint32) error
// DutyCycle returns the duty cycle in nanoseconds for the PWM pin
DutyCycle() (uint32, error)
// SetDutyCycle writes the duty cycle in nanoseconds to the PWM pin
SetDutyCycle(dutyCyle uint32) error
}
// PWMPinnerProvider is the interface that an Adaptor should implement to allow
// clients to obtain access to any PWMPin's available on that board.
type PWMPinnerProvider interface {
PWMPin(id string) (PWMPinner, error)
}
// AnalogPinner is the interface for system analog io interactions
type AnalogPinner interface {
// Read reads the current value of the pin
Read() (int, error)
// Write writes to the pin
Write(val int) error
}
// I2cSystemDevicer is the interface to a i2c bus at system level, according to I2C/SMBus specification.
// Some functions are not in the interface yet:
// * Process Call (WriteWordDataReadWordData)
// * Block Write - Block Read (WriteBlockDataReadBlockData)
// * Host Notify - WriteWordData() can be used instead
//
// see: https://docs.kernel.org/i2c/smbus-protocol.html#key-to-symbols
//
// S: Start condition; Sr: Repeated start condition, used to switch from write to read mode.
// P: Stop condition; Rd/Wr (1 bit): Read/Write bit. Rd equals 1, Wr equals 0.
// A, NA (1 bit): Acknowledge (ACK) and Not Acknowledge (NACK) bit
// Addr (7 bits): I2C 7 bit address. (10 bit I2C address not yet supported by gobot).
// Comm (8 bits): Command byte, a data byte which often selects a register on the device.
// Data (8 bits): A plain data byte. DataLow and DataHigh represent the low and high byte of a 16 bit word.
// Count (8 bits): A data byte containing the length of a block operation.
// [..]: Data sent by I2C device, as opposed to data sent by the host adapter.
type I2cSystemDevicer interface {
// ReadByte must be implemented as the sequence:
// "S Addr Rd [A] [Data] NA P"
ReadByte(address int) (byte, error)
// ReadByteData must be implemented as the sequence:
// "S Addr Wr [A] Comm [A] Sr Addr Rd [A] [Data] NA P"
ReadByteData(address int, reg uint8) (uint8, error)
// ReadWordData must be implemented as the sequence:
// "S Addr Wr [A] Comm [A] Sr Addr Rd [A] [DataLow] A [DataHigh] NA P"
ReadWordData(address int, reg uint8) (uint16, error)
// ReadBlockData must be implemented as the sequence:
// "S Addr Wr [A] Comm [A] Sr Addr Rd [A] [Count] A [Data] A [Data] A ... A [Data] NA P"
ReadBlockData(address int, reg uint8, data []byte) error
// WriteByte must be implemented as the sequence:
// "S Addr Wr [A] Data [A] P"
WriteByte(address int, val byte) error
// WriteByteData must be implemented as the sequence:
// "S Addr Wr [A] Comm [A] Data [A] P"
WriteByteData(address int, reg uint8, val uint8) error
// WriteBlockData must be implemented as the sequence:
// "S Addr Wr [A] Comm [A] Count [A] Data [A] Data [A] ... [A] Data [A] P"
WriteBlockData(address int, reg uint8, data []byte) error
// WriteWordData must be implemented as the sequence:
// "S Addr Wr [A] Comm [A] DataLow [A] DataHigh [A] P"
WriteWordData(address int, reg uint8, val uint16) error
// WriteBytes writes the given data starting from the current register of bus device.
WriteBytes(address int, data []byte) error
// Read implements direct read operations.
Read(address int, b []byte) (int, error)
// Write implements direct write operations.
Write(address int, b []byte) (n int, err error)
// Close closes the character device file.
Close() error
}
// SpiSystemDevicer is the interface to a SPI bus at system level.
type SpiSystemDevicer interface {
TxRx(tx []byte, rx []byte) error
// Close the SPI connection.
Close() error
}
// OneWireSystemDevicer is the interface to a 1-wire device at system level.
//
//nolint:iface // ok for now
type OneWireSystemDevicer interface {
// ID returns the device id in the form "family code"-"serial number".
ID() string
// ReadData reads byte data from the device
ReadData(command string, data []byte) error
// WriteData writes byte data to the device
WriteData(command string, data []byte) error
// ReadInteger reads an integer value from the device
ReadInteger(command string) (int, error)
// WriteInteger writes an integer value to the device
WriteInteger(command string, val int) error
// Close the 1-wire connection.
Close() error
}
// BusOperations are functions provided by a bus device, e.g. SPI, i2c.
type BusOperations interface {
// ReadByteData reads a byte from the given register of bus device.
ReadByteData(reg uint8) (uint8, error)
// ReadBlockData fills the given buffer with reads starting from the given register of bus device.
ReadBlockData(reg uint8, data []byte) error
// WriteByteData writes the given byte value to the given register of bus device.
WriteByteData(reg uint8, val uint8) error
// WriteBlockData writes the given data starting from the given register of bus device.
WriteBlockData(reg uint8, data []byte) error
// WriteByte writes the given byte value to the current register of bus device.
WriteByte(val byte) error
// WriteBytes writes the given data starting from the current register of bus device.
WriteBytes(data []byte) error
}
// I2cOperations represents the i2c methods according to I2C/SMBus specification.
type I2cOperations interface {
io.ReadWriteCloser
BusOperations
// ReadByte reads a byte from the current register of an i2c device.
ReadByte() (byte, error)
// ReadWordData reads a 16 bit value starting from the given register of an i2c device.
ReadWordData(reg uint8) (uint16, error)
// WriteWordData writes the given 16 bit value starting from the given register of an i2c device.
WriteWordData(reg uint8, val uint16) error
}
// SpiOperations are the wrappers around the actual functions used by the SPI device interface
type SpiOperations interface {
BusOperations
// ReadCommandData uses the SPI device TX to send/receive data.
ReadCommandData(command []byte, data []byte) error
// Close the connection.
Close() error
}
// OneWireOperations are the wrappers around the actual functions used by the 1-wire device interface
//
//nolint:iface // ok for now
type OneWireOperations interface {
// ID returns the device id in the form "family code"-"serial number".
ID() string
// ReadData reads from the device
ReadData(command string, data []byte) error
// WriteData writes to the device
WriteData(command string, data []byte) error
// ReadInteger reads an integer value from the device
ReadInteger(command string) (int, error)
// WriteInteger writes an integer value to the device
WriteInteger(command string, val int) error
// Close the connection.
Close() error
}
// Adaptor is the interface that describes an adaptor in gobot
type Adaptor interface {
// Name returns the label for the Adaptor
Name() string
// SetName sets the label for the Adaptor
SetName(name string)
// Connect initiates the Adaptor
Connect() error
// Finalize terminates the Adaptor
Finalize() error
}
// BLEConnector is the interface that a BLE ClientAdaptor must implement
type BLEConnector interface {
Adaptor
Reconnect() error
Disconnect() error
Address() string
ReadCharacteristic(cUUID string) ([]byte, error)
WriteCharacteristic(cUUID string, data []byte) error
Subscribe(cUUID string, f func(data []byte)) error
WithoutResponses(use bool)
}
// Porter is the interface that describes an adaptor's port
type Porter interface {
Port() string
}
================================================
FILE: api/api.go
================================================
package api
import (
"encoding/json"
"fmt"
"log"
"net/http"
"net/http/httptest"
"strings"
"time"
"github.com/bmizerany/pat"
"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/api/robeaux"
)
// API represents an API server
type API struct {
manager *gobot.Manager
router *pat.PatternServeMux
Host string
Port string
Cert string
Key string
handlers []func(http.ResponseWriter, *http.Request)
start func(*API)
}
// NewAPI returns a new api instance
func NewAPI(m *gobot.Manager) *API {
return &API{
manager: m,
router: pat.New(),
Port: "3000",
start: func(a *API) {
log.Println("Initializing API on " + a.Host + ":" + a.Port + "...")
http.Handle("/", a)
server := &http.Server{
Addr: a.Host + ":" + a.Port,
ReadHeaderTimeout: 30 * time.Second,
}
go func() {
if a.Cert != "" && a.Key != "" {
if err := server.ListenAndServeTLS(a.Cert, a.Key); err != nil {
panic(err)
}
} else {
log.Println("WARNING: API using insecure connection. " +
"We recommend using an SSL certificate with Gobot.")
if err := server.ListenAndServe(); err != nil {
panic(err)
}
}
}()
},
}
}
// ServeHTTP calls api handlers and then serves request using api router
func (a *API) ServeHTTP(res http.ResponseWriter, req *http.Request) {
for _, handler := range a.handlers {
rec := httptest.NewRecorder()
handler(rec, req)
for k, v := range rec.Header() {
res.Header()[k] = v
}
if rec.Code == http.StatusUnauthorized {
http.Error(res, "Not Authorized", http.StatusUnauthorized)
return
}
}
a.router.ServeHTTP(res, req)
}
// Post wraps api router Post call
func (a *API) Post(path string, f func(http.ResponseWriter, *http.Request)) {
a.router.Post(path, http.HandlerFunc(f))
}
// Put wraps api router Put call
func (a *API) Put(path string, f func(http.ResponseWriter, *http.Request)) {
a.router.Put(path, http.HandlerFunc(f))
}
// Delete wraps api router Delete call
func (a *API) Delete(path string, f func(http.ResponseWriter, *http.Request)) {
a.router.Del(path, http.HandlerFunc(f))
}
// Options wraps api router Options call
func (a *API) Options(path string, f func(http.ResponseWriter, *http.Request)) {
a.router.Options(path, http.HandlerFunc(f))
}
// Get wraps api router Get call
func (a *API) Get(path string, f func(http.ResponseWriter, *http.Request)) {
a.router.Get(path, http.HandlerFunc(f))
}
// Head wraps api router Head call
func (a *API) Head(path string, f func(http.ResponseWriter, *http.Request)) {
a.router.Head(path, http.HandlerFunc(f))
}
// AddHandler appends handler to api handlers
func (a *API) AddHandler(f func(http.ResponseWriter, *http.Request)) {
a.handlers = append(a.handlers, f)
}
// Start initializes the api by setting up Robeaux web interface.
func (a *API) Start() {
a.AddRobeauxRoutes()
a.start(a)
}
// StartWithoutDefaults initializes the api without setting up the default routes.
// Good for custom web interfaces.
func (a *API) StartWithoutDefaults() {
a.start(a)
}
// AddC3PIORoutes adds all of the standard C3PIO routes to the API.
// For more information, please see:
// http://cppp.io/
func (a *API) AddC3PIORoutes() {
mcpCommandRoute := "/api/commands/:command"
robotDeviceCommandRoute := "/api/robots/:robot/devices/:device/commands/:command"
robotCommandRoute := "/api/robots/:robot/commands/:command"
a.Get("/api/commands", a.mcpCommands)
a.Get(mcpCommandRoute, a.executeMcpCommand)
a.Post(mcpCommandRoute, a.executeMcpCommand)
a.Get("/api/robots", a.robots)
a.Get("/api/robots/:robot", a.robot)
a.Get("/api/robots/:robot/commands", a.robotCommands)
a.Get(robotCommandRoute, a.executeRobotCommand)
a.Post(robotCommandRoute, a.executeRobotCommand)
a.Get("/api/robots/:robot/devices", a.robotDevices)
a.Get("/api/robots/:robot/devices/:device", a.robotDevice)
a.Get("/api/robots/:robot/devices/:device/events/:event", a.robotDeviceEvent)
a.Get("/api/robots/:robot/devices/:device/commands", a.robotDeviceCommands)
a.Get(robotDeviceCommandRoute, a.executeRobotDeviceCommand)
a.Post(robotDeviceCommandRoute, a.executeRobotDeviceCommand)
a.Get("/api/robots/:robot/connections", a.robotConnections)
a.Get("/api/robots/:robot/connections/:connection", a.robotConnection)
a.Get("/api/", a.mcp)
}
// AddRobeauxRoutes adds all of the robeaux web interface routes to the API.
// The Robeaux web interface requires the C3PIO API, so it is also
// activated when you call this method.
func (a *API) AddRobeauxRoutes() {
a.AddC3PIORoutes()
a.Get("/", func(res http.ResponseWriter, req *http.Request) {
http.Redirect(res, req, "/index.html", http.StatusMovedPermanently)
})
a.Get("/index.html", a.robeaux)
a.Get("/images/:a", a.robeaux)
a.Get("/js/:a", a.robeaux)
a.Get("/js/:a/", a.robeaux)
a.Get("/js/:a/:b", a.robeaux)
a.Get("/css/:a", a.robeaux)
a.Get("/css/:a/", a.robeaux)
a.Get("/css/:a/:b", a.robeaux)
a.Get("/partials/:a", a.robeaux)
}
// robeaux returns handler for robeaux routes.
// Writes asset in response and sets correct header
func (a *API) robeaux(res http.ResponseWriter, req *http.Request) {
path := req.URL.Path
buf, err := robeaux.Asset(path[1:])
if err != nil {
http.Error(res, err.Error(), http.StatusNotFound)
return
}
split := strings.Split(path, ".")
ext := split[len(split)-1]
switch ext {
case "js":
res.Header().Set("Content-Type", "text/javascript; charset=utf-8")
case "css":
res.Header().Set("Content-Type", "text/css; charset=utf-8")
case "html":
res.Header().Set("Content-Type", "text/html; charset=utf-8")
}
if _, err := res.Write(buf); err != nil {
panic(err)
}
}
// mcp returns MCP route handler.
// Writes JSON with gobot representation
func (a *API) mcp(res http.ResponseWriter, req *http.Request) {
a.writeJSON(map[string]interface{}{"MCP": gobot.NewJSONManager(a.manager)}, res)
}
// mcpCommands returns commands route handler.
// Writes JSON with global commands representation
func (a *API) mcpCommands(res http.ResponseWriter, req *http.Request) {
a.writeJSON(map[string]interface{}{"commands": gobot.NewJSONManager(a.manager).Commands}, res)
}
// robots returns route handler.
// Writes JSON with robots representation
func (a *API) robots(res http.ResponseWriter, req *http.Request) {
jsonRobots := []*gobot.JSONRobot{}
a.manager.Robots().Each(func(r *gobot.Robot) {
jsonRobots = append(jsonRobots, gobot.NewJSONRobot(r))
})
a.writeJSON(map[string]interface{}{"robots": jsonRobots}, res)
}
// robot returns route handler.
// Writes JSON with robot representation
func (a *API) robot(res http.ResponseWriter, req *http.Request) {
if robot, err := a.jsonRobotFor(req.URL.Query().Get(":robot")); err != nil {
a.writeJSON(map[string]interface{}{"error": err.Error()}, res)
} else {
a.writeJSON(map[string]interface{}{"robot": robot}, res)
}
}
// robotCommands returns commands route handler
// Writes JSON with robot commands representation
func (a *API) robotCommands(res http.ResponseWriter, req *http.Request) {
if robot, err := a.jsonRobotFor(req.URL.Query().Get(":robot")); err != nil {
a.writeJSON(map[string]interface{}{"error": err.Error()}, res)
} else {
a.writeJSON(map[string]interface{}{"commands": robot.Commands}, res)
}
}
// robotDevices returns devices route handler.
// Writes JSON with robot devices representation
func (a *API) robotDevices(res http.ResponseWriter, req *http.Request) {
if robot := a.manager.Robot(req.URL.Query().Get(":robot")); robot != nil {
jsonDevices := []*gobot.JSONDevice{}
robot.Devices().Each(func(d gobot.Device) {
jsonDevices = append(jsonDevices, gobot.NewJSONDevice(d))
})
a.writeJSON(map[string]interface{}{"devices": jsonDevices}, res)
} else {
a.writeJSON(map[string]interface{}{"error": "No Robot found with the name " + req.URL.Query().Get(":robot")}, res)
}
}
// robotDevice returns device route handler.
// Writes JSON with robot device representation
func (a *API) robotDevice(res http.ResponseWriter, req *http.Request) {
if device, err := a.jsonDeviceFor(req.URL.Query().Get(":robot"), req.URL.Query().Get(":device")); err != nil {
a.writeJSON(map[string]interface{}{"error": err.Error()}, res)
} else {
a.writeJSON(map[string]interface{}{"device": device}, res)
}
}
func (a *API) robotDeviceEvent(res http.ResponseWriter, req *http.Request) {
f, _ := res.(http.Flusher)
dataChan := make(chan string)
res.Header().Set("Content-Type", "text/event-stream")
res.Header().Set("Cache-Control", "no-cache")
res.Header().Set("Connection", "keep-alive")
device := a.manager.Robot(req.URL.Query().Get(":robot")).
Device(req.URL.Query().Get(":device"))
//nolint:forcetypeassert // no error return value, so there is no better way
if event := a.manager.Robot(req.URL.Query().Get(":robot")).
Device(req.URL.Query().Get(":device")).(gobot.Eventer).
Event(req.URL.Query().Get(":event")); len(event) > 0 {
//nolint:forcetypeassert // no error return value, so there is no better way
if err := device.(gobot.Eventer).On(event, func(data interface{}) {
d, _ := json.Marshal(data)
dataChan <- string(d)
}); err != nil {
panic(err)
}
for {
select {
case data := <-dataChan:
fmt.Fprintf(res, "data: %v\n\n", data)
f.Flush()
case <-req.Context().Done():
log.Println("Closing connection")
return
}
}
} else {
a.writeJSON(map[string]interface{}{
"error": "No Event found with the name " + req.URL.Query().Get(":event"),
}, res)
}
}
// robotDeviceCommands returns device commands route handler
// writes JSON with robot device commands representation
func (a *API) robotDeviceCommands(res http.ResponseWriter, req *http.Request) {
if device, err := a.jsonDeviceFor(req.URL.Query().Get(":robot"), req.URL.Query().Get(":device")); err != nil {
a.writeJSON(map[string]interface{}{"error": err.Error()}, res)
} else {
a.writeJSON(map[string]interface{}{"commands": device.Commands}, res)
}
}
// robotConnections returns connections route handler
// writes JSON with robot connections representation
func (a *API) robotConnections(res http.ResponseWriter, req *http.Request) {
jsonConnections := []*gobot.JSONConnection{}
if robot := a.manager.Robot(req.URL.Query().Get(":robot")); robot != nil {
robot.Connections().Each(func(c gobot.Connection) {
jsonConnections = append(jsonConnections, gobot.NewJSONConnection(c))
})
a.writeJSON(map[string]interface{}{"connections": jsonConnections}, res)
} else {
a.writeJSON(map[string]interface{}{"error": "No Robot found with the name " + req.URL.Query().Get(":robot")}, res)
}
}
// robotConnection returns connection route handler
// writes JSON with robot connection representation
func (a *API) robotConnection(res http.ResponseWriter, req *http.Request) {
if conn, err := a.jsonConnectionFor(req.URL.Query().Get(":robot"), req.URL.Query().Get(":connection")); err != nil {
a.writeJSON(map[string]interface{}{"error": err.Error()}, res)
} else {
a.writeJSON(map[string]interface{}{"connection": conn}, res)
}
}
// executeMcpCommand calls a global command associated to requested route
func (a *API) executeMcpCommand(res http.ResponseWriter, req *http.Request) {
a.executeCommand(a.manager.Command(req.URL.Query().Get(":command")),
res,
req,
)
}
// executeRobotDeviceCommand calls a device command associated to requested route
func (a *API) executeRobotDeviceCommand(res http.ResponseWriter, req *http.Request) {
if _, err := a.jsonDeviceFor(req.URL.Query().Get(":robot"),
req.URL.Query().Get(":device")); err != nil {
a.writeJSON(map[string]interface{}{"error": err.Error()}, res)
} else {
a.executeCommand(
//nolint:forcetypeassert // no error return value, so there is no better way
a.manager.Robot(req.URL.Query().Get(":robot")).
Device(req.URL.Query().Get(":device")).(gobot.Commander).
Command(req.URL.Query().Get(":command")),
res,
req,
)
}
}
// executeRobotCommand calls a robot command associated to requested route
func (a *API) executeRobotCommand(res http.ResponseWriter, req *http.Request) {
if _, err := a.jsonRobotFor(req.URL.Query().Get(":robot")); err != nil {
a.writeJSON(map[string]interface{}{"error": err.Error()}, res)
} else {
a.executeCommand(
a.manager.Robot(req.URL.Query().Get(":robot")).
Command(req.URL.Query().Get(":command")),
res,
req,
)
}
}
// executeCommand writes JSON response with `f` returned value.
func (a *API) executeCommand(f func(map[string]interface{}) interface{},
res http.ResponseWriter,
req *http.Request,
) {
body := make(map[string]interface{})
if err := json.NewDecoder(req.Body).Decode(&body); err != nil {
panic(err)
}
if f != nil {
a.writeJSON(map[string]interface{}{"result": f(body)}, res)
} else {
a.writeJSON(map[string]interface{}{"error": "Unknown Command"}, res)
}
}
// writeJSON writes `j` as JSON in response
func (a *API) writeJSON(j interface{}, res http.ResponseWriter) {
data, err := json.Marshal(j)
if err != nil {
panic(err)
}
res.Header().Set("Content-Type", "application/json; charset=utf-8")
if _, err := res.Write(data); err != nil {
panic(err)
}
}
// Debug add handler to api that prints each request
func (a *API) Debug() {
a.AddHandler(func(res http.ResponseWriter, req *http.Request) {
log.Println(req)
})
}
func (a *API) jsonRobotFor(name string) (*gobot.JSONRobot, error) {
if robot := a.manager.Robot(name); robot != nil {
return gobot.NewJSONRobot(robot), nil
}
return nil, fmt.Errorf("no Robot found with the name %s", name)
}
func (a *API) jsonDeviceFor(robot string, name string) (*gobot.JSONDevice, error) {
if device := a.manager.Robot(robot).Device(name); device != nil {
return gobot.NewJSONDevice(device), nil
}
return nil, fmt.Errorf("no Device found with the name %s", name)
}
func (a *API) jsonConnectionFor(robot string, name string) (*gobot.JSONConnection, error) {
if connection := a.manager.Robot(robot).Connection(name); connection != nil {
return gobot.NewJSONConnection(connection), nil
}
return nil, fmt.Errorf("no Connection found with the name %s", name)
}
================================================
FILE: api/api_test.go
================================================
//nolint:forcetypeassert,usestdlibvars,bodyclose,noctx // ok here
package api
import (
"bufio"
"bytes"
"encoding/json"
"fmt"
"log"
"net/http"
"net/http/httptest"
"testing"
"time"
"github.com/stretchr/testify/assert"
"gobot.io/x/gobot/v2"
)
func initTestAPI() *API {
log.SetOutput(NullReadWriteCloser{})
g := gobot.NewManager()
a := NewAPI(g)
a.start = func(m *API) {}
a.Start()
a.Debug()
g.AddRobot(newTestRobot("Robot1"))
g.AddRobot(newTestRobot("Robot2"))
g.AddRobot(newTestRobot("Robot3"))
g.AddCommand("TestFunction", func(params map[string]interface{}) interface{} {
message := params["message"].(string)
return fmt.Sprintf("hey %v", message)
})
return a
}
func TestStartWithoutDefaults(t *testing.T) {
log.SetOutput(NullReadWriteCloser{})
g := gobot.NewManager()
a := NewAPI(g)
a.start = func(m *API) {}
a.Get("/", func(res http.ResponseWriter, req *http.Request) {})
a.StartWithoutDefaults()
request, _ := http.NewRequest("GET", "/", nil)
response := httptest.NewRecorder()
a.ServeHTTP(response, request)
assert.Equal(t, 200, response.Code)
}
func TestRobeaux(t *testing.T) {
a := initTestAPI()
// html assets
request, _ := http.NewRequest("GET", "/index.html", nil)
response := httptest.NewRecorder()
a.ServeHTTP(response, request)
assert.Equal(t, 200, response.Code)
// js assets
request, _ = http.NewRequest("GET", "/js/script.js", nil)
response = httptest.NewRecorder()
a.ServeHTTP(response, request)
assert.Equal(t, 200, response.Code)
// css assets
request, _ = http.NewRequest("GET", "/css/application.css", nil)
response = httptest.NewRecorder()
a.ServeHTTP(response, request)
assert.Equal(t, 200, response.Code)
// unknown asset
request, _ = http.NewRequest("GET", "/js/fake/file.js", nil)
response = httptest.NewRecorder()
a.ServeHTTP(response, request)
assert.Equal(t, 404, response.Code)
}
func TestIndex(t *testing.T) {
a := initTestAPI()
request, _ := http.NewRequest("GET", "/", nil)
response := httptest.NewRecorder()
a.ServeHTTP(response, request)
assert.Equal(t, http.StatusMovedPermanently, response.Code)
assert.Equal(t, "/index.html", response.Header()["Location"][0])
}
func TestMcp(t *testing.T) {
a := initTestAPI()
request, _ := http.NewRequest("GET", "/api/", nil)
response := httptest.NewRecorder()
a.ServeHTTP(response, request)
var body map[string]interface{}
_ = json.NewDecoder(response.Body).Decode(&body)
assert.NotNil(t, body["MCP"].(map[string]interface{})["robots"])
assert.NotNil(t, body["MCP"].(map[string]interface{})["commands"])
}
func TestMcpCommands(t *testing.T) {
a := initTestAPI()
request, _ := http.NewRequest("GET", "/api/commands", nil)
response := httptest.NewRecorder()
a.ServeHTTP(response, request)
var body map[string]interface{}
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Equal(t, []interface{}{"TestFunction"}, body["commands"])
}
func TestExecuteMcpCommand(t *testing.T) {
var body interface{}
a := initTestAPI()
// known command
request, _ := http.NewRequest("GET",
"/api/commands/TestFunction",
bytes.NewBufferString(`{"message":"Beep Boop"}`),
)
request.Header.Add("Content-Type", "application/json")
response := httptest.NewRecorder()
a.ServeHTTP(response, request)
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Equal(t, "hey Beep Boop", body.(map[string]interface{})["result"])
// unknown command
request, _ = http.NewRequest("GET",
"/api/commands/TestFuntion1",
bytes.NewBufferString(`{"message":"Beep Boop"}`),
)
request.Header.Add("Content-Type", "application/json")
response = httptest.NewRecorder()
a.ServeHTTP(response, request)
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Equal(t, "Unknown Command", body.(map[string]interface{})["error"])
}
func TestRobots(t *testing.T) {
a := initTestAPI()
request, _ := http.NewRequest("GET", "/api/robots", nil)
response := httptest.NewRecorder()
a.ServeHTTP(response, request)
var body map[string]interface{}
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Len(t, body["robots"].([]interface{}), 3)
}
func TestRobot(t *testing.T) {
a := initTestAPI()
// known robot
request, _ := http.NewRequest("GET", "/api/robots/Robot1", nil)
response := httptest.NewRecorder()
a.ServeHTTP(response, request)
var body map[string]interface{}
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Equal(t, "Robot1", body["robot"].(map[string]interface{})["name"].(string))
// unknown robot
request, _ = http.NewRequest("GET", "/api/robots/UnknownRobot1", nil)
a.ServeHTTP(response, request)
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Equal(t, "no Robot found with the name UnknownRobot1", body["error"])
}
func TestRobotDevices(t *testing.T) {
a := initTestAPI()
// known robot
request, _ := http.NewRequest("GET", "/api/robots/Robot1/devices", nil)
response := httptest.NewRecorder()
a.ServeHTTP(response, request)
var body map[string]interface{}
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Len(t, body["devices"].([]interface{}), 3)
// unknown robot
request, _ = http.NewRequest("GET", "/api/robots/UnknownRobot1/devices", nil)
a.ServeHTTP(response, request)
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Equal(t, "No Robot found with the name UnknownRobot1", body["error"])
}
func TestRobotCommands(t *testing.T) {
a := initTestAPI()
// known robot
request, _ := http.NewRequest("GET", "/api/robots/Robot1/commands", nil)
response := httptest.NewRecorder()
a.ServeHTTP(response, request)
var body map[string]interface{}
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Equal(t, []interface{}{"robotTestFunction"}, body["commands"])
// unknown robot
request, _ = http.NewRequest("GET", "/api/robots/UnknownRobot1/commands", nil)
a.ServeHTTP(response, request)
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Equal(t, "no Robot found with the name UnknownRobot1", body["error"])
}
func TestExecuteRobotCommand(t *testing.T) {
var body interface{}
a := initTestAPI()
// known command
request, _ := http.NewRequest("GET",
"/api/robots/Robot1/commands/robotTestFunction",
bytes.NewBufferString(`{"message":"Beep Boop", "robot":"Robot1"}`),
)
request.Header.Add("Content-Type", "application/json")
response := httptest.NewRecorder()
a.ServeHTTP(response, request)
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Equal(t, "hey Robot1, Beep Boop", body.(map[string]interface{})["result"])
// unknown command
request, _ = http.NewRequest("GET",
"/api/robots/Robot1/commands/robotTestFuntion1",
bytes.NewBufferString(`{"message":"Beep Boop"}`),
)
request.Header.Add("Content-Type", "application/json")
response = httptest.NewRecorder()
a.ServeHTTP(response, request)
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Equal(t, "Unknown Command", body.(map[string]interface{})["error"])
// uknown robot
request, _ = http.NewRequest("GET",
"/api/robots/UnknownRobot1/commands/robotTestFuntion1",
bytes.NewBufferString(`{"message":"Beep Boop"}`),
)
request.Header.Add("Content-Type", "application/json")
a.ServeHTTP(response, request)
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Equal(t, "no Robot found with the name UnknownRobot1", body.(map[string]interface{})["error"])
}
func TestRobotDevice(t *testing.T) {
a := initTestAPI()
// known device
request, _ := http.NewRequest("GET",
"/api/robots/Robot1/devices/Device1",
nil,
)
response := httptest.NewRecorder()
a.ServeHTTP(response, request)
var body map[string]interface{}
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Equal(t, "Device1", body["device"].(map[string]interface{})["name"].(string))
// unknown device
request, _ = http.NewRequest("GET",
"/api/robots/Robot1/devices/UnknownDevice1", nil)
a.ServeHTTP(response, request)
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Equal(t, "no Device found with the name UnknownDevice1", body["error"])
}
func TestRobotDeviceCommands(t *testing.T) {
a := initTestAPI()
// known device
request, _ := http.NewRequest("GET",
"/api/robots/Robot1/devices/Device1/commands",
nil,
)
response := httptest.NewRecorder()
a.ServeHTTP(response, request)
var body map[string]interface{}
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Len(t, body["commands"].([]interface{}), 2)
// unknown device
request, _ = http.NewRequest("GET",
"/api/robots/Robot1/devices/UnknownDevice1/commands",
nil,
)
a.ServeHTTP(response, request)
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Equal(t, "no Device found with the name UnknownDevice1", body["error"])
}
func TestExecuteRobotDeviceCommand(t *testing.T) {
var body interface{}
a := initTestAPI()
// known command
request, _ := http.NewRequest("GET",
"/api/robots/Robot1/devices/Device1/commands/TestDriverCommand",
bytes.NewBufferString(`{"name":"human"}`),
)
request.Header.Add("Content-Type", "application/json")
response := httptest.NewRecorder()
a.ServeHTTP(response, request)
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Equal(t, "hello human", body.(map[string]interface{})["result"].(string))
// unknown command
request, _ = http.NewRequest("GET",
"/api/robots/Robot1/devices/Device1/commands/DriverCommand1",
bytes.NewBufferString(`{"name":"human"}`),
)
request.Header.Add("Content-Type", "application/json")
response = httptest.NewRecorder()
a.ServeHTTP(response, request)
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Equal(t, "Unknown Command", body.(map[string]interface{})["error"])
// unknown device
request, _ = http.NewRequest("GET",
"/api/robots/Robot1/devices/UnknownDevice1/commands/DriverCommand1",
bytes.NewBufferString(`{"name":"human"}`),
)
request.Header.Add("Content-Type", "application/json")
a.ServeHTTP(response, request)
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Equal(t, "no Device found with the name UnknownDevice1", body.(map[string]interface{})["error"])
}
func TestRobotConnections(t *testing.T) {
a := initTestAPI()
// known robot
request, _ := http.NewRequest("GET", "/api/robots/Robot1/connections", nil)
response := httptest.NewRecorder()
a.ServeHTTP(response, request)
var body map[string]interface{}
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Len(t, body["connections"].([]interface{}), 3)
// unknown robot
request, _ = http.NewRequest("GET", "/api/robots/UnknownRobot1/connections", nil)
a.ServeHTTP(response, request)
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Equal(t, "No Robot found with the name UnknownRobot1", body["error"])
}
func TestRobotConnection(t *testing.T) {
a := initTestAPI()
// known connection
request, _ := http.NewRequest("GET",
"/api/robots/Robot1/connections/Connection1",
nil,
)
response := httptest.NewRecorder()
a.ServeHTTP(response, request)
var body map[string]interface{}
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Equal(t, "Connection1", body["connection"].(map[string]interface{})["name"].(string))
// unknown connection
request, _ = http.NewRequest("GET",
"/api/robots/Robot1/connections/UnknownConnection1",
nil,
)
a.ServeHTTP(response, request)
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Equal(t, "no Connection found with the name UnknownConnection1", body["error"])
}
func TestRobotDeviceEvent(t *testing.T) {
a := initTestAPI()
server := httptest.NewServer(a)
defer server.Close()
eventsURL := "/api/robots/Robot1/devices/Device1/events/"
// known event
respc := make(chan *http.Response, 1)
go func() {
resp, _ := http.Get(server.URL + eventsURL + "TestEvent")
respc <- resp
}()
event := a.manager.Robot("Robot1").
Device("Device1").(gobot.Eventer).
Event("TestEvent")
go func() {
time.Sleep(time.Millisecond * 10) // wait some time, so select below is ready
a.manager.Robot("Robot1").
Device("Device1").(gobot.Eventer).Publish(event, "event-data")
}()
select {
case resp := <-respc:
reader := bufio.NewReader(resp.Body)
data, _ := reader.ReadString('\n')
assert.Equal(t, "data: \"event-data\"\n", data)
case <-time.After(50 * time.Millisecond):
t.Error("Not receiving data")
}
server.CloseClientConnections()
// unknown event
response, _ := http.Get(server.URL + eventsURL + "UnknownEvent")
var body map[string]interface{}
_ = json.NewDecoder(response.Body).Decode(&body)
assert.Equal(t, "No Event found with the name UnknownEvent", body["error"])
}
func TestAPIRouter(t *testing.T) {
a := initTestAPI()
a.Head("/test", func(res http.ResponseWriter, req *http.Request) {})
request, _ := http.NewRequest("HEAD", "/test", nil)
response := httptest.NewRecorder()
a.ServeHTTP(response, request)
assert.Equal(t, 200, response.Code)
a.Get("/test", func(res http.ResponseWriter, req *http.Request) {})
request, _ = http.NewRequest("GET", "/test", nil)
response = httptest.NewRecorder()
a.ServeHTTP(response, request)
assert.Equal(t, 200, response.Code)
a.Post("/test", func(res http.ResponseWriter, req *http.Request) {})
request, _ = http.NewRequest("POST", "/test", nil)
response = httptest.NewRecorder()
a.ServeHTTP(response, request)
assert.Equal(t, 200, response.Code)
a.Put("/test", func(res http.ResponseWriter, req *http.Request) {})
request, _ = http.NewRequest("PUT", "/test", nil)
response = httptest.NewRecorder()
a.ServeHTTP(response, request)
assert.Equal(t, 200, response.Code)
a.Delete("/test", func(res http.ResponseWriter, req *http.Request) {})
request, _ = http.NewRequest("DELETE", "/test", nil)
response = httptest.NewRecorder()
a.ServeHTTP(response, request)
assert.Equal(t, 200, response.Code)
a.Options("/test", func(res http.ResponseWriter, req *http.Request) {})
request, _ = http.NewRequest("OPTIONS", "/test", nil)
response = httptest.NewRecorder()
a.ServeHTTP(response, request)
assert.Equal(t, 200, response.Code)
}
================================================
FILE: api/basic_auth.go
================================================
package api
import (
"crypto/subtle"
"encoding/base64"
"net/http"
)
// BasicAuth returns basic auth handler.
func BasicAuth(username, password string) http.HandlerFunc {
// Inspired by https://github.com/codegangsta/martini-contrib/tree/v0.1/auth
return func(res http.ResponseWriter, req *http.Request) {
if !secureCompare(req.Header.Get("Authorization"),
"Basic "+base64.StdEncoding.EncodeToString([]byte(username+":"+password)),
) {
res.Header().Set("WWW-Authenticate",
"Basic realm=\"Authorization Required\"",
)
http.Error(res, "Not Authorized", http.StatusUnauthorized)
}
}
}
func secureCompare(given string, actual string) bool {
//nolint:gosec // TODO: fix later
if subtle.ConstantTimeEq(int32(len(given)), int32(len(actual))) == 1 {
return subtle.ConstantTimeCompare([]byte(given), []byte(actual)) == 1
}
// Securely compare actual to itself to keep constant time,
// but always return false
return subtle.ConstantTimeCompare([]byte(actual), []byte(actual)) == 1 && false
}
================================================
FILE: api/basic_auth_test.go
================================================
//nolint:usestdlibvars,noctx // ok here
package api
import (
"net/http"
"net/http/httptest"
"testing"
"github.com/stretchr/testify/assert"
)
func TestBasicAuth(t *testing.T) {
a := initTestAPI()
a.AddHandler(BasicAuth("admin", "password"))
request, _ := http.NewRequest("GET", "/api/", nil)
request.SetBasicAuth("admin", "password")
response := httptest.NewRecorder()
a.ServeHTTP(response, request)
assert.Equal(t, 200, response.Code)
request, _ = http.NewRequest("GET", "/api/", nil)
request.SetBasicAuth("admin", "wrongPassword")
response = httptest.NewRecorder()
a.ServeHTTP(response, request)
assert.Equal(t, 401, response.Code)
}
================================================
FILE: api/cors.go
================================================
package api
import (
"net/http"
"regexp"
"strings"
)
// CORS represents CORS configuration
type CORS struct {
AllowOrigins []string
AllowHeaders []string
AllowMethods []string
ContentType string
allowOriginPatterns []string
}
// AllowRequestsFrom returns handler to verify that requests come from allowedOrigins
func AllowRequestsFrom(allowedOrigins ...string) http.HandlerFunc {
c := &CORS{
AllowOrigins: allowedOrigins,
AllowMethods: []string{"GET", "POST"},
AllowHeaders: []string{"Origin", "Content-Type"},
ContentType: "application/json; charset=utf-8",
}
c.generatePatterns()
return func(w http.ResponseWriter, req *http.Request) {
origin := req.Header.Get("Origin")
if c.isOriginAllowed(origin) {
w.Header().Set("Access-Control-Allow-Origin", origin)
w.Header().Set("Access-Control-Allow-Headers", c.AllowedHeaders())
w.Header().Set("Access-Control-Allow-Methods", c.AllowedMethods())
w.Header().Set("Content-Type", c.ContentType)
}
}
}
// isOriginAllowed returns true if origin matches an allowed origin pattern.
func (c *CORS) isOriginAllowed(origin string) bool {
for _, allowedOriginPattern := range c.allowOriginPatterns {
if allowed, _ := regexp.MatchString(allowedOriginPattern, origin); allowed {
return true
}
}
return false
}
// generatePatterns generates regex expression for AllowOrigins
func (c *CORS) generatePatterns() {
if c.AllowOrigins != nil {
for _, origin := range c.AllowOrigins {
pattern := regexp.QuoteMeta(origin)
pattern = strings.ReplaceAll(pattern, "\\*", ".*")
pattern = strings.ReplaceAll(pattern, "\\?", ".")
c.allowOriginPatterns = append(c.allowOriginPatterns, "^"+pattern+"$")
}
}
}
// AllowedHeaders returns allowed headers in a string
func (c *CORS) AllowedHeaders() string {
return strings.Join(c.AllowHeaders, ",")
}
// AllowedMethods returns allowed http methods in a string
func (c *CORS) AllowedMethods() string {
return strings.Join(c.AllowMethods, ",")
}
================================================
FILE: api/cors_test.go
================================================
//nolint:usestdlibvars,noctx // ok here
package api
import (
"net/http"
"net/http/httptest"
"testing"
"github.com/stretchr/testify/assert"
)
func TestCORSIsOriginAllowed(t *testing.T) {
cors := &CORS{AllowOrigins: []string{"*"}}
cors.generatePatterns()
// When all the origins are accepted
assert.True(t, cors.isOriginAllowed("http://localhost:8000"))
assert.True(t, cors.isOriginAllowed("http://localhost:3001"))
assert.True(t, cors.isOriginAllowed("http://server.com"))
// When one origin is accepted
cors = &CORS{AllowOrigins: []string{"http://localhost:8000"}}
cors.generatePatterns()
assert.True(t, cors.isOriginAllowed("http://localhost:8000"))
assert.False(t, cors.isOriginAllowed("http://localhost:3001"))
assert.False(t, cors.isOriginAllowed("http://server.com"))
// When several origins are accepted
cors = &CORS{AllowOrigins: []string{"http://localhost:*", "http://server.com"}}
cors.generatePatterns()
assert.True(t, cors.isOriginAllowed("http://localhost:8000"))
assert.True(t, cors.isOriginAllowed("http://localhost:3001"))
assert.True(t, cors.isOriginAllowed("http://server.com"))
// When several origins are accepted within the same domain
cors = &CORS{AllowOrigins: []string{"http://*.server.com"}}
cors.generatePatterns()
assert.False(t, cors.isOriginAllowed("http://localhost:8000"))
assert.False(t, cors.isOriginAllowed("http://localhost:3001"))
assert.True(t, cors.isOriginAllowed("http://foo.server.com"))
assert.True(t, cors.isOriginAllowed("http://api.server.com"))
}
func TestCORSAllowedHeaders(t *testing.T) {
cors := &CORS{AllowOrigins: []string{"*"}, AllowHeaders: []string{"Header1", "Header2"}}
assert.Equal(t, "Header1,Header2", cors.AllowedHeaders())
}
func TestCORSAllowedMethods(t *testing.T) {
cors := &CORS{AllowOrigins: []string{"*"}, AllowMethods: []string{"GET", "POST"}}
assert.Equal(t, "GET,POST", cors.AllowedMethods())
cors.AllowMethods = []string{"GET", "POST", "PUT"}
assert.Equal(t, "GET,POST,PUT", cors.AllowedMethods())
}
func TestCORS(t *testing.T) {
api := initTestAPI()
// Accepted origin
allowedOrigin := []string{"http://server.com"}
api.AddHandler(AllowRequestsFrom(allowedOrigin[0]))
request, _ := http.NewRequest("GET", "/api/", nil)
request.Header.Set("Origin", allowedOrigin[0])
response := httptest.NewRecorder()
api.ServeHTTP(response, request)
assert.Equal(t, allowedOrigin, response.Header()["Access-Control-Allow-Origin"])
// Not accepted Origin
disallowedOrigin := []string{"http://disallowed.com"}
request, _ = http.NewRequest("GET", "/api/", nil)
request.Header.Set("Origin", disallowedOrigin[0])
response = httptest.NewRecorder()
api.ServeHTTP(response, request)
assert.NotEqual(t, disallowedOrigin, response.Header()["Access-Control-Allow-Origin"])
assert.NotEqual(t, allowedOrigin, response.Header()["Access-Control-Allow-Origin"])
}
================================================
FILE: api/doc.go
================================================
/*
Package api provides a webserver to interact with your Gobot program over the network.
Example:
package main
import (
"fmt"
"gobot.io/x/gobot/v2"
"gobot.io/x/gobot/v2/api"
)
func main() {
gbot := gobot.NewManager()
// Starts the API server on default port 3000
api.NewAPI(gbot).Start()
// Accessible via http://localhost:3000/api/commands/say_hello
gbot.AddCommand("say_hello", func(params map[string]interface{}) interface{} {
return "Manager says hello!"
})
hello := gbot.AddRobot(gobot.NewRobot("Eve"))
// Accessible via http://localhost:3000/api/robots/Eve/commands/say_hello
hello.AddCommand("say_hello", func(params map[string]interface{}) interface{} {
return fmt.Sprintf("%v says hello!", hello.Name)
})
gbot.Start()
}
It follows Common Protocol for Programming Physical Input and Output (CPPP-IO) spec:
https://gobot.io/x/cppp-io
*/
package api
================================================
FILE: api/helpers_test.go
================================================
//nolint:forcetypeassert // ok here
package api
import (
"fmt"
"gobot.io/x/gobot/v2"
)
type NullReadWriteCloser struct{}
func (NullReadWriteCloser) Write(p []byte) (int, error) {
return len(p), nil
}
func (NullReadWriteCloser) Read(b []byte) (int, error) {
return len(b), nil
}
func (NullReadWriteCloser) Close() error {
return nil
}
type testDriver struct {
gobot.Commander
gobot.Eventer
name string
pin string
connection gobot.Connection
}
func (t *testDriver) Start() error { return nil }
func (t *testDriver) Halt() error { return nil }
func (t *testDriver) Name() string { return t.name }
func (t *testDriver) SetName(n string) { t.name = n }
func (t *testDriver) Pin() string { return t.pin }
func (t *testDriver) Connection() gobot.Connection { return t.connection }
func newTestDriver(adaptor *testAdaptor, name string, pin string) *testDriver {
t := &testDriver{
name: name,
connection: adaptor,
pin: pin,
Eventer: gobot.NewEventer(),
Commander: gobot.NewCommander(),
}
t.AddEvent("TestEvent")
t.AddCommand("TestDriverCommand", func(params map[string]interface{}) interface{} {
name := params["name"].(string)
return fmt.Sprintf("hello %v", name)
})
t.AddCommand("DriverCommand", func(params map[string]interface{}) interface{} {
name := params["name"].(string)
return fmt.Sprintf("hello %v", name)
})
return t
}
type testAdaptor struct {
name string
port string
}
var (
testAdaptorConnect = func() error { return nil }
testAdaptorFinalize = func() error { return nil }
)
func (t *testAdaptor) Finalize() error { return testAdaptorFinalize() }
func (t *testAdaptor) Connect() error { return testAdaptorConnect() }
func (t *testAdaptor) Name() string { return t.name }
func (t *testAdaptor) SetName(n string) { t.name = n }
func (t *testAdaptor) Port() string { return t.port }
func newTestAdaptor(name string, port string) *testAdaptor {
return &testAdaptor{
name: name,
port: port,
}
}
func newTestRobot(name string) *gobot.Robot {
adaptor1 := newTestAdaptor("Connection1", "/dev/null")
adaptor2 := newTestAdaptor("Connection2", "/dev/null")
adaptor3 := newTestAdaptor("", "/dev/null")
driver1 := newTestDriver(adaptor1, "Device1", "0")
driver2 := newTestDriver(adaptor2, "Device2", "2")
driver3 := newTestDriver(adaptor3, "", "1")
work := func() {}
r := gobot.NewRobot(name,
[]gobot.Connection{adaptor1, adaptor2, adaptor3},
[]gobot.Device{driver1, driver2, driver3},
work,
)
r.AddCommand("robotTestFunction", func(params map[string]interface{}) interface{} {
message := params["message"].(string)
robot := params["robot"].(string)
return fmt.Sprintf("hey %v, %v", robot, message)
})
return r
}
================================================
FILE: api/robeaux/robeaux.go
================================================
// Code generated by go-bindata.
// sources:
// css/.keep
// css/application.css
// css/application.css.map
// css/fonts.css
// fonts/inconsolata-bold-webfont.eot
// fonts/inconsolata-bold-webfont.svg
// fonts/inconsolata-bold-webfont.ttf
// fonts/inconsolata-bold-webfont.woff
// fonts/inconsolata-regular-webfont.eot
// fonts/inconsolata-regular-webfont.svg
// fonts/inconsolata-regular-webfont.ttf
// fonts/inconsolata-regular-webfont.woff
// fonts/roboto-bold-webfont.eot
// fonts/roboto-bold-webfont.svg
// fonts/roboto-bold-webfont.ttf
// fonts/roboto-bold-webfont.woff
// fonts/roboto-regular-webfont.eot
// fonts/roboto-regular-webfont.svg
// fonts/roboto-regular-webfont.ttf
// fonts/roboto-regular-webfont.woff
// fonts/robotoslab-bold-webfont.eot
// fonts/robotoslab-bold-webfont.svg
// fonts/robotoslab-bold-webfont.ttf
// fonts/robotoslab-bold-webfont.woff
// images/bullet-connections-2.png
// images/bullet-connections.png
// images/bullet-devices-2.png
// images/bullet-devices.png
// images/delete.png
// images/devices-image-2.png
// images/devices-image.png
// images/logo-robeaux.png
// images/robots-icon_03.png
// index.html
// js/.keep
// js/script.js
// DO NOT EDIT!
package robeaux
import (
"bytes"
"compress/gzip"
"fmt"
"io"
"os"
"path/filepath"
"strings"
"time"
)
func bindataRead(data []byte, name string) ([]byte, error) {
gz, err := gzip.NewReader(bytes.NewBuffer(data))
if err != nil {
return nil, fmt.Errorf("read %q: %v", name, err)
}
var buf bytes.Buffer
_, err = io.Copy(&buf, gz)
clErr := gz.Close()
if err != nil {
return nil, fmt.Errorf("read %q: %v", name, err)
}
if clErr != nil {
return nil, err
}
return buf.Bytes(), nil
}
type asset struct {
bytes []byte
info os.FileInfo
}
type bindataFileInfo struct {
name string
size int64
mode os.FileMode
modTime time.Time
}
func (fi bindataFileInfo) Name() string {
return fi.name
}
func (fi bindataFileInfo) Size() int64 {
return fi.size
}
func (fi bindataFileInfo) Mode() os.FileMode {
return fi.mode
}
func (fi bindataFileInfo) ModTime() time.Time {
return fi.modTime
}
func (fi bindataFileInfo) IsDir() bool {
return false
}
func (fi bindataFileInfo) Sys() interface{} {
return nil
}
var _cssKeep = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x01\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00")
func cssKeepBytes() ([]byte, error) {
return bindataRead(
_cssKeep,
"css/.keep",
)
}
func cssKeep() (*asset, error) {
bytes, err := cssKeepBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "css/.keep", size: 0, mode: os.FileMode(436), modTime: time.Unix(1492020681, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _cssApplicationCss = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x1c\x59\x8f\xe3\xb6\xf9\x3d\xbf\x42\xf5\x60\xb0\x3b\x0b\x49\x2b\xdf\xb3\x32\xd2\x26\xd9\x6c\xd0\x00\x49\x1f\xd2\xf6\x69\x31\x28\x28\x89\xb6\xd9\x91\x48\x81\xa4\x3c\x9e\x75\xfc\xdf\x0b\xea\x32\x45\x51\x12\xe5\x99\x04\x4d\xd1\x0c\x82\xb5\xc9\xef\xbe\xf4\xf1\x90\xdf\xbf\xfb\x93\x85\x09\x4d\x40\x8c\xbe\x40\x37\x64\xcc\x3a\xcc\x5d\xcf\x9d\x59\xbf\x5a\x3f\xff\xf8\x0f\xeb\x27\x14\x42\xcc\xa0\xf5\xab\xb5\x43\xdc\x45\xe4\x7d\x0d\x6b\xbd\x7b\xbf\xe7\x49\x7c\xda\x12\xcc\x9d\x2d\x48\x50\xfc\xec\x33\x80\x99\xc3\x20\x45\xdb\x8d\x93\x30\x87\xc3\x23\x77\x18\xfa\x02\x1d\x10\xfd\x3b\x63\xdc\x9f\x7a\xde\xed\xc6\x79\x82\xc1\x23\xe2\xfa\xd9\x73\x40\xa2\xe7\x53\x02\xe8\x0e\x61\xdf\x3b\x03\xca\x51\x18\x43\x1b\x30\x14\x41\x3b\x82\x1c\xa0\x98\xd9\x5b\xb4\x0b\x41\xca\x11\xc1\xe2\x63\x46\xa1\xbd\x25\x84\x43\x6a\xef\x21\x88\xc4\x3f\x3b\x4a\xb2\xd4\x4e\x00\xc2\x76\x02\x71\x66\x63\x70\xb0\x19\x0c\x73\x0c\x96\x25\x09\xa0\xcf\xa7\x08\xb1\x34\x06\xcf\x7e\x10\x93\xf0\xf1\x0c\xb2\x08\x11\x3b\x04\xf8\x00\x98\x9d\x52\xb2\xa3\x90\x31\xfb\x80\x22\x48\x6a\x48\x84\x63\x84\xa1\x93\x23\x6c\x0e\x50\x88\x06\x62\x07\xc4\x68\x87\xfd\x00\x30\x28\x66\x0b\x42\x3e\x26\xfc\xed\xe7\x90\x60\x4e\x49\xcc\x1e\xee\x6a\x12\x98\x60\xb8\xd9\x43\xb4\xdb\x73\xdf\x3b\x7f\xde\xa3\x28\x82\xf8\xc1\xe6\x30\x49\x63\xc0\x61\x03\xee\x0c\x4e\x01\x08\x1f\x85\x2e\x38\x72\x42\x12\x13\xea\x73\x0a\x30\x4b\x01\x85\x98\x9f\x81\x0f\x42\x8e\x0e\xd0\x06\xfe\x9e\x1c\x20\x3d\x91\x8c\x0b\x11\x84\xd9\x82\x80\x7e\xe6\x88\xc7\xf0\xe1\x14\x10\x1a\x41\xea\x04\x84\x73\x92\xf8\xd3\xf4\x68\x45\x84\x73\x18\x9d\x03\x9b\x71\x4a\xf0\xae\xf0\xe0\x53\x21\x54\x40\xe2\xe8\x1c\x6d\x71\x31\xc8\xf8\x73\x0c\x7d\xc4\x41\x8c\xc2\xf3\x7e\x5a\x0e\xa2\x2f\xd0\x9f\xc1\x64\x53\x79\xc9\x5d\xad\x61\x62\x79\xe7\x04\xd0\x47\x49\x64\xff\x66\xbb\xf5\x36\x85\xdc\x37\x9e\xe7\x9d\x59\x02\xe2\x58\xa2\x71\xef\xdd\x9e\x59\x16\xd8\x2c\x4b\xa5\xd1\xf5\xf2\x76\x93\xdb\xb9\x32\xd3\x26\x25\x0c\x09\xd7\xf9\x14\xc6\x40\x68\xdc\x69\x7c\x41\x89\x93\xd4\x77\x3c\x77\x09\x13\x41\xfc\x54\xea\xed\x78\xee\x4c\x0c\xa1\x64\x57\x5a\xc4\xf7\xce\xec\xb0\xcb\x3d\xe5\x53\x42\xf8\xdd\x49\x18\x71\x1b\x93\x27\xbf\x70\xcb\xb9\x88\xad\x2a\x18\xa7\x30\xb1\x16\x5e\x7a\x3c\xef\xe9\xc9\x49\xc8\x17\x27\x20\x47\x21\x31\xc2\x3b\x5f\x78\x1a\x62\x2e\x86\x36\x1d\xc3\xb5\xd3\x53\x0a\x2f\x9c\x40\xc6\xc9\x39\x24\x11\xb4\x1f\x83\xc8\x4e\x29\xb4\x19\x48\xd2\x46\x4e\x25\x04\x13\x96\x82\x10\xda\x56\xfd\x71\x73\x31\xd7\x14\x26\xe7\x20\xe3\x9c\x60\x1b\xe1\x34\xe3\x36\x49\x79\x11\xfe\x0c\xc6\x30\xe4\xb6\x48\x33\x40\x21\x38\x15\x9e\x40\x78\x0f\x29\xe2\x39\x85\xfa\x4b\x9d\x6f\x05\xa5\x8b\x7c\x07\xc4\x50\x10\xc3\x8a\x43\x41\xf2\x94\x67\x6e\x1e\x8a\x5b\x42\x93\x22\x58\x4b\x08\x51\x12\xac\x5c\x90\xcf\xfc\x39\x85\x5f\x4f\x8a\xf1\xc9\x83\x2d\x0f\x52\xc8\x20\x57\xc6\x58\x16\x24\x88\x4f\x1e\x4e\x55\x7d\x00\x69\x0a\x01\x05\x38\x84\x7e\x41\x64\x13\x66\x94\x11\xea\xa7\x04\x61\x0e\x69\xc9\xf2\x73\x84\x18\x08\x62\x18\x3d\xc8\xcc\xeb\xc1\x53\x89\x14\xc1\x2d\xc8\x62\x5e\x22\xf9\x7e\xee\xc2\x2d\x09\x33\xe6\x20\x8c\x21\x2d\x64\x69\x8f\xd7\xd1\xb2\x49\x41\x14\x09\xaf\x7a\xe7\x1c\xf4\x24\x07\x69\x51\x15\xcf\xb2\x3e\xe1\x1e\x86\x8f\x01\x39\xaa\xaa\x83\x08\x91\x89\x48\xcb\x3a\x4c\xea\x0c\x3d\xaa\x3c\x4a\x1c\x9c\x25\x01\xa4\x93\x07\xdf\xaf\x6c\x93\x8b\xe6\xb0\x14\x61\x47\x76\x7e\x27\x3c\xc9\x78\x13\xfe\x54\x0a\x9e\x07\x60\xc3\x0d\x10\xd0\x70\xaf\x77\x83\xf0\xfb\x16\xc1\x38\xda\xf4\x25\x40\x85\x38\x2a\x3f\xb4\x32\x5c\xe4\x2f\x46\x9c\x50\x88\x11\xeb\x54\xee\x44\x89\x60\x48\x28\x10\xe5\x43\xa7\x51\x1e\xba\xb9\x4a\x0c\xf2\xca\xd5\xa2\x46\x32\x12\xa3\xc8\xba\x09\x3d\xf1\x57\xe7\x87\x35\x4b\x25\x1f\xb9\xf3\xa5\xa8\x7b\xee\x6a\x56\xfc\xbb\x16\x05\x26\x86\x3b\x88\x23\x5d\xd4\xd4\x89\xd8\xcc\xfe\x2a\x5f\xdb\x65\x98\x8b\x08\xae\xea\x77\x48\xe2\x18\xa4\x0c\xfa\xd5\x87\x4d\x39\x21\x0a\x42\xc9\x20\xb2\xf9\xfe\x74\x61\xf8\x4d\x59\x46\x42\xd8\x28\x28\x6f\x7e\xc4\x21\xc1\x8c\xc4\x80\x83\x37\x1b\x46\x43\x3f\xa3\xf1\xdb\xc9\x7b\x01\xc3\xde\xa3\xcb\xa4\x23\xa4\x10\x46\x13\x33\x2e\x24\x7c\x72\x37\x0a\xfc\x2f\x37\x08\x6e\xd1\x71\x72\x67\x89\x32\x01\xf8\xdb\x09\x4c\x02\x18\x45\x30\x72\x48\x0a\xb1\x70\xdc\xe4\xce\x36\xa2\xf6\x44\xb6\x5b\x89\x4e\xf1\xd5\x0c\x95\x73\x19\x93\xd3\x0c\x8e\x61\xcc\x0e\xbb\x1b\x69\x52\xcc\x49\xd4\xd8\x61\x37\xb9\xdb\xc8\x8e\x5b\x7b\xde\x46\x7a\x74\x96\x75\xe1\xc5\x9e\xa0\x70\x97\xc5\x80\x8e\x70\x86\x06\xe3\x65\xfe\x50\x09\x8e\x73\x89\x8a\x3d\xda\x2b\x2a\x01\xc5\x31\xe5\x74\xaf\x6f\x16\xa3\x7c\xf3\x0b\x09\x08\x27\xd6\xdf\x63\x10\xb4\x7d\x43\xf3\x49\x16\x83\xc0\x24\x49\x7a\xa0\xc7\xfb\xa4\x8b\xd8\xb0\x3f\xba\x30\x8d\x7c\xd1\x85\x2c\xfc\x50\xcc\xfd\x4b\x4c\xbe\x72\x82\x14\x4e\xe8\xb2\xbf\xb9\xed\x5f\xcd\xee\xd7\xd9\xfc\x6a\x7b\x77\xd9\xfa\xf7\x35\xb3\x59\xf5\xe9\x06\xbe\xda\xd8\xe3\x6b\x4e\x07\xe2\x18\x93\xeb\x2a\x4d\x31\x75\x7d\x91\xc9\x57\xca\xda\x96\xef\xfc\xce\x7e\xe7\x07\x70\x4b\x28\xb4\xdf\xf9\x60\xcb\xf3\x96\xb3\x06\x2c\x3b\xf4\xa2\x3d\x6a\xb5\xf4\xd5\xb3\x7e\x95\x1e\xad\xa9\xe8\x4d\x5a\x0b\xc6\x9b\xed\x76\x2b\x8f\xa2\x04\xec\x8a\xb6\x67\xa3\xe9\x76\xc2\xb0\xea\x2a\x44\x9b\x9a\x31\x7f\x91\x96\x0d\xdb\x1e\x44\xe4\xc9\x47\x98\x41\x6e\x79\x96\xc0\x11\xff\xd3\x5d\x00\xde\x7a\x76\xfe\xe7\x7a\xeb\xe5\xdd\x26\x5f\x15\x14\xab\xb5\x4b\xe3\x42\xa8\x05\x01\x83\x0e\xc2\xa2\x11\xb5\xdc\xe9\x92\xd9\x17\xaa\xad\xb9\xb3\x1b\x70\x6c\xbb\xf0\x20\x7a\x43\x4e\x48\x6c\x95\x9f\x63\xc4\x38\xc4\x90\x5a\x65\x03\xe8\x86\x24\x49\x00\x8e\xfa\x80\x6a\x1b\x4d\x3d\x21\xf4\x32\x3d\xca\x8b\x27\xf1\x55\xee\xe3\x67\x5e\xae\xb0\x6c\x02\x01\xa2\xdd\x01\xa8\x5b\xbc\x7c\x39\x74\xe9\x33\x8b\xa6\x52\xe8\x50\xac\xcb\x0d\x34\xa9\x00\x0d\xf4\x29\xd7\xfa\xca\x52\x48\x70\x73\x02\xb4\xbb\x68\xbb\x4c\x8f\xd6\xdc\xeb\xd7\x36\x1f\x68\x69\x5b\x10\xcb\x23\xfe\xd5\x9c\xa0\x0f\xc6\x72\x74\xfa\xf1\xbb\xef\xbe\xbf\xdf\xc8\xf1\x52\x80\x2a\xeb\xcc\x2c\x4d\x21\x0d\x01\x83\x92\x84\xbf\x9d\x89\x6d\x89\x49\xbe\x1e\x34\x61\x52\x02\x9a\x30\x29\x41\x2f\x4c\xca\xdd\x1c\x03\x2e\x15\xa4\x09\x9b\x0a\xb6\xe6\xe3\x1a\xf3\x71\x47\xf0\x29\x61\x07\x1c\xbd\xfa\xb0\x00\x81\xe2\x68\xe8\x89\xbf\xf3\xff\x9a\x21\xb4\x35\x57\xd2\xd2\xad\x76\x28\x4c\xf8\x5f\x60\x4d\x24\xb8\x40\xb7\xb9\x19\xe7\x4b\x0b\x63\x0c\xe7\x56\x06\x5d\x66\x4c\x53\xa9\x85\x31\x8a\xbf\x9a\x5c\x97\x19\x73\xa7\xb7\x50\x46\x49\xd0\x0e\xb7\x6a\x6a\x44\xdc\xb5\x50\xc6\x88\xe0\xb6\x44\x90\xb6\xca\x86\x99\xcb\xc0\x06\x6c\x65\x70\x0d\x43\xe3\xb8\x6b\xa3\x8c\x62\xde\x8a\x3c\x69\xca\x34\xf4\xda\x28\xe3\x44\x50\x83\x4f\x9a\x32\x76\xbd\x06\x67\x9c\x10\x3d\xce\x37\x0f\x40\x0d\xce\x28\x29\x2a\xac\x6a\x87\xed\x32\x63\x49\x4d\x86\x6e\xd6\xa0\xef\xe8\x01\xd1\x50\x2c\xb1\x74\xbc\x0c\x54\x1a\xd0\x7b\x1c\x3f\xb5\x79\xb9\x4a\x7f\x83\x84\xea\x94\xaa\x87\xef\x88\xf6\xe8\x3a\x8b\xf4\xf0\x56\xfb\xad\xeb\xec\x32\x9c\xe5\xdd\xb2\x75\xf3\x1d\xd1\xd1\x5d\x69\x97\x6e\xde\xad\xce\xe8\x3a\xc3\x18\x64\x7d\xb7\x74\x3d\x9c\xc7\x34\x5f\x57\xda\xc6\xa4\x8c\xf4\xd5\x1a\xf3\x0e\xef\x1a\xe3\xf4\x71\x36\xef\x18\xaf\x35\x8e\xa6\xe1\x1c\x58\x57\x95\x5d\x68\x86\xcb\xa7\x03\x64\x90\xf7\x37\xee\x1f\xe7\xab\xe9\xe2\x8a\x15\x5a\xd6\x5c\x4b\x65\xcd\x55\x4f\xa6\x34\xe5\x19\x6e\xb6\x2c\x42\xae\x06\x7e\x3e\x20\x53\xc8\x07\x5a\x38\x46\x6b\x11\x30\x5f\x84\xf3\x65\xdf\x5a\xc4\x48\xbc\x4e\xe6\x7d\xfd\x7f\xd6\xea\xd1\xb3\x8e\xde\x39\xeb\xe8\x69\xb3\xae\x4e\x33\xeb\xea\xff\xb2\x76\x87\x96\x75\xf5\x4d\x59\x57\x37\x93\x75\x76\x18\xd9\x98\xa7\x7e\xd6\xf3\x5c\xcc\x06\x9f\x10\xd9\x60\xad\xcc\x86\x2b\x86\xce\x99\xaa\x53\x1a\x63\xad\x40\xd4\x3b\xa6\x39\xd3\xcd\xa2\xcd\xbd\xe5\x9e\xe6\x60\x8b\x7f\x87\x8b\x94\xa9\x1e\x36\x83\x6e\x12\xe0\xfd\xb3\x43\xae\x92\x12\xb6\x1f\xc6\x44\x94\xee\x42\xd7\x55\x9e\x8a\x74\x8b\xe0\x01\x85\xa5\x09\x18\x18\xaa\x0b\x8b\xfb\x8f\xdf\x7e\xfb\x71\x74\xa9\x2b\x98\xc8\x4e\x2a\x47\x24\xdf\x94\x23\xb2\x4b\x8a\xa1\x46\x30\x08\x11\x65\x3a\xf9\x77\x89\x4a\xfe\x5d\x45\x30\x2a\x79\xf3\x19\x88\x3e\x4c\x7b\x4a\xde\x08\x01\xbb\x04\xe8\x29\x7b\x25\xa9\x66\x92\x29\x83\x6d\x03\x6a\xd3\x4c\x9d\xd2\x48\xac\x4d\xb4\x62\x4e\xcd\x34\x75\xb4\x2d\x84\x3e\xd7\x5a\x73\x7d\xac\x86\xb2\xad\x8c\xd2\xfe\xe9\x81\x7c\x6b\x84\xdc\x00\x90\x91\x38\x2d\xbf\x2b\xde\x6b\x0c\xa9\x41\xab\xf5\x5c\x73\xa2\x93\x7c\x8b\xb1\xea\xb3\xe6\x98\xca\x5a\xef\x2f\x65\xa6\x9b\xc5\x90\xaf\x04\x74\xef\xe4\x80\x9f\xa4\x94\xee\x05\x31\x10\xa3\xbb\x28\x76\x15\xb2\x22\x19\x43\x82\x31\x0c\x07\xda\xbe\xef\x3f\x7d\x5c\xaf\xe6\xa3\x6b\x61\x49\x5b\x76\x4a\x35\x24\x79\xa3\x1a\x92\xdd\x50\x8e\x19\x55\xb3\x68\x19\xdc\xcf\x3f\xf4\x54\x33\x03\x06\x3d\xd5\xaa\x82\x6c\x06\xbc\x3a\xaa\xd1\x51\x1b\xf6\xad\x39\x9d\x50\xda\xe0\x2f\x27\xd5\xf8\x6f\x0d\x6b\x24\xd1\x67\x41\x7b\xb2\x97\xdd\x50\x2e\x94\x08\x43\xf3\x03\x19\xd1\x8c\x8f\x21\x28\x33\x91\xba\x53\xa3\x2b\xae\x8b\xcb\xc7\xf2\x0d\xd6\x4f\x3f\x7c\xfa\xf4\xc3\x62\x23\x1f\x96\x4f\x8a\xc3\xf2\x89\x6d\x4d\xfe\x0a\xe3\x03\xe4\x28\x04\xd6\xdf\x60\x06\x27\xb6\x55\x0f\xd8\xd6\xb7\x14\x81\xd8\xb6\xa4\x1b\xd1\x55\x5e\x2e\x16\xe7\x9b\x98\x80\x08\xe1\xdd\x29\x01\x47\xe7\x09\x45\x7c\xef\x7f\x58\xad\xd2\x63\x79\xd1\xcc\x89\xe1\xb6\xb8\x9a\x57\x0d\xd0\xfa\xb2\x5e\x91\x7b\xc5\xbd\xd7\x10\xe6\x87\x7f\x15\x35\xbf\x3c\x3e\x0e\x63\x08\xa8\x1f\x10\xbe\xdf\x94\x37\xec\xfc\xc9\xa4\x3e\xc3\xcc\x6f\x95\x9d\x6f\x30\xe1\xce\x56\x28\xf9\x4a\x32\xd4\xf4\xc6\x48\xe1\x52\xf2\xa4\xdc\x18\xde\x6e\xe4\x23\xcc\x8a\x37\x27\x69\x7e\x80\x7b\x76\x05\x2d\x80\x30\xa4\x57\xc8\x2d\x61\x8f\x91\x52\x7f\xf6\xae\x3d\x13\x6e\x9c\xae\xba\x8b\xd9\xfd\x72\x5d\xdd\xfc\x5d\x68\x0e\x63\x2f\x21\x51\x6b\x7d\x5f\x1f\xe5\x8f\x39\x76\x57\xef\x63\x4a\x57\x4a\x35\xd7\x31\xa5\x59\xfd\x9d\x84\xe2\x2e\x6c\x91\x8c\x85\xde\xe5\x97\x4a\xfb\xe2\xeb\xa9\x99\x41\xe5\x7e\xc3\xe5\x1a\x7a\x75\x9b\xb8\x1c\x90\xee\x09\x77\xdd\xbf\x6d\xde\x0f\x1e\x80\xaa\xae\x16\x0f\x80\x55\x17\x8b\x07\xc0\xb6\x28\x86\x93\x87\x3f\x9b\x31\xd0\xea\x94\xcf\x1b\x6a\x66\x02\x5b\xb3\x37\x01\xae\xb5\x34\x01\xee\xd3\xb5\x03\xbf\xa9\x71\x9e\x18\x16\xdf\x6b\xde\x2e\x90\xee\x92\xc8\xd9\x30\x5f\xa4\xc7\x0a\x2d\x6a\xdc\x3e\x92\x2e\x41\xda\x97\x1b\xee\x55\x3e\xcc\x45\xd2\x17\xdd\xa8\x53\x6e\x90\x29\x7b\xac\x57\x15\x02\x85\x62\x59\x0e\x9a\x84\x47\x55\x32\x85\x60\x73\xe7\xcf\x6e\x4f\x5f\x36\x1a\xd5\x8d\xbf\x26\xa2\x6e\x53\x30\xd7\x7a\x1b\x13\xc0\x7d\xa1\xe4\xa6\xf1\x2a\x4b\x53\xdb\x99\x3b\x5f\xae\x57\xcb\xdb\x4d\x61\xa0\xc5\xbd\x7b\x3f\x9b\x4e\xd7\xb7\x03\x02\xfb\x31\x60\xdc\x09\xf7\x28\x8e\x7a\x65\x6f\xc0\x75\xab\xd1\x03\xa6\xa5\x75\x6a\xe8\xe0\x9d\xbf\x49\x60\x84\x80\xc5\x42\x0a\x21\xb6\x00\x8e\xac\xb7\x17\xa7\x5b\xeb\xd5\x7d\x7a\xbc\x3b\xfd\x41\x5c\x90\xbf\xe5\xf4\x87\xb2\xbe\x46\x5a\xd1\xf6\xab\xb4\xc4\xd8\xa9\xdd\x19\xb4\x91\xeb\xdd\xe7\x26\x7e\x39\x7c\x65\x60\x7b\xee\xec\xc3\x74\xbe\xbe\xdd\
gitextract_4majm_s_/ ├── .chglog/ │ ├── CHANGELOG.gobot.md │ ├── README.md │ └── config_gobot.yml ├── .circleci/ │ └── config.yml ├── .github/ │ ├── FUNDING.yml │ ├── dependabot.yml │ ├── pull_request_template.md │ └── workflows/ │ └── golangci-lint.yml ├── .gitignore ├── .golangci.yml ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.txt ├── MIGRATION.md ├── Makefile ├── README.md ├── adaptor.go ├── api/ │ ├── api.go │ ├── api_test.go │ ├── basic_auth.go │ ├── basic_auth_test.go │ ├── cors.go │ ├── cors_test.go │ ├── doc.go │ ├── helpers_test.go │ └── robeaux/ │ └── robeaux.go ├── appveyor.yml ├── commander.go ├── commander_test.go ├── connection.go ├── debug.go ├── device.go ├── doc.go ├── driver.go ├── drivers/ │ ├── aio/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── aio_driver.go │ │ ├── aio_driver_test.go │ │ ├── analog_actuator_driver.go │ │ ├── analog_actuator_driver_test.go │ │ ├── analog_sensor_driver.go │ │ ├── analog_sensor_driver_test.go │ │ ├── doc.go │ │ ├── grove_drivers.go │ │ ├── grove_drivers_test.go │ │ ├── grove_temperature_sensor_driver.go │ │ ├── grove_temperature_sensor_driver_test.go │ │ ├── helpers_test.go │ │ ├── temperature_sensor_driver.go │ │ ├── temperature_sensor_driver_test.go │ │ ├── thermalzone_driver.go │ │ └── thermalzone_driver_test.go │ ├── ble/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── battery_driver.go │ │ ├── battery_driver_test.go │ │ ├── ble_driver.go │ │ ├── ble_driver_test.go │ │ ├── device_information_driver.go │ │ ├── device_information_driver_test.go │ │ ├── doc.go │ │ ├── generic_access_driver.go │ │ ├── generic_access_driver_test.go │ │ ├── microbit/ │ │ │ ├── LICENSE │ │ │ ├── accelerometer_driver.go │ │ │ ├── accelerometer_driver_test.go │ │ │ ├── button_driver.go │ │ │ ├── button_driver_test.go │ │ │ ├── doc.go │ │ │ ├── io_pin_driver.go │ │ │ ├── io_pin_driver_test.go │ │ │ ├── led_driver.go │ │ │ ├── led_driver_test.go │ │ │ ├── magnetometer_driver.go │ │ │ ├── magnetometer_driver_test.go │ │ │ ├── temperature_driver.go │ │ │ └── temperature_driver_test.go │ │ ├── parrot/ │ │ │ ├── LICENSE │ │ │ ├── doc.go │ │ │ ├── minidrone_driver.go │ │ │ └── minidrone_driver_test.go │ │ ├── serial_port.go │ │ ├── serial_port_test.go │ │ ├── sphero/ │ │ │ ├── LICENSE │ │ │ ├── doc.go │ │ │ ├── sphero_bb8_driver.go │ │ │ ├── sphero_bb8_driver_test.go │ │ │ ├── sphero_ollie_driver.go │ │ │ ├── sphero_ollie_driver_test.go │ │ │ ├── sphero_sprkplus_driver.go │ │ │ └── sphero_sprkplus_driver_test.go │ │ └── testutil/ │ │ └── testutil.go │ ├── common/ │ │ ├── bit/ │ │ │ ├── bit.go │ │ │ └── bit_test.go │ │ ├── mfrc522/ │ │ │ ├── mfrc522_connectionwrapper.go │ │ │ ├── mfrc522_pcd.go │ │ │ ├── mfrc522_pcd_register.go │ │ │ ├── mfrc522_pcd_test.go │ │ │ └── mfrc522_picc.go │ │ └── spherocommon/ │ │ ├── spherocommon.go │ │ ├── spherocommon_packets.go │ │ └── spherocommon_test.go │ ├── gpio/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── aip1640_driver.go │ │ ├── aip1640_driver_test.go │ │ ├── button_driver.go │ │ ├── button_driver_test.go │ │ ├── buzzer_driver.go │ │ ├── buzzer_driver_test.go │ │ ├── direct_pin_driver.go │ │ ├── direct_pin_driver_test.go │ │ ├── doc.go │ │ ├── easy_driver.go │ │ ├── easy_driver_test.go │ │ ├── gpio_driver.go │ │ ├── gpio_driver_test.go │ │ ├── grove_drivers.go │ │ ├── grove_drivers_test.go │ │ ├── hcsr04_driver.go │ │ ├── hcsr04_driver_test.go │ │ ├── hd44780_driver.go │ │ ├── hd44780_driver_test.go │ │ ├── helpers_test.go │ │ ├── led_driver.go │ │ ├── led_driver_test.go │ │ ├── max7219_driver.go │ │ ├── max7219_driver_test.go │ │ ├── motor_driver.go │ │ ├── motor_driver_test.go │ │ ├── pir_motion_driver.go │ │ ├── pir_motion_driver_test.go │ │ ├── relay_driver.go │ │ ├── relay_driver_test.go │ │ ├── rgb_led_driver.go │ │ ├── rgb_led_driver_test.go │ │ ├── servo_driver.go │ │ ├── servo_driver_test.go │ │ ├── stepper_driver.go │ │ ├── stepper_driver_test.go │ │ ├── tm1638_driver.go │ │ └── tm1638_driver_test.go │ ├── i2c/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── adafruit1109_driver.go │ │ ├── adafruit1109_driver_test.go │ │ ├── adafruit2327_driver.go │ │ ├── adafruit2327_driver_test.go │ │ ├── adafruit2348_driver.go │ │ ├── adafruit2348_driver_test.go │ │ ├── ads1x15_driver.go │ │ ├── ads1x15_driver_1015_test.go │ │ ├── ads1x15_driver_1115_test.go │ │ ├── ads1x15_driver_test.go │ │ ├── adxl345_driver.go │ │ ├── adxl345_driver_test.go │ │ ├── bh1750_driver.go │ │ ├── bh1750_driver_test.go │ │ ├── blinkm_driver.go │ │ ├── blinkm_driver_test.go │ │ ├── bme280_driver.go │ │ ├── bme280_driver_test.go │ │ ├── bmp180_driver.go │ │ ├── bmp180_driver_test.go │ │ ├── bmp280_driver.go │ │ ├── bmp280_driver_test.go │ │ ├── bmp388_driver.go │ │ ├── bmp388_driver_test.go │ │ ├── ccs811_driver.go │ │ ├── ccs811_driver_test.go │ │ ├── doc.go │ │ ├── drv2605l_driver.go │ │ ├── drv2605l_driver_test.go │ │ ├── generic_driver.go │ │ ├── generic_driver_test.go │ │ ├── grove_drivers.go │ │ ├── grove_drivers_test.go │ │ ├── grovepi_driver.go │ │ ├── grovepi_driver_test.go │ │ ├── helpers_test.go │ │ ├── hmc5883l_driver.go │ │ ├── hmc5883l_driver_test.go │ │ ├── hmc6352_driver.go │ │ ├── hmc6352_driver_test.go │ │ ├── i2c_config.go │ │ ├── i2c_config_test.go │ │ ├── i2c_connection.go │ │ ├── i2c_connection_test.go │ │ ├── i2c_driver.go │ │ ├── i2c_driver_test.go │ │ ├── ina3221_driver.go │ │ ├── ina3221_driver_test.go │ │ ├── jhd1313m1_driver.go │ │ ├── jhd1313m1_driver_test.go │ │ ├── l3gd20h_driver.go │ │ ├── l3gd20h_driver_test.go │ │ ├── lidarlite_driver.go │ │ ├── lidarlite_driver_test.go │ │ ├── mcp23017_driver.go │ │ ├── mcp23017_driver_test.go │ │ ├── mfrc522_driver.go │ │ ├── mma7660_driver.go │ │ ├── mma7660_driver_test.go │ │ ├── mpl115a2_driver.go │ │ ├── mpl115a2_driver_test.go │ │ ├── mpu6050_driver.go │ │ ├── mpu6050_driver_test.go │ │ ├── pca9501_driver.go │ │ ├── pca9501_driver_test.go │ │ ├── pca953x_driver.go │ │ ├── pca953x_driver_test.go │ │ ├── pca9685_driver.go │ │ ├── pca9685_driver_test.go │ │ ├── pcf8583_driver.go │ │ ├── pcf8583_driver_test.go │ │ ├── pcf8591_driver.go │ │ ├── pcf8591_driver_test.go │ │ ├── sht2x_driver.go │ │ ├── sht2x_driver_test.go │ │ ├── sht3x_driver.go │ │ ├── sht3x_driver_test.go │ │ ├── ssd1306_driver.go │ │ ├── ssd1306_driver_test.go │ │ ├── th02_driver.go │ │ ├── th02_driver_test.go │ │ ├── tsl2561_driver.go │ │ ├── tsl2561_driver_test.go │ │ ├── wiichuck_driver.go │ │ ├── wiichuck_driver_test.go │ │ ├── yl40_driver.go │ │ └── yl40_driver_test.go │ ├── onewire/ │ │ ├── README.md │ │ ├── ds18b20_driver.go │ │ ├── ds18b20_driver_test.go │ │ ├── helpers_test.go │ │ ├── onewire_connection.go │ │ ├── onewire_connection_test.go │ │ ├── onewire_driver.go │ │ └── onewire_driver_test.go │ ├── serial/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── doc.go │ │ ├── megapi/ │ │ │ └── motor_driver.go │ │ ├── neurosky/ │ │ │ ├── LICENSE │ │ │ ├── mindwave_driver.go │ │ │ └── mindwave_driver_test.go │ │ ├── serial_driver.go │ │ ├── serial_driver_test.go │ │ ├── sphero/ │ │ │ ├── LICENSE │ │ │ ├── sphero_driver.go │ │ │ └── sphero_driver_test.go │ │ └── testutil/ │ │ └── testutil.go │ └── spi/ │ ├── README.md │ ├── apa102.go │ ├── apa102_test.go │ ├── doc.go │ ├── helpers_test.go │ ├── mcp3002.go │ ├── mcp3002_test.go │ ├── mcp3004.go │ ├── mcp3004_test.go │ ├── mcp3008.go │ ├── mcp3008_test.go │ ├── mcp3202.go │ ├── mcp3202_test.go │ ├── mcp3204.go │ ├── mcp3204_test.go │ ├── mcp3208.go │ ├── mcp3208_test.go │ ├── mcp3304.go │ ├── mcp3304_test.go │ ├── mfrc522_driver.go │ ├── mfrc522_driver_test.go │ ├── spi_config.go │ ├── spi_connection.go │ ├── spi_connection_test.go │ ├── spi_driver.go │ ├── spi_driver_test.go │ ├── ssd1306_driver.go │ └── ssd1306_driver_test.go ├── event.go ├── eventer.go ├── eventer_test.go ├── examples/ │ ├── ardrone.go │ ├── ardrone_face_tracking.go │ ├── ardrone_ps3.go │ ├── audio.go │ ├── batty.go │ ├── beaglebone_basic_direct_pin.go │ ├── beaglebone_blink.go │ ├── beaglebone_blink_usr_led.go │ ├── beaglebone_blinkm.go │ ├── beaglebone_button.go │ ├── beaglebone_grove_accelerometer.go │ ├── beaglebone_led_brightness.go │ ├── beaglebone_led_brightness_with_analog_input.go │ ├── beaglepocket_direct_pin.go │ ├── bebop.go │ ├── bebop.sdp │ ├── bebop_ps3.go │ ├── bebop_ps3_video.go │ ├── bebop_rtp_video.go │ ├── bleclient_battery.go │ ├── bleclient_bb8-collision.go │ ├── bleclient_bb8.go │ ├── bleclient_device_info.go │ ├── bleclient_firmata_blink.go │ ├── bleclient_firmata_curie_imu.go │ ├── bleclient_generic_access.go │ ├── bleclient_microbit_accelerometer.go │ ├── bleclient_microbit_blink.go │ ├── bleclient_microbit_buttons.go │ ├── bleclient_microbit_buttons_leds.go │ ├── bleclient_microbit_io_button.go │ ├── bleclient_microbit_led.go │ ├── bleclient_microbit_magnetometer.go │ ├── bleclient_microbit_temperature.go │ ├── bleclient_minidrone.go │ ├── bleclient_minidrone_events.go │ ├── bleclient_minidrone_mambo_ps3.go │ ├── bleclient_minidrone_ps3.go │ ├── bleclient_multiple_generic.go │ ├── bleclient_multiple_info.go │ ├── bleclient_ollie.go │ ├── bleclient_ollie_boost.go │ ├── bleclient_ollie_crazy.go │ ├── bleclient_ollie_mqtt.go │ ├── bleclient_ollie_multiple.go │ ├── bleclient_ollie_roll.go │ ├── bleclient_ollie_spin.go │ ├── bleclient_sprkplus.go │ ├── bleclient_sprkplus_collision.go │ ├── chip_blink.go │ ├── chip_blinkm.go │ ├── chip_button.go │ ├── chip_button_led.go │ ├── chip_drv2605l.go │ ├── chip_grove_accelerometer.go │ ├── chip_grove_lcd.go │ ├── chip_mpu6050.go │ ├── chip_tsl2561.go │ ├── chip_wiichuck.go │ ├── digispark_api.go │ ├── digispark_blink.go │ ├── digispark_blinkm.go │ ├── digispark_driver.go │ ├── digispark_led_brightness.go │ ├── digispark_mpl115a2.go │ ├── digispark_pca9501.go │ ├── digispark_servo.go │ ├── dragonboard_button.go │ ├── edison_blink.go │ ├── edison_blink_without_all_gobot_framework.go │ ├── edison_blinkm.go │ ├── edison_bme280.go │ ├── edison_button.go │ ├── edison_button_led.go │ ├── edison_button_led_api.go │ ├── edison_grove_accelerometer.go │ ├── edison_grove_buzzer.go │ ├── edison_grove_lcd.go │ ├── edison_grove_light_sensor.go │ ├── edison_grove_piezo_vibration.go │ ├── edison_grove_rotary_sensor.go │ ├── edison_grove_sound_sensor.go │ ├── edison_grove_temperature_sensor.go │ ├── edison_led_brightness.go │ ├── edison_led_brightness_with_analog_input.go │ ├── edison_miniboard_grove_accelerometer.go │ ├── every_done.go │ ├── firmata_adxl345.go │ ├── firmata_aip1640.go │ ├── firmata_blink.go │ ├── firmata_blink_api.go │ ├── firmata_blink_metal.go │ ├── firmata_blink_robot.go │ ├── firmata_blinkm.go │ ├── firmata_bme280.go │ ├── firmata_bmp180.go │ ├── firmata_bmp280.go │ ├── firmata_button.go │ ├── firmata_buzzer.go │ ├── firmata_cat_toy.go │ ├── firmata_curie_imu.go │ ├── firmata_curie_imu_shock_detect.go │ ├── firmata_curie_imu_step_counter.go │ ├── firmata_curie_imu_tap_detect.go │ ├── firmata_direct_pin.go │ ├── firmata_gpio_max7219.go │ ├── firmata_grove_lcd.go │ ├── firmata_grove_sound_sensor.go │ ├── firmata_hmc6352.go │ ├── firmata_integration.go │ ├── firmata_led_brightness.go │ ├── firmata_led_brightness_with_analog_input.go │ ├── firmata_lidarlite.go │ ├── firmata_metal_button.go │ ├── firmata_mma7660.go │ ├── firmata_motor.go │ ├── firmata_mpl115a2.go │ ├── firmata_mpu6050.go │ ├── firmata_pca9685.go │ ├── firmata_pir_motion.go │ ├── firmata_rgb_led.go │ ├── firmata_servo.go │ ├── firmata_ssd1306.go │ ├── firmata_temp36.go │ ├── firmata_tm1638.go │ ├── firmata_travis.go │ ├── firmata_wiichuck.go │ ├── gopigo3.go │ ├── gopigo3_grove_button.go │ ├── gopigo3_grove_lcd.go │ ├── gopigo3_grove_light_sensor.go │ ├── gopigo3_led_brightness.go │ ├── gopigo3_servo.go │ ├── haarcascade_frontalface_alt.xml │ ├── hello.go │ ├── hello_api.go │ ├── hello_api_auth.go │ ├── hello_api_custom.go │ ├── hello_api_video.go │ ├── holystone_hs200.go │ ├── jetson-nano_blink.go │ ├── jetson-nano_servo.go │ ├── joule_blink.go │ ├── joule_blinkm.go │ ├── joule_grove_lcd.go │ ├── joule_grove_rotary_sensor.go │ ├── joule_led_brightness.go │ ├── joule_led_brightness_with_analog_input.go │ ├── joule_leds.go │ ├── joystick_ps3.go │ ├── joystick_ps4.go │ ├── joystick_ps5.go │ ├── joystick_xbox360.go │ ├── joystick_xbox360_rock_band_drums.go │ ├── joystick_xboxone.go │ ├── keyboard.go │ ├── keyboard_mqtt.go │ ├── leap_motion.go │ ├── leap_motion_gestures.go │ ├── leap_motion_hands.go │ ├── leap_servos.go │ ├── leap_sphero.go │ ├── mavlink.go │ ├── metal_button.go │ ├── mqtt_driver_ping.go │ ├── mqtt_firmata_blink.go │ ├── mqtt_ping.go │ ├── nanopct6_direct_pin.go │ ├── nanopct6_ds18b20.go │ ├── nanopct6_servo.go │ ├── nanopct6_thermalzone.go │ ├── nanopct6_yl40.go │ ├── nanopi_button.go │ ├── nanopi_direct_pin.go │ ├── nanopi_direct_pin_event.go │ ├── nanopi_led_brightness.go │ ├── nanopi_pca9533.go │ ├── nats.go │ ├── nats_driver_ping.go │ ├── opencv_face_detect.go │ ├── opencv_window.go │ ├── orangepi5pro_direct_pin.go │ ├── orangepi5pro_servo.go │ ├── orangepi5pro_thermalzone.go │ ├── particle_api.go │ ├── particle_blink.go │ ├── particle_button.go │ ├── particle_events.go │ ├── particle_function.go │ ├── particle_led_brightness.go │ ├── particle_variable.go │ ├── pebble.go │ ├── pebble_accelerometer.go │ ├── raspi_adafruit2327_servo.go │ ├── raspi_adafruit2348_dcmotor.go │ ├── raspi_adafruit2348_stepper.go │ ├── raspi_ads1015.go │ ├── raspi_blink.go │ ├── raspi_blinkm.go │ ├── raspi_button.go │ ├── raspi_ccs811.go │ ├── raspi_direct_pin.go │ ├── raspi_direct_pin_event.go │ ├── raspi_generic.go │ ├── raspi_grove_pi_blink.go │ ├── raspi_grove_pi_button.go │ ├── raspi_grove_pi_dht.go │ ├── raspi_grove_pi_rotary.go │ ├── raspi_grove_pi_ultrasonic.go │ ├── raspi_grove_rotary_sensor.go │ ├── raspi_hcsr04.go │ ├── raspi_hmc5883l.go │ ├── raspi_ina3221.go │ ├── raspi_led_brightness.go │ ├── raspi_mcp3008.go │ ├── raspi_pca9533.go │ ├── raspi_servo.go │ ├── raspi_sht2x.go │ ├── raspi_sht3x.go │ ├── raspi_ssd1306.go │ ├── raspi_ssd1306spi.go │ ├── raspi_stepper_move.go │ ├── raspi_thermalzone.go │ ├── rock64_direct_pin.go │ ├── rock64_yl40.go │ ├── serialport_megapi_motor.go │ ├── serialport_mindwave.go │ ├── serialport_sphero.go │ ├── serialport_sphero_api.go │ ├── serialport_sphero_calibration.go │ ├── serialport_sphero_conways.go │ ├── serialport_sphero_dpad.go │ ├── serialport_sphero_master.go │ ├── serialport_sphero_multiple.go │ ├── square.go │ ├── square_fire.go │ ├── tello.go │ ├── tello_facetracker.go │ ├── tello_keyboard.go │ ├── tello_opencv.go │ ├── tello_ps3.go │ ├── tello_video.go │ ├── tinkerboard2_direct_pin_bin_counter.go │ ├── tinkerboard2_yl40.go │ ├── tinkerboard_adafruit1109_lcd_keys.go │ ├── tinkerboard_ads1115.go │ ├── tinkerboard_adxl345.go │ ├── tinkerboard_blink.go │ ├── tinkerboard_bme280.go │ ├── tinkerboard_bmp280.go │ ├── tinkerboard_button.go │ ├── tinkerboard_direct_pin.go │ ├── tinkerboard_ds18b20.go │ ├── tinkerboard_generic.go │ ├── tinkerboard_grove_lcd.go │ ├── tinkerboard_hcsr04.go │ ├── tinkerboard_hmc5883l.go │ ├── tinkerboard_mfcrc522gpio.go │ ├── tinkerboard_mfcrc522spi.go │ ├── tinkerboard_motor.go │ ├── tinkerboard_mpl115a2.go │ ├── tinkerboard_mpu6050.go │ ├── tinkerboard_pca9533.go │ ├── tinkerboard_pcf8583_clock.go │ ├── tinkerboard_pcf8583_counter.go │ ├── tinkerboard_pcf8591.go │ ├── tinkerboard_thermalzone.go │ ├── up2_lcd.go │ ├── up2_leds.go │ ├── wifi_firmata_analog_input.go │ ├── wifi_firmata_blink.go │ ├── zero_analog.go │ ├── zero_direct_pin.go │ ├── zero_servo.go │ └── zero_yl40.go ├── go.mod ├── go.sum ├── helpers_test.go ├── manager.go ├── manager_test.go ├── platforms/ │ ├── adaptors/ │ │ ├── analogpinsadaptor.go │ │ ├── analogpinsadaptor_test.go │ │ ├── analogpinsadaptoroptions.go │ │ ├── analogpinsadaptoroptions_test.go │ │ ├── analogpintranslator.go │ │ ├── analogpintranslator_test.go │ │ ├── busnumbervalidator.go │ │ ├── busnumbervalidator_test.go │ │ ├── digitalpinsadaptor.go │ │ ├── digitalpinsadaptor_test.go │ │ ├── digitalpinsadaptoroptions.go │ │ ├── digitalpinsadaptoroptions_test.go │ │ ├── digitalpintranslator.go │ │ ├── digitalpintranslator_test.go │ │ ├── i2cbusadaptor.go │ │ ├── i2cbusadaptor_test.go │ │ ├── i2cbusadaptoroptions.go │ │ ├── i2cbusadaptoroptions_test.go │ │ ├── onewirebusadaptor.go │ │ ├── onewirebusadaptor_test.go │ │ ├── onewirebusadaptoroptions.go │ │ ├── onewirebusadaptoroptions_test.go │ │ ├── piblasterpwm_pin.go │ │ ├── piblasterpwm_pin_test.go │ │ ├── pwmpinsadaptor.go │ │ ├── pwmpinsadaptor_test.go │ │ ├── pwmpinsadaptoroptions.go │ │ ├── pwmpinsadaptoroptions_test.go │ │ ├── pwmpintranslator.go │ │ ├── pwmpintranslator_test.go │ │ ├── spibusadaptor.go │ │ ├── spibusadaptor_test.go │ │ ├── spibusadaptoroptions.go │ │ └── spibusadaptoroptions_test.go │ ├── asus/ │ │ ├── tinkerboard/ │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── adaptor.go │ │ │ ├── adaptor_test.go │ │ │ ├── doc.go │ │ │ └── pinmap.go │ │ └── tinkerboard2/ │ │ ├── README.md │ │ ├── adaptor.go │ │ ├── adaptor_test.go │ │ └── pinmap.go │ ├── audio/ │ │ ├── LICENSE │ │ ├── audio_adaptor.go │ │ ├── audio_adaptor_test.go │ │ ├── audio_driver.go │ │ ├── audio_driver_test.go │ │ └── doc.go │ ├── beagleboard/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── beaglebone/ │ │ │ ├── adaptor.go │ │ │ ├── adaptor_test.go │ │ │ └── pinmap.go │ │ ├── doc.go │ │ └── pocketbeagle/ │ │ ├── adaptor.go │ │ ├── adaptor_test.go │ │ └── pinmap.go │ ├── bleclient/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── ble_client_adaptor.go │ │ ├── ble_client_adaptor_options.go │ │ ├── ble_client_adaptor_options_test.go │ │ ├── ble_client_adaptor_test.go │ │ ├── btwrapper.go │ │ ├── doc.go │ │ ├── helpers_test.go │ │ ├── uuid.go │ │ └── uuid_test.go │ ├── chip/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── chip_adaptor.go │ │ ├── chip_adaptor_test.go │ │ ├── chip_pinmap.go │ │ ├── chippro_adaptor.go │ │ ├── chippro_adaptor_test.go │ │ ├── chippro_pinmap.go │ │ └── doc.go │ ├── dexter/ │ │ ├── README.md │ │ ├── dexter.go │ │ └── gopigo3/ │ │ ├── README.md │ │ ├── driver.go │ │ └── driver_test.go │ ├── digispark/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── digispark_adaptor.go │ │ ├── digispark_adaptor_test.go │ │ ├── digispark_i2c.go │ │ ├── digispark_i2c_test.go │ │ ├── doc.go │ │ ├── littleWire.c │ │ ├── littleWire.go │ │ ├── littleWire.h │ │ ├── littleWire_servo.c │ │ ├── littleWire_servo.h │ │ ├── littleWire_util.c │ │ ├── littleWire_util.h │ │ ├── opendevice.c │ │ └── opendevice.h │ ├── dji/ │ │ ├── README.md │ │ ├── dji.go │ │ └── tello/ │ │ ├── README.md │ │ ├── crc.go │ │ ├── driver.go │ │ ├── driver_test.go │ │ ├── pitch.go │ │ └── pitch_test.go │ ├── dragonboard/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── doc.go │ │ ├── dragonboard_adaptor.go │ │ └── dragonboard_adaptor_test.go │ ├── firmata/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── ble_firmata_adaptor.go │ │ ├── ble_firmata_adaptor_test.go │ │ ├── client/ │ │ │ ├── client.go │ │ │ ├── client_test.go │ │ │ └── examples/ │ │ │ └── blink.go │ │ ├── doc.go │ │ ├── firmata_adaptor.go │ │ ├── firmata_adaptor_test.go │ │ ├── firmata_i2c.go │ │ ├── firmata_i2c_test.go │ │ ├── tcp_firmata_adaptor.go │ │ └── tcp_firmata_adaptor_test.go │ ├── friendlyelec/ │ │ ├── nanopct6/ │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── adaptor.go │ │ │ ├── adaptor_test.go │ │ │ ├── doc.go │ │ │ └── pinmap.go │ │ └── nanopi/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── adaptor.go │ │ ├── adaptor_test.go │ │ ├── doc.go │ │ └── neo_pinmap.go │ ├── holystone/ │ │ ├── README.md │ │ ├── holystone.go │ │ └── hs200/ │ │ ├── README.md │ │ ├── doc.go │ │ ├── hs200_driver.go │ │ └── hs200_driver_test.go │ ├── intel-iot/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── curie/ │ │ │ ├── README.md │ │ │ ├── doc.go │ │ │ ├── imu_driver.go │ │ │ └── imu_driver_test.go │ │ ├── edison/ │ │ │ ├── README.md │ │ │ ├── arduino_pinmap.go │ │ │ ├── doc.go │ │ │ ├── edison_adaptor.go │ │ │ ├── edison_adaptor_test.go │ │ │ ├── miniboard_pinmap.go │ │ │ └── sparkfun_pinmap.go │ │ ├── intel-iot.go │ │ └── joule/ │ │ ├── README.md │ │ ├── doc.go │ │ ├── joule_adaptor.go │ │ ├── joule_adaptor_test.go │ │ └── tuchuck_pinmap.go │ ├── jetson/ │ │ ├── README.md │ │ ├── adaptor.go │ │ ├── adaptor_test.go │ │ ├── doc.go │ │ └── pinmap.go │ ├── joystick/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bin/ │ │ │ └── scanner.go │ │ ├── configs/ │ │ │ ├── dualsense.json │ │ │ ├── dualshock3.json │ │ │ ├── dualshock4.json │ │ │ ├── magicseer1.json │ │ │ ├── shield.json │ │ │ └── xbox360_power_a_mini_proex.json │ │ ├── doc.go │ │ ├── events.go │ │ ├── joystick_adaptor.go │ │ ├── joystick_adaptor_test.go │ │ ├── joystick_driver.go │ │ ├── joystick_driver_test.go │ │ ├── joystick_dualsense.go │ │ ├── joystick_dualshock3_darwin.go │ │ ├── joystick_dualshock3_linux.go │ │ ├── joystick_dualshock3_windows.go │ │ ├── joystick_dualshock4_darwin.go │ │ ├── joystick_dualshock4_linux.go │ │ ├── joystick_dualshock4_windows.go │ │ ├── joystick_nintendo_joycon.go │ │ ├── joystick_shield.go │ │ ├── joystick_tflight_hotas_x.go │ │ ├── joystick_xbox360.go │ │ ├── joystick_xbox360_rock_band_drums.go │ │ ├── joystick_xboxone.go │ │ └── test_helper.go │ ├── keyboard/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── doc.go │ │ ├── keyboard.go │ │ ├── keyboard_driver.go │ │ ├── keyboard_driver_test.go │ │ └── keyboard_test.go │ ├── leap/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── doc.go │ │ ├── leap_motion_adaptor.go │ │ ├── leap_motion_adaptor_test.go │ │ ├── leap_motion_driver.go │ │ ├── leap_motion_driver_test.go │ │ ├── parser.go │ │ └── test/ │ │ └── support/ │ │ └── example_frame.json │ ├── mavlink/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── common/ │ │ │ ├── common.go │ │ │ ├── mavlink.go │ │ │ └── version.go │ │ ├── doc.go │ │ ├── mavlink_adaptor.go │ │ ├── mavlink_adaptor_test.go │ │ ├── mavlink_driver.go │ │ ├── mavlink_driver_test.go │ │ ├── mavlink_udp_adaptor.go │ │ └── mavlink_udp_adaptor_test.go │ ├── megapi/ │ │ ├── README.md │ │ └── doc.go │ ├── microbit/ │ │ ├── LICENSE │ │ ├── README.md │ │ └── doc.go │ ├── mqtt/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── doc.go │ │ ├── mqtt_adaptor.go │ │ ├── mqtt_adaptor_test.go │ │ ├── mqtt_driver.go │ │ └── mqtt_driver_test.go │ ├── nats/ │ │ ├── README.md │ │ ├── doc.go │ │ ├── nats_adaptor.go │ │ ├── nats_adaptor_test.go │ │ ├── nats_driver.go │ │ ├── nats_driver_test.go │ │ └── test_certs/ │ │ ├── catest-key.pem │ │ ├── catest.pem │ │ ├── client-cert.pem │ │ ├── client-key.pem │ │ ├── server-cert.pem │ │ └── server-key.pem │ ├── neurosky/ │ │ ├── LICENSE │ │ └── README.md │ ├── opencv/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── camera_driver.go │ │ ├── camera_driver_test.go │ │ ├── doc.go │ │ ├── haarcascade_frontalface_alt.xml │ │ ├── helpers_test.go │ │ ├── utils.go │ │ ├── utils_test.go │ │ ├── window_driver.go │ │ └── window_driver_test.go │ ├── orangepi/ │ │ └── orangepi5pro/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── adaptor.go │ │ ├── adaptor_test.go │ │ ├── doc.go │ │ └── pinmap.go │ ├── parrot/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── ardrone/ │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── ardrone_adaptor.go │ │ │ ├── ardrone_adaptor_test.go │ │ │ ├── ardrone_driver.go │ │ │ ├── ardrone_driver_test.go │ │ │ ├── doc.go │ │ │ ├── pitch.go │ │ │ ├── pitch_test.go │ │ │ └── test_helper.go │ │ ├── bebop/ │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── bebop_adaptor.go │ │ │ ├── bebop_adaptor_test.go │ │ │ ├── bebop_driver.go │ │ │ ├── bebop_driver_test.go │ │ │ ├── client/ │ │ │ │ ├── client.go │ │ │ │ ├── constants.go │ │ │ │ ├── examples/ │ │ │ │ │ ├── ff.conf │ │ │ │ │ ├── takeoff.go │ │ │ │ │ └── video.go │ │ │ │ └── networkframegenerator.go │ │ │ ├── doc.go │ │ │ ├── pitch.go │ │ │ ├── pitch_test.go │ │ │ └── test_helper.go │ │ ├── minidrone/ │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── doc.go │ │ └── parrot.go │ ├── particle/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── adaptor.go │ │ ├── adaptor_test.go │ │ └── doc.go │ ├── pebble/ │ │ ├── README.md │ │ ├── doc.go │ │ ├── pebble_adaptor.go │ │ ├── pebble_adaptor_test.go │ │ ├── pebble_driver.go │ │ └── pebble_driver_test.go │ ├── pine64/ │ │ └── rock64/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── adaptor.go │ │ ├── adaptor_test.go │ │ ├── doc.go │ │ └── pinmap.go │ ├── radxa/ │ │ ├── rockpi/ │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── adaptor.go │ │ │ ├── adaptor_test.go │ │ │ ├── doc.go │ │ │ └── pinmap.go │ │ └── zero/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── adaptor.go │ │ ├── adaptor_test.go │ │ ├── doc.go │ │ └── pinmap.go │ ├── raspi/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── adaptor.go │ │ ├── adaptor_test.go │ │ ├── doc.go │ │ └── pinmap.go │ ├── serialport/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── adaptor.go │ │ ├── adaptor_options.go │ │ ├── adaptor_options_test.go │ │ ├── adaptor_test.go │ │ ├── doc.go │ │ └── helpers_test.go │ ├── sphero/ │ │ ├── bb8/ │ │ │ ├── LICENSE │ │ │ └── README.md │ │ ├── ollie/ │ │ │ ├── LICENSE │ │ │ └── README.md │ │ ├── sphero/ │ │ │ ├── LICENSE │ │ │ └── README.md │ │ └── sprkplus/ │ │ ├── LICENSE │ │ └── README.md │ └── upboard/ │ ├── README.md │ ├── up2/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── adaptor.go │ │ ├── adaptor_test.go │ │ ├── doc.go │ │ └── pinmap.go │ └── upboard.go ├── robot.go ├── robot_test.go ├── robot_work.go ├── robot_work_test.go ├── system/ │ ├── GPIO.md │ ├── I2C.md │ ├── ONEWIRE.md │ ├── PWM.md │ ├── README.md │ ├── analogpin_sysfs.go │ ├── analogpin_sysfs_test.go │ ├── digitalpin_bench_test.go │ ├── digitalpin_cdev.go │ ├── digitalpin_cdev_test.go │ ├── digitalpin_mock.go │ ├── digitalpin_poll.go │ ├── digitalpin_poll_test.go │ ├── digitalpin_sysfs.go │ ├── digitalpin_sysfs_test.go │ ├── digitalpinaccess.go │ ├── digitalpinaccess_test.go │ ├── digitalpinoptions.go │ ├── digitalpinoptions_test.go │ ├── doc.go │ ├── fs.go │ ├── fs_mock.go │ ├── fs_mock_test.go │ ├── fs_test.go │ ├── i2c_device.go │ ├── i2c_device_test.go │ ├── onewiredevice_sysfs.go │ ├── onewiredevice_sysfs_test.go │ ├── pwmpin_sysfs.go │ ├── pwmpin_sysfs_test.go │ ├── spi_gpio.go │ ├── spi_gpio_test.go │ ├── spi_mock.go │ ├── spi_periphio.go │ ├── spiaccess.go │ ├── spiaccess_test.go │ ├── syscall.go │ ├── syscall_mock.go │ ├── sysfsfileaccess.go │ ├── system.go │ ├── system_test.go │ ├── systemoptions.go │ └── systemoptions_test.go ├── utils.go └── utils_test.go
Showing preview only (743K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (8610 symbols across 741 files)
FILE: adaptor.go
type DigitalPinOptioner (line 9) | type DigitalPinOptioner interface
type DigitalPinOptionApplier (line 39) | type DigitalPinOptionApplier interface
type DigitalPinner (line 45) | type DigitalPinner interface
type DigitalPinValuer (line 59) | type DigitalPinValuer interface
type DigitalPinnerProvider (line 68) | type DigitalPinnerProvider interface
type PWMPinner (line 73) | type PWMPinner interface
type PWMPinnerProvider (line 98) | type PWMPinnerProvider interface
type AnalogPinner (line 103) | type AnalogPinner interface
type I2cSystemDevicer (line 126) | type I2cSystemDevicer interface
type SpiSystemDevicer (line 173) | type SpiSystemDevicer interface
type OneWireSystemDevicer (line 182) | type OneWireSystemDevicer interface
type BusOperations (line 198) | type BusOperations interface
type I2cOperations (line 214) | type I2cOperations interface
type SpiOperations (line 226) | type SpiOperations interface
type OneWireOperations (line 237) | type OneWireOperations interface
type Adaptor (line 253) | type Adaptor interface
type BLEConnector (line 265) | type BLEConnector interface
type Porter (line 279) | type Porter interface
FILE: api/api.go
type API (line 19) | type API struct
method ServeHTTP (line 62) | func (a *API) ServeHTTP(res http.ResponseWriter, req *http.Request) {
method Post (line 78) | func (a *API) Post(path string, f func(http.ResponseWriter, *http.Requ...
method Put (line 83) | func (a *API) Put(path string, f func(http.ResponseWriter, *http.Reque...
method Delete (line 88) | func (a *API) Delete(path string, f func(http.ResponseWriter, *http.Re...
method Options (line 93) | func (a *API) Options(path string, f func(http.ResponseWriter, *http.R...
method Get (line 98) | func (a *API) Get(path string, f func(http.ResponseWriter, *http.Reque...
method Head (line 103) | func (a *API) Head(path string, f func(http.ResponseWriter, *http.Requ...
method AddHandler (line 108) | func (a *API) AddHandler(f func(http.ResponseWriter, *http.Request)) {
method Start (line 113) | func (a *API) Start() {
method StartWithoutDefaults (line 121) | func (a *API) StartWithoutDefaults() {
method AddC3PIORoutes (line 128) | func (a *API) AddC3PIORoutes() {
method AddRobeauxRoutes (line 155) | func (a *API) AddRobeauxRoutes() {
method robeaux (line 174) | func (a *API) robeaux(res http.ResponseWriter, req *http.Request) {
method mcp (line 198) | func (a *API) mcp(res http.ResponseWriter, req *http.Request) {
method mcpCommands (line 204) | func (a *API) mcpCommands(res http.ResponseWriter, req *http.Request) {
method robots (line 210) | func (a *API) robots(res http.ResponseWriter, req *http.Request) {
method robot (line 220) | func (a *API) robot(res http.ResponseWriter, req *http.Request) {
method robotCommands (line 230) | func (a *API) robotCommands(res http.ResponseWriter, req *http.Request) {
method robotDevices (line 240) | func (a *API) robotDevices(res http.ResponseWriter, req *http.Request) {
method robotDevice (line 254) | func (a *API) robotDevice(res http.ResponseWriter, req *http.Request) {
method robotDeviceEvent (line 262) | func (a *API) robotDeviceEvent(res http.ResponseWriter, req *http.Requ...
method robotDeviceCommands (line 305) | func (a *API) robotDeviceCommands(res http.ResponseWriter, req *http.R...
method robotConnections (line 315) | func (a *API) robotConnections(res http.ResponseWriter, req *http.Requ...
method robotConnection (line 329) | func (a *API) robotConnection(res http.ResponseWriter, req *http.Reque...
method executeMcpCommand (line 338) | func (a *API) executeMcpCommand(res http.ResponseWriter, req *http.Req...
method executeRobotDeviceCommand (line 346) | func (a *API) executeRobotDeviceCommand(res http.ResponseWriter, req *...
method executeRobotCommand (line 363) | func (a *API) executeRobotCommand(res http.ResponseWriter, req *http.R...
method executeCommand (line 377) | func (a *API) executeCommand(f func(map[string]interface{}) interface{},
method writeJSON (line 394) | func (a *API) writeJSON(j interface{}, res http.ResponseWriter) {
method Debug (line 406) | func (a *API) Debug() {
method jsonRobotFor (line 412) | func (a *API) jsonRobotFor(name string) (*gobot.JSONRobot, error) {
method jsonDeviceFor (line 419) | func (a *API) jsonDeviceFor(robot string, name string) (*gobot.JSONDev...
method jsonConnectionFor (line 427) | func (a *API) jsonConnectionFor(robot string, name string) (*gobot.JSO...
function NewAPI (line 31) | func NewAPI(m *gobot.Manager) *API {
FILE: api/api_test.go
function initTestAPI (line 20) | func initTestAPI() *API {
function TestStartWithoutDefaults (line 39) | func TestStartWithoutDefaults(t *testing.T) {
function TestRobeaux (line 54) | func TestRobeaux(t *testing.T) {
function TestIndex (line 78) | func TestIndex(t *testing.T) {
function TestMcp (line 89) | func TestMcp(t *testing.T) {
function TestMcpCommands (line 101) | func TestMcpCommands(t *testing.T) {
function TestExecuteMcpCommand (line 112) | func TestExecuteMcpCommand(t *testing.T) {
function TestRobots (line 141) | func TestRobots(t *testing.T) {
function TestRobot (line 152) | func TestRobot(t *testing.T) {
function TestRobotDevices (line 172) | func TestRobotDevices(t *testing.T) {
function TestRobotCommands (line 192) | func TestRobotCommands(t *testing.T) {
function TestExecuteRobotCommand (line 212) | func TestExecuteRobotCommand(t *testing.T) {
function TestRobotDevice (line 251) | func TestRobotDevice(t *testing.T) {
function TestRobotDeviceCommands (line 275) | func TestRobotDeviceCommands(t *testing.T) {
function TestExecuteRobotDeviceCommand (line 300) | func TestExecuteRobotDeviceCommand(t *testing.T) {
function TestRobotConnections (line 340) | func TestRobotConnections(t *testing.T) {
function TestRobotConnection (line 360) | func TestRobotConnection(t *testing.T) {
function TestRobotDeviceEvent (line 385) | func TestRobotDeviceEvent(t *testing.T) {
function TestAPIRouter (line 428) | func TestAPIRouter(t *testing.T) {
FILE: api/basic_auth.go
function BasicAuth (line 10) | func BasicAuth(username, password string) http.HandlerFunc {
function secureCompare (line 24) | func secureCompare(given string, actual string) bool {
FILE: api/basic_auth_test.go
function TestBasicAuth (line 12) | func TestBasicAuth(t *testing.T) {
FILE: api/cors.go
type CORS (line 10) | type CORS struct
method isOriginAllowed (line 41) | func (c *CORS) isOriginAllowed(origin string) bool {
method generatePatterns (line 51) | func (c *CORS) generatePatterns() {
method AllowedHeaders (line 63) | func (c *CORS) AllowedHeaders() string {
method AllowedMethods (line 68) | func (c *CORS) AllowedMethods() string {
function AllowRequestsFrom (line 19) | func AllowRequestsFrom(allowedOrigins ...string) http.HandlerFunc {
FILE: api/cors_test.go
function TestCORSIsOriginAllowed (line 12) | func TestCORSIsOriginAllowed(t *testing.T) {
function TestCORSAllowedHeaders (line 47) | func TestCORSAllowedHeaders(t *testing.T) {
function TestCORSAllowedMethods (line 53) | func TestCORSAllowedMethods(t *testing.T) {
function TestCORS (line 63) | func TestCORS(t *testing.T) {
FILE: api/helpers_test.go
type NullReadWriteCloser (line 10) | type NullReadWriteCloser struct
method Write (line 12) | func (NullReadWriteCloser) Write(p []byte) (int, error) {
method Read (line 16) | func (NullReadWriteCloser) Read(b []byte) (int, error) {
method Close (line 20) | func (NullReadWriteCloser) Close() error {
type testDriver (line 24) | type testDriver struct
method Start (line 33) | func (t *testDriver) Start() error { return nil }
method Halt (line 34) | func (t *testDriver) Halt() error { return nil }
method Name (line 35) | func (t *testDriver) Name() string { return t.name }
method SetName (line 36) | func (t *testDriver) SetName(n string) { t.name = n }
method Pin (line 37) | func (t *testDriver) Pin() string { return t.pin }
method Connection (line 38) | func (t *testDriver) Connection() gobot.Connection { return t.connecti...
function newTestDriver (line 40) | func newTestDriver(adaptor *testAdaptor, name string, pin string) *testD...
type testAdaptor (line 64) | type testAdaptor struct
method Finalize (line 74) | func (t *testAdaptor) Finalize() error { return testAdaptorFinalize() }
method Connect (line 75) | func (t *testAdaptor) Connect() error { return testAdaptorConnect() }
method Name (line 76) | func (t *testAdaptor) Name() string { return t.name }
method SetName (line 77) | func (t *testAdaptor) SetName(n string) { t.name = n }
method Port (line 78) | func (t *testAdaptor) Port() string { return t.port }
function newTestAdaptor (line 80) | func newTestAdaptor(name string, port string) *testAdaptor {
function newTestRobot (line 87) | func newTestRobot(name string) *gobot.Robot {
FILE: api/robeaux/robeaux.go
function bindataRead (line 54) | func bindataRead(data []byte, name string) ([]byte, error) {
type asset (line 74) | type asset struct
type bindataFileInfo (line 79) | type bindataFileInfo struct
method Name (line 86) | func (fi bindataFileInfo) Name() string {
method Size (line 90) | func (fi bindataFileInfo) Size() int64 {
method Mode (line 94) | func (fi bindataFileInfo) Mode() os.FileMode {
method ModTime (line 98) | func (fi bindataFileInfo) ModTime() time.Time {
method IsDir (line 102) | func (fi bindataFileInfo) IsDir() bool {
method Sys (line 106) | func (fi bindataFileInfo) Sys() interface{} {
function cssKeepBytes (line 112) | func cssKeepBytes() ([]byte, error) {
function cssKeep (line 119) | func cssKeep() (*asset, error) {
function cssApplicationCssBytes (line 132) | func cssApplicationCssBytes() ([]byte, error) {
function cssApplicationCss (line 139) | func cssApplicationCss() (*asset, error) {
function cssApplicationCssMapBytes (line 152) | func cssApplicationCssMapBytes() ([]byte, error) {
function cssApplicationCssMap (line 159) | func cssApplicationCssMap() (*asset, error) {
function cssFontsCssBytes (line 172) | func cssFontsCssBytes() ([]byte, error) {
function cssFontsCss (line 179) | func cssFontsCss() (*asset, error) {
function fontsInconsolataBoldWebfontEotBytes (line 192) | func fontsInconsolataBoldWebfontEotBytes() ([]byte, error) {
function fontsInconsolataBoldWebfontEot (line 199) | func fontsInconsolataBoldWebfontEot() (*asset, error) {
function fontsInconsolataBoldWebfontSvgBytes (line 212) | func fontsInconsolataBoldWebfontSvgBytes() ([]byte, error) {
function fontsInconsolataBoldWebfontSvg (line 219) | func fontsInconsolataBoldWebfontSvg() (*asset, error) {
function fontsInconsolataBoldWebfontTtfBytes (line 232) | func fontsInconsolataBoldWebfontTtfBytes() ([]byte, error) {
function fontsInconsolataBoldWebfontTtf (line 239) | func fontsInconsolataBoldWebfontTtf() (*asset, error) {
function fontsInconsolataBoldWebfontWoffBytes (line 252) | func fontsInconsolataBoldWebfontWoffBytes() ([]byte, error) {
function fontsInconsolataBoldWebfontWoff (line 259) | func fontsInconsolataBoldWebfontWoff() (*asset, error) {
function fontsInconsolataRegularWebfontEotBytes (line 272) | func fontsInconsolataRegularWebfontEotBytes() ([]byte, error) {
function fontsInconsolataRegularWebfontEot (line 279) | func fontsInconsolataRegularWebfontEot() (*asset, error) {
function fontsInconsolataRegularWebfontSvgBytes (line 292) | func fontsInconsolataRegularWebfontSvgBytes() ([]byte, error) {
function fontsInconsolataRegularWebfontSvg (line 299) | func fontsInconsolataRegularWebfontSvg() (*asset, error) {
function fontsInconsolataRegularWebfontTtfBytes (line 312) | func fontsInconsolataRegularWebfontTtfBytes() ([]byte, error) {
function fontsInconsolataRegularWebfontTtf (line 319) | func fontsInconsolataRegularWebfontTtf() (*asset, error) {
function fontsInconsolataRegularWebfontWoffBytes (line 332) | func fontsInconsolataRegularWebfontWoffBytes() ([]byte, error) {
function fontsInconsolataRegularWebfontWoff (line 339) | func fontsInconsolataRegularWebfontWoff() (*asset, error) {
function fontsRobotoBoldWebfontEotBytes (line 352) | func fontsRobotoBoldWebfontEotBytes() ([]byte, error) {
function fontsRobotoBoldWebfontEot (line 359) | func fontsRobotoBoldWebfontEot() (*asset, error) {
function fontsRobotoBoldWebfontSvgBytes (line 372) | func fontsRobotoBoldWebfontSvgBytes() ([]byte, error) {
function fontsRobotoBoldWebfontSvg (line 379) | func fontsRobotoBoldWebfontSvg() (*asset, error) {
function fontsRobotoBoldWebfontTtfBytes (line 392) | func fontsRobotoBoldWebfontTtfBytes() ([]byte, error) {
function fontsRobotoBoldWebfontTtf (line 399) | func fontsRobotoBoldWebfontTtf() (*asset, error) {
function fontsRobotoBoldWebfontWoffBytes (line 412) | func fontsRobotoBoldWebfontWoffBytes() ([]byte, error) {
function fontsRobotoBoldWebfontWoff (line 419) | func fontsRobotoBoldWebfontWoff() (*asset, error) {
function fontsRobotoRegularWebfontEotBytes (line 432) | func fontsRobotoRegularWebfontEotBytes() ([]byte, error) {
function fontsRobotoRegularWebfontEot (line 439) | func fontsRobotoRegularWebfontEot() (*asset, error) {
function fontsRobotoRegularWebfontSvgBytes (line 452) | func fontsRobotoRegularWebfontSvgBytes() ([]byte, error) {
function fontsRobotoRegularWebfontSvg (line 459) | func fontsRobotoRegularWebfontSvg() (*asset, error) {
function fontsRobotoRegularWebfontTtfBytes (line 472) | func fontsRobotoRegularWebfontTtfBytes() ([]byte, error) {
function fontsRobotoRegularWebfontTtf (line 479) | func fontsRobotoRegularWebfontTtf() (*asset, error) {
function fontsRobotoRegularWebfontWoffBytes (line 492) | func fontsRobotoRegularWebfontWoffBytes() ([]byte, error) {
function fontsRobotoRegularWebfontWoff (line 499) | func fontsRobotoRegularWebfontWoff() (*asset, error) {
function fontsRobotoslabBoldWebfontEotBytes (line 512) | func fontsRobotoslabBoldWebfontEotBytes() ([]byte, error) {
function fontsRobotoslabBoldWebfontEot (line 519) | func fontsRobotoslabBoldWebfontEot() (*asset, error) {
function fontsRobotoslabBoldWebfontSvgBytes (line 532) | func fontsRobotoslabBoldWebfontSvgBytes() ([]byte, error) {
function fontsRobotoslabBoldWebfontSvg (line 539) | func fontsRobotoslabBoldWebfontSvg() (*asset, error) {
function fontsRobotoslabBoldWebfontTtfBytes (line 552) | func fontsRobotoslabBoldWebfontTtfBytes() ([]byte, error) {
function fontsRobotoslabBoldWebfontTtf (line 559) | func fontsRobotoslabBoldWebfontTtf() (*asset, error) {
function fontsRobotoslabBoldWebfontWoffBytes (line 572) | func fontsRobotoslabBoldWebfontWoffBytes() ([]byte, error) {
function fontsRobotoslabBoldWebfontWoff (line 579) | func fontsRobotoslabBoldWebfontWoff() (*asset, error) {
function imagesBulletConnections2PngBytes (line 592) | func imagesBulletConnections2PngBytes() ([]byte, error) {
function imagesBulletConnections2Png (line 599) | func imagesBulletConnections2Png() (*asset, error) {
function imagesBulletConnectionsPngBytes (line 612) | func imagesBulletConnectionsPngBytes() ([]byte, error) {
function imagesBulletConnectionsPng (line 619) | func imagesBulletConnectionsPng() (*asset, error) {
function imagesBulletDevices2PngBytes (line 632) | func imagesBulletDevices2PngBytes() ([]byte, error) {
function imagesBulletDevices2Png (line 639) | func imagesBulletDevices2Png() (*asset, error) {
function imagesBulletDevicesPngBytes (line 652) | func imagesBulletDevicesPngBytes() ([]byte, error) {
function imagesBulletDevicesPng (line 659) | func imagesBulletDevicesPng() (*asset, error) {
function imagesDeletePngBytes (line 672) | func imagesDeletePngBytes() ([]byte, error) {
function imagesDeletePng (line 679) | func imagesDeletePng() (*asset, error) {
function imagesDevicesImage2PngBytes (line 692) | func imagesDevicesImage2PngBytes() ([]byte, error) {
function imagesDevicesImage2Png (line 699) | func imagesDevicesImage2Png() (*asset, error) {
function imagesDevicesImagePngBytes (line 712) | func imagesDevicesImagePngBytes() ([]byte, error) {
function imagesDevicesImagePng (line 719) | func imagesDevicesImagePng() (*asset, error) {
function imagesLogoRobeauxPngBytes (line 732) | func imagesLogoRobeauxPngBytes() ([]byte, error) {
function imagesLogoRobeauxPng (line 739) | func imagesLogoRobeauxPng() (*asset, error) {
function imagesRobotsIcon_03PngBytes (line 752) | func imagesRobotsIcon_03PngBytes() ([]byte, error) {
function imagesRobotsIcon_03Png (line 759) | func imagesRobotsIcon_03Png() (*asset, error) {
function indexHtmlBytes (line 772) | func indexHtmlBytes() ([]byte, error) {
function indexHtml (line 779) | func indexHtml() (*asset, error) {
function jsKeepBytes (line 792) | func jsKeepBytes() ([]byte, error) {
function jsKeep (line 799) | func jsKeep() (*asset, error) {
function jsScriptJsBytes (line 812) | func jsScriptJsBytes() ([]byte, error) {
function jsScriptJs (line 819) | func jsScriptJs() (*asset, error) {
function Asset (line 833) | func Asset(name string) ([]byte, error) {
function MustAsset (line 847) | func MustAsset(name string) []byte {
function AssetInfo (line 859) | func AssetInfo(name string) (os.FileInfo, error) {
function AssetNames (line 872) | func AssetNames() []string {
function AssetDir (line 935) | func AssetDir(name string) ([]string, error) {
type bintree (line 957) | type bintree struct
function RestoreAsset (line 1010) | func RestoreAsset(dir, name string) error {
function RestoreAssets (line 1035) | func RestoreAssets(dir, name string) error {
function _filePath (line 1051) | func _filePath(dir, name string) string {
FILE: commander.go
type commander (line 3) | type commander struct
method Command (line 26) | func (c *commander) Command(name string) func(map[string]interface{}) ...
method Commands (line 31) | func (c *commander) Commands() map[string]func(map[string]interface{})...
method AddCommand (line 36) | func (c *commander) AddCommand(name string, command func(map[string]in...
type Commander (line 9) | type Commander interface
function NewCommander (line 19) | func NewCommander() Commander {
FILE: commander_test.go
function TestCommander (line 9) | func TestCommander(t *testing.T) {
FILE: connection.go
type JSONConnection (line 12) | type JSONConnection struct
function NewJSONConnection (line 18) | func NewJSONConnection(connection Connection) *JSONConnection {
type Connection (line 26) | type Connection
type Connections (line 29) | type Connections
method Len (line 32) | func (c *Connections) Len() int {
method Each (line 37) | func (c *Connections) Each(f func(Connection)) {
method Start (line 44) | func (c *Connections) Start() error {
method Finalize (line 64) | func (c *Connections) Finalize() error {
FILE: debug.go
function Debuglnf (line 5) | func Debuglnf(isDebug bool, format string, a ...interface{}) {
FILE: device.go
type JSONDevice (line 12) | type JSONDevice struct
function NewJSONDevice (line 20) | func NewJSONDevice(device Device) *JSONDevice {
type Device (line 39) | type Device
type Devices (line 42) | type Devices
method Len (line 45) | func (d *Devices) Len() int {
method Each (line 50) | func (d *Devices) Each(f func(Device)) {
method Start (line 57) | func (d *Devices) Start() error {
method Halt (line 76) | func (d *Devices) Halt() error {
FILE: driver.go
type Driver (line 4) | type Driver interface
type Pinner (line 19) | type Pinner interface
FILE: drivers/aio/aio_driver.go
constant Error (line 12) | Error = "error"
constant Data (line 14) | Data = "data"
constant Value (line 16) | Value = "value"
constant Vibration (line 18) | Vibration = "vibration"
type AnalogReader (line 22) | type AnalogReader interface
type AnalogWriter (line 28) | type AnalogWriter interface
type optionApplier (line 34) | type optionApplier interface
type configuration (line 39) | type configuration struct
type nameOption (line 44) | type nameOption
method apply (line 123) | func (o nameOption) apply(c *configuration) {
type driver (line 47) | type driver struct
method Name (line 77) | func (d *driver) Name() string {
method SetName (line 83) | func (d *driver) SetName(name string) {
method Connection (line 88) | func (d *driver) Connection() gobot.Connection {
method Start (line 103) | func (d *driver) Start() error {
method Halt (line 113) | func (d *driver) Halt() error {
function newDriver (line 58) | func newDriver(a interface{}, name string) *driver {
function WithName (line 72) | func WithName(name string) optionApplier {
FILE: drivers/aio/aio_driver_test.go
function initTestDriver (line 16) | func initTestDriver() *driver {
function Test_newDriver (line 22) | func Test_newDriver(t *testing.T) {
function Test_applyWithName (line 39) | func Test_applyWithName(t *testing.T) {
function TestStart (line 49) | func TestStart(t *testing.T) {
function TestHalt (line 60) | func TestHalt(t *testing.T) {
FILE: drivers/aio/analog_actuator_driver.go
type actuatorOptionApplier (line 9) | type actuatorOptionApplier interface
type actuatorConfiguration (line 14) | type actuatorConfiguration struct
type actuatorScaleOption (line 19) | type actuatorScaleOption struct
method String (line 140) | func (o actuatorScaleOption) String() string {
method apply (line 144) | func (o actuatorScaleOption) apply(cfg *actuatorConfiguration) {
type AnalogActuatorDriver (line 24) | type AnalogActuatorDriver struct
method SetScaler (line 88) | func (a *AnalogActuatorDriver) SetScaler(scaler func(float64) int) {
method Pin (line 96) | func (a *AnalogActuatorDriver) Pin() string { return a.pin }
method Write (line 99) | func (a *AnalogActuatorDriver) Write(val float64) error {
method RawWrite (line 113) | func (a *AnalogActuatorDriver) RawWrite(val int) error {
method WriteRaw (line 118) | func (a *AnalogActuatorDriver) WriteRaw(val int) error {
method Value (line 131) | func (a *AnalogActuatorDriver) Value() float64 {
method RawValue (line 136) | func (a *AnalogActuatorDriver) RawValue() int {
function NewAnalogActuatorDriver (line 46) | func NewAnalogActuatorDriver(a AnalogWriter, pin string, opts ...interfa...
function WithActuatorScaler (line 82) | func WithActuatorScaler(scaler func(input float64) (value int)) actuator...
function AnalogActuatorLinearScaler (line 149) | func AnalogActuatorLinearScaler(fromMin, fromMax float64, toMin, toMax i...
FILE: drivers/aio/analog_actuator_driver_test.go
function TestNewAnalogActuatorDriver (line 13) | func TestNewAnalogActuatorDriver(t *testing.T) {
function TestNewAnalogActuatorDriver_options (line 36) | func TestNewAnalogActuatorDriver_options(t *testing.T) {
function TestAnalogActuatorWriteRaw (line 54) | func TestAnalogActuatorWriteRaw(t *testing.T) {
function TestAnalogActuatorWriteRaw_AnalogWriteNotSupported (line 88) | func TestAnalogActuatorWriteRaw_AnalogWriteNotSupported(t *testing.T) {
function TestAnalogActuatorWrite_SetScaler (line 96) | func TestAnalogActuatorWrite_SetScaler(t *testing.T) {
function TestAnalogActuatorCommands_WithActuatorScaler (line 138) | func TestAnalogActuatorCommands_WithActuatorScaler(t *testing.T) {
FILE: drivers/aio/analog_sensor_driver.go
type sensorOptionApplier (line 11) | type sensorOptionApplier interface
type sensorConfiguration (line 16) | type sensorConfiguration struct
type sensorReadIntervalOption (line 22) | type sensorReadIntervalOption
method String (line 234) | func (o sensorReadIntervalOption) String() string {
method apply (line 242) | func (o sensorReadIntervalOption) apply(cfg *sensorConfiguration) {
type sensorScaleOption (line 25) | type sensorScaleOption struct
method String (line 238) | func (o sensorScaleOption) String() string {
method apply (line 246) | func (o sensorScaleOption) apply(cfg *sensorConfiguration) {
type AnalogSensorDriver (line 30) | type AnalogSensorDriver struct
method SetScaler (line 106) | func (a *AnalogSensorDriver) SetScaler(scaler func(int) float64) {
method Pin (line 114) | func (a *AnalogSensorDriver) Pin() string { return a.pin }
method Read (line 117) | func (a *AnalogSensorDriver) Read() (float64, error) {
method ReadRaw (line 123) | func (a *AnalogSensorDriver) ReadRaw() (int, error) {
method Value (line 129) | func (a *AnalogSensorDriver) Value() float64 {
method RawValue (line 137) | func (a *AnalogSensorDriver) RawValue() int {
method initialize (line 150) | func (a *AnalogSensorDriver) initialize() error {
method shutdown (line 204) | func (a *AnalogSensorDriver) shutdown() error {
method analogSensorRead (line 215) | func (a *AnalogSensorDriver) analogSensorRead() (int, float64, error) {
function NewAnalogSensorDriver (line 56) | func NewAnalogSensorDriver(a AnalogReader, pin string, opts ...interface...
function WithSensorCyclicRead (line 95) | func WithSensorCyclicRead(interval time.Duration) sensorOptionApplier {
function WithSensorScaler (line 100) | func WithSensorScaler(scaler func(input int) (value float64)) sensorOpti...
function AnalogSensorLinearScaler (line 251) | func AnalogSensorLinearScaler(fromMin, fromMax int, toMin, toMax float64...
FILE: drivers/aio/analog_sensor_driver_test.go
function TestNewAnalogSensorDriver (line 19) | func TestNewAnalogSensorDriver(t *testing.T) {
function TestNewAnalogSensorDriver_options (line 45) | func TestNewAnalogSensorDriver_options(t *testing.T) {
function TestAnalogSensor_WithSensorScaler (line 65) | func TestAnalogSensor_WithSensorScaler(t *testing.T) {
function TestAnalogSensorDriverReadRaw (line 75) | func TestAnalogSensorDriverReadRaw(t *testing.T) {
function TestAnalogSensorDriverReadRaw_AnalogWriteNotSupported (line 106) | func TestAnalogSensorDriverReadRaw_AnalogWriteNotSupported(t *testing.T) {
function TestAnalogSensorRead_SetScaler (line 116) | func TestAnalogSensorRead_SetScaler(t *testing.T) {
function TestAnalogSensor_WithSensorCyclicRead (line 152) | func TestAnalogSensor_WithSensorCyclicRead(t *testing.T) {
function TestAnalogSensorHalt_WithSensorCyclicRead (line 237) | func TestAnalogSensorHalt_WithSensorCyclicRead(t *testing.T) {
function TestAnalogSensorCommands_WithSensorScaler (line 257) | func TestAnalogSensorCommands_WithSensorScaler(t *testing.T) {
FILE: drivers/aio/grove_drivers.go
type GroveRotaryDriver (line 6) | type GroveRotaryDriver struct
function NewGroveRotaryDriver (line 14) | func NewGroveRotaryDriver(a AnalogReader, pin string, opts ...interface{...
type GroveLightSensorDriver (line 25) | type GroveLightSensorDriver struct
function NewGroveLightSensorDriver (line 33) | func NewGroveLightSensorDriver(a AnalogReader, pin string, opts ...inter...
type GrovePiezoVibrationSensorDriver (line 43) | type GrovePiezoVibrationSensorDriver struct
function NewGrovePiezoVibrationSensorDriver (line 52) | func NewGrovePiezoVibrationSensorDriver(
type GroveSoundSensorDriver (line 76) | type GroveSoundSensorDriver struct
function NewGroveSoundSensorDriver (line 84) | func NewGroveSoundSensorDriver(a AnalogReader, pin string, opts ...inter...
FILE: drivers/aio/grove_drivers_test.go
type groveDriverTestDriverAndEventer (line 18) | type groveDriverTestDriverAndEventer interface
function TestNewGroveRotaryDriver (line 23) | func TestNewGroveRotaryDriver(t *testing.T) {
function TestNewGroveLightSensorDriver (line 49) | func TestNewGroveLightSensorDriver(t *testing.T) {
function TestNewGrovePiezoVibrationSensorDriver (line 75) | func TestNewGrovePiezoVibrationSensorDriver(t *testing.T) {
function TestNewGroveSoundSensorDriver (line 101) | func TestNewGroveSoundSensorDriver(t *testing.T) {
function TestGroveDriverHalt_WithSensorCyclicRead (line 127) | func TestGroveDriverHalt_WithSensorCyclicRead(t *testing.T) {
function TestGroveDriverWithSensorCyclicReadPublishesError (line 161) | func TestGroveDriverWithSensorCyclicReadPublishesError(t *testing.T) {
function groveGetType (line 199) | func groveGetType(driver interface{}) string {
FILE: drivers/aio/grove_temperature_sensor_driver.go
type GroveTemperatureSensorDriver (line 12) | type GroveTemperatureSensorDriver struct
function NewGroveTemperatureSensorDriver (line 20) | func NewGroveTemperatureSensorDriver(a AnalogReader, pin string, opts .....
method Temperature (line 48) | func (t *TemperatureSensorDriver) Temperature() float64 {
FILE: drivers/aio/grove_temperature_sensor_driver_test.go
function TestNewGroveTemperatureSensorDriver (line 17) | func TestNewGroveTemperatureSensorDriver(t *testing.T) {
function TestNewGroveTemperatureSensorDriver_options (line 43) | func TestNewGroveTemperatureSensorDriver_options(t *testing.T) {
function TestGroveTemperatureSensorRead_scaler (line 64) | func TestGroveTemperatureSensorRead_scaler(t *testing.T) {
function TestGroveTemperatureSensor_publishesTemperatureInCelsius (line 96) | func TestGroveTemperatureSensor_publishesTemperatureInCelsius(t *testing...
FILE: drivers/aio/helpers_test.go
constant analogReadReturnValue (line 8) | analogReadReturnValue = 99
type aioTestBareAdaptor (line 10) | type aioTestBareAdaptor struct
method Connect (line 12) | func (t *aioTestBareAdaptor) Connect() error { return nil }
method Finalize (line 13) | func (t *aioTestBareAdaptor) Finalize() error { return nil }
method Name (line 14) | func (t *aioTestBareAdaptor) Name() string { return "bare" }
method SetName (line 15) | func (t *aioTestBareAdaptor) SetName(n string) {}
type aioTestWritten (line 17) | type aioTestWritten struct
type aioTestAdaptor (line 22) | type aioTestAdaptor struct
method AnalogRead (line 49) | func (t *aioTestAdaptor) AnalogRead(pin string) (int, error) {
method AnalogWrite (line 61) | func (t *aioTestAdaptor) AnalogWrite(pin string, val int) error {
method Connect (line 74) | func (t *aioTestAdaptor) Connect() error { return nil }
method Finalize (line 75) | func (t *aioTestAdaptor) Finalize() error { return nil }
method Name (line 76) | func (t *aioTestAdaptor) Name() string { return t.name }
method SetName (line 77) | func (t *aioTestAdaptor) SetName(n string) { t.name = n }
method Port (line 78) | func (t *aioTestAdaptor) Port() string { return t.port }
function newAioTestAdaptor (line 33) | func newAioTestAdaptor() *aioTestAdaptor {
FILE: drivers/aio/temperature_sensor_driver.go
constant kelvinOffset (line 11) | kelvinOffset = 273.15
type TemperatureSensorNtcConf (line 14) | type TemperatureSensorNtcConf struct
method getTemp (line 125) | func (n *TemperatureSensorNtcConf) getTemp(rntc float64) float64 {
method initialize (line 138) | func (n *TemperatureSensorNtcConf) initialize() {
type TemperatureSensorDriver (line 25) | type TemperatureSensorDriver struct
method SetNtcScaler (line 61) | func (t *TemperatureSensorDriver) SetNtcScaler(vRef uint, rOhm uint, r...
method SetLinearScaler (line 69) | func (t *TemperatureSensorDriver) SetLinearScaler(fromMin, fromMax int...
function NewTemperatureSensorDriver (line 34) | func NewTemperatureSensorDriver(a AnalogReader, pin string, opts ...inte...
function TemperatureSensorNtcScaler (line 78) | func TemperatureSensorNtcScaler(
function temperaturSensorGetResistance (line 98) | func temperaturSensorGetResistance(value uint, vRef uint, rSeries uint, ...
FILE: drivers/aio/temperature_sensor_driver_test.go
function TestNewTemperatureSensorDriver (line 14) | func TestNewTemperatureSensorDriver(t *testing.T) {
function TestNewTemperatureSensorDriver_options (line 40) | func TestNewTemperatureSensorDriver_options(t *testing.T) {
function TestTemperatureSensorRead_NtcScaler (line 61) | func TestTemperatureSensorRead_NtcScaler(t *testing.T) {
function TestTemperatureSensorDriver_LinearScaler (line 96) | func TestTemperatureSensorDriver_LinearScaler(t *testing.T) {
function TestTemperatureSensorWithSensorCyclicRead_PublishesTemperatureInCelsius (line 130) | func TestTemperatureSensorWithSensorCyclicRead_PublishesTemperatureInCel...
function TestTemperatureSensorWithSensorCyclicRead_PublishesError (line 173) | func TestTemperatureSensorWithSensorCyclicRead_PublishesError(t *testing...
function TestTemperatureSensorHalt_WithSensorCyclicRead (line 199) | func TestTemperatureSensorHalt_WithSensorCyclicRead(t *testing.T) {
function TestTempDriver_initialize (line 218) | func TestTempDriver_initialize(t *testing.T) {
FILE: drivers/aio/thermalzone_driver.go
type thermalZoneOptionApplier (line 10) | type thermalZoneOptionApplier interface
type thermalZoneConfiguration (line 15) | type thermalZoneConfiguration struct
type thermalZoneUnitscalerOption (line 20) | type thermalZoneUnitscalerOption struct
method apply (line 82) | func (o thermalZoneUnitscalerOption) apply(cfg *thermalZoneConfigurati...
type ThermalZoneDriver (line 25) | type ThermalZoneDriver struct
method thermalZoneRead (line 73) | func (d *ThermalZoneDriver) thermalZoneRead() (int, float64, error) {
function NewThermalZoneDriver (line 38) | func NewThermalZoneDriver(a AnalogReader, zoneID string, opts ...interfa...
function WithFahrenheit (line 66) | func WithFahrenheit() thermalZoneOptionApplier {
FILE: drivers/aio/thermalzone_driver_test.go
function TestNewThermalZoneDriver (line 12) | func TestNewThermalZoneDriver(t *testing.T) {
function TestNewThermalZoneDriver_options (line 42) | func TestNewThermalZoneDriver_options(t *testing.T) {
function TestThermalZoneWithSensorCyclicRead_PublishesTemperatureInFahrenheit (line 67) | func TestThermalZoneWithSensorCyclicRead_PublishesTemperatureInFahrenhei...
FILE: drivers/ble/battery_driver.go
constant batteryCharaShort (line 9) | batteryCharaShort = "2a19"
type BatteryDriver (line 12) | type BatteryDriver struct
method GetBatteryLevel (line 28) | func (d *BatteryDriver) GetBatteryLevel() (uint8, error) {
function NewBatteryDriver (line 18) | func NewBatteryDriver(a gobot.BLEConnector, opts ...OptionApplier) *Batt...
FILE: drivers/ble/battery_driver_test.go
function TestNewBatteryDriver (line 16) | func TestNewBatteryDriver(t *testing.T) {
function TestNewBatteryDriverWithName (line 24) | func TestNewBatteryDriverWithName(t *testing.T) {
function TestBatteryDriverRead (line 36) | func TestBatteryDriverRead(t *testing.T) {
FILE: drivers/ble/ble_driver.go
type OptionApplier (line 11) | type OptionApplier interface
type configuration (line 16) | type configuration struct
type nameOption (line 21) | type nameOption
method apply (line 135) | func (o nameOption) apply(c *configuration) {
type Driver (line 24) | type Driver struct
method Name (line 70) | func (d *Driver) Name() string {
method SetName (line 76) | func (d *Driver) SetName(name string) {
method Connection (line 81) | func (d *Driver) Connection() gobot.Connection {
method Start (line 96) | func (d *Driver) Start() error {
method Halt (line 106) | func (d *Driver) Halt() error {
method Adaptor (line 116) | func (d *Driver) Adaptor() gobot.BLEConnector {
method Mutex (line 130) | func (d *Driver) Mutex() *sync.Mutex {
function NewDriver (line 35) | func NewDriver(
function WithName (line 65) | func WithName(name string) OptionApplier {
FILE: drivers/ble/ble_driver_test.go
function initTestDriver (line 17) | func initTestDriver() *Driver {
function TestNewDriver (line 23) | func TestNewDriver(t *testing.T) {
function TestNewDriverWithName (line 40) | func TestNewDriverWithName(t *testing.T) {
function Test_applyWithName (line 55) | func Test_applyWithName(t *testing.T) {
function TestStart (line 65) | func TestStart(t *testing.T) {
function TestHalt (line 76) | func TestHalt(t *testing.T) {
function TestAdaptor (line 87) | func TestAdaptor(t *testing.T) {
FILE: drivers/ble/device_information_driver.go
constant deviceInformationModelNumberCharaShort (line 10) | deviceInformationModelNumberCharaShort = "2a24"
constant deviceInformationFirmwareRevisionCharaShort (line 11) | deviceInformationFirmwareRevisionCharaShort = "2a26"
constant deviceInformationHardwareRevisionCharaShort (line 12) | deviceInformationHardwareRevisionCharaShort = "2a27"
constant deviceInformationManufacturerNameCharaShort (line 13) | deviceInformationManufacturerNameCharaShort = "2a29"
constant deviceInformationPnPIdCharaShort (line 14) | deviceInformationPnPIdCharaShort = "2a50"
type DeviceInformationDriver (line 18) | type DeviceInformationDriver struct
method GetModelNumber (line 34) | func (d *DeviceInformationDriver) GetModelNumber() (string, error) {
method GetFirmwareRevision (line 45) | func (d *DeviceInformationDriver) GetFirmwareRevision() (string, error) {
method GetHardwareRevision (line 56) | func (d *DeviceInformationDriver) GetHardwareRevision() (string, error) {
method GetManufacturerName (line 67) | func (d *DeviceInformationDriver) GetManufacturerName() (string, error) {
method GetPnPId (line 78) | func (d *DeviceInformationDriver) GetPnPId() (string, error) {
function NewDeviceInformationDriver (line 24) | func NewDeviceInformationDriver(a gobot.BLEConnector, opts ...OptionAppl...
FILE: drivers/ble/device_information_driver_test.go
function TestNewDeviceInformationDriver (line 16) | func TestNewDeviceInformationDriver(t *testing.T) {
function TestNewDeviceInformationDriverWithName (line 24) | func TestNewDeviceInformationDriverWithName(t *testing.T) {
function TestDeviceInformationGetModelNumber (line 36) | func TestDeviceInformationGetModelNumber(t *testing.T) {
function TestDeviceInformationGetFirmwareRevision (line 46) | func TestDeviceInformationGetFirmwareRevision(t *testing.T) {
function TestDeviceInformationGetHardwareRevision (line 56) | func TestDeviceInformationGetHardwareRevision(t *testing.T) {
function TestDeviceInformationGetManufacturerName (line 66) | func TestDeviceInformationGetManufacturerName(t *testing.T) {
function TestDeviceInformationGetPnPId (line 76) | func TestDeviceInformationGetPnPId(t *testing.T) {
FILE: drivers/ble/generic_access_driver.go
constant genericAccessDeviceNameCharaShort (line 11) | genericAccessDeviceNameCharaShort = "2a00"
constant genericAccessAppearanceCharaShort (line 12) | genericAccessAppearanceCharaShort = "2a01"
type GenericAccessDriver (line 16) | type GenericAccessDriver struct
method GetDeviceName (line 32) | func (d *GenericAccessDriver) GetDeviceName() (string, error) {
method GetAppearance (line 44) | func (d *GenericAccessDriver) GetAppearance() (string, error) {
function NewGenericAccessDriver (line 22) | func NewGenericAccessDriver(a gobot.BLEConnector, opts ...OptionApplier)...
FILE: drivers/ble/generic_access_driver_test.go
function TestNewGenericAccessDriver (line 16) | func TestNewGenericAccessDriver(t *testing.T) {
function TestNewGenericAccessDriverWithName (line 24) | func TestNewGenericAccessDriverWithName(t *testing.T) {
function TestGenericAccessDriverGetDeviceName (line 36) | func TestGenericAccessDriverGetDeviceName(t *testing.T) {
function TestGenericAccessDriverGetAppearance (line 46) | func TestGenericAccessDriverGetAppearance(t *testing.T) {
FILE: drivers/ble/microbit/accelerometer_driver.go
constant accelerometerChara (line 13) | accelerometerChara = "e95dca4b251d470aa062fa1922dfa9a8"
constant AccelerometerEvent (line 15) | AccelerometerEvent = "accelerometer"
type AccelerometerDriver (line 19) | type AccelerometerDriver struct
method initialize (line 43) | func (d *AccelerometerDriver) initialize() error {
type AccelerometerData (line 24) | type AccelerometerData struct
function NewAccelerometerDriver (line 31) | func NewAccelerometerDriver(a gobot.BLEConnector, opts ...ble.OptionAppl...
FILE: drivers/ble/microbit/accelerometer_driver_test.go
function TestNewAccelerometerDriver (line 19) | func TestNewAccelerometerDriver(t *testing.T) {
function TestNewAccelerometerDriverWithName (line 26) | func TestNewAccelerometerDriverWithName(t *testing.T) {
function TestAccelerometerStartAndHalt (line 38) | func TestAccelerometerStartAndHalt(t *testing.T) {
function TestAccelerometerReadData (line 44) | func TestAccelerometerReadData(t *testing.T) {
FILE: drivers/ble/microbit/button_driver.go
constant buttonAChara (line 10) | buttonAChara = "e95dda90251d470aa062fa1922dfa9a8"
constant buttonBChara (line 11) | buttonBChara = "e95dda91251d470aa062fa1922dfa9a8"
constant ButtonAEvent (line 13) | ButtonAEvent = "buttonA"
constant ButtonBEvent (line 14) | ButtonBEvent = "buttonB"
type ButtonDriver (line 18) | type ButtonDriver struct
method initialize (line 38) | func (d *ButtonDriver) initialize() error {
function NewButtonDriver (line 24) | func NewButtonDriver(a gobot.BLEConnector, opts ...ble.OptionApplier) *B...
FILE: drivers/ble/microbit/button_driver_test.go
function TestNewButtonDriver (line 18) | func TestNewButtonDriver(t *testing.T) {
function TestNewButtonDriverWithName (line 25) | func TestNewButtonDriverWithName(t *testing.T) {
function TestButtonStartAndHalt (line 37) | func TestButtonStartAndHalt(t *testing.T) {
function TestButtonReadData (line 43) | func TestButtonReadData(t *testing.T) {
FILE: drivers/ble/microbit/io_pin_driver.go
constant pinDataChara (line 16) | pinDataChara = "e95d8d00251d470aa062fa1922dfa9a8"
constant pinADConfigChara (line 17) | pinADConfigChara = "e95d5899251d470aa062fa1922dfa9a8"
constant pinIOConfigChara (line 18) | pinIOConfigChara = "e95db9fe251d470aa062fa1922dfa9a8"
type IOPinDriver (line 22) | type IOPinDriver struct
method initialize (line 48) | func (d *IOPinDriver) initialize() error {
method WritePinData (line 57) | func (d *IOPinDriver) WritePinData(pin string, data byte) error {
method ReadPinADConfig (line 69) | func (d *IOPinDriver) ReadPinADConfig() (int, error) {
method WritePinADConfig (line 84) | func (d *IOPinDriver) WritePinADConfig(config int) error {
method ReadPinIOConfig (line 96) | func (d *IOPinDriver) ReadPinIOConfig() (int, error) {
method WritePinIOConfig (line 112) | func (d *IOPinDriver) WritePinIOConfig(config int) error {
method DigitalRead (line 124) | func (d *IOPinDriver) DigitalRead(pin string) (int, error) {
method DigitalWrite (line 146) | func (d *IOPinDriver) DigitalWrite(pin string, level byte) error {
method AnalogRead (line 163) | func (d *IOPinDriver) AnalogRead(pin string) (int, error) {
method ensureDigital (line 184) | func (d *IOPinDriver) ensureDigital(pin int) error {
method ensureAnalog (line 193) | func (d *IOPinDriver) ensureAnalog(pin int) error {
method ensureInput (line 202) | func (d *IOPinDriver) ensureInput(pin int) error {
method ensureOutput (line 211) | func (d *IOPinDriver) ensureOutput(pin int) error {
method readAllPinData (line 220) | func (d *IOPinDriver) readAllPinData() ([]pinData, error) {
type pinData (line 31) | type pinData struct
function NewIOPinDriver (line 37) | func NewIOPinDriver(a gobot.BLEConnector, opts ...ble.OptionApplier) *IO...
function validatedPin (line 246) | func validatedPin(pin string) (int, error) {
FILE: drivers/ble/microbit/io_pin_driver_test.go
function TestNewIOPinDriver (line 28) | func TestNewIOPinDriver(t *testing.T) {
function TestNewIOPinDriverWithName (line 35) | func TestNewIOPinDriverWithName(t *testing.T) {
function TestIOPinStartAndHalt (line 47) | func TestIOPinStartAndHalt(t *testing.T) {
function TestIOPinStartError (line 57) | func TestIOPinStartError(t *testing.T) {
function TestIOPinDigitalRead (line 66) | func TestIOPinDigitalRead(t *testing.T) {
function TestIOPinDigitalReadInvalidPin (line 82) | func TestIOPinDigitalReadInvalidPin(t *testing.T) {
function TestIOPinDigitalWrite (line 93) | func TestIOPinDigitalWrite(t *testing.T) {
function TestIOPinDigitalWriteInvalidPin (line 101) | func TestIOPinDigitalWriteInvalidPin(t *testing.T) {
function TestIOPinAnalogRead (line 109) | func TestIOPinAnalogRead(t *testing.T) {
function TestIOPinAnalogReadInvalidPin (line 125) | func TestIOPinAnalogReadInvalidPin(t *testing.T) {
function TestIOPinDigitalAnalogRead (line 136) | func TestIOPinDigitalAnalogRead(t *testing.T) {
function TestIOPinDigitalWriteAnalogRead (line 152) | func TestIOPinDigitalWriteAnalogRead(t *testing.T) {
function TestIOPinAnalogReadDigitalWrite (line 166) | func TestIOPinAnalogReadDigitalWrite(t *testing.T) {
FILE: drivers/ble/microbit/led_driver.go
constant ledMatrixStateChara (line 10) | ledMatrixStateChara = "e95d7b77251d470aa062fa1922dfa9a8"
constant ledTextChara (line 11) | ledTextChara = "e95d93ee251d470aa062fa1922dfa9a8"
constant ledScrollingDelayChara (line 12) | ledScrollingDelayChara = "e95d0d2d251d470aa062fa1922dfa9a8"
type LEDDriver (line 16) | type LEDDriver struct
method ReadMatrix (line 33) | func (b *LEDDriver) ReadMatrix() ([]byte, error) {
method WriteMatrix (line 38) | func (b *LEDDriver) WriteMatrix(data []byte) error {
method WriteText (line 43) | func (b *LEDDriver) WriteText(msg string) error {
method ReadScrollingDelay (line 47) | func (b *LEDDriver) ReadScrollingDelay() (uint16, error) {
method WriteScrollingDelay (line 51) | func (b *LEDDriver) WriteScrollingDelay(delay uint16) error {
method Blank (line 57) | func (b *LEDDriver) Blank() error {
method Solid (line 63) | func (b *LEDDriver) Solid() error {
method UpRightArrow (line 69) | func (b *LEDDriver) UpRightArrow() error {
method UpLeftArrow (line 75) | func (b *LEDDriver) UpLeftArrow() error {
method DownRightArrow (line 81) | func (b *LEDDriver) DownRightArrow() error {
method DownLeftArrow (line 87) | func (b *LEDDriver) DownLeftArrow() error {
method Dimond (line 93) | func (b *LEDDriver) Dimond() error {
method Smile (line 99) | func (b *LEDDriver) Smile() error {
method Wink (line 105) | func (b *LEDDriver) Wink() error {
function NewLEDDriver (line 22) | func NewLEDDriver(a gobot.BLEConnector, opts ...ble.OptionApplier) *LEDD...
FILE: drivers/ble/microbit/led_driver_test.go
function initTestLEDDriver (line 17) | func initTestLEDDriver() *LEDDriver {
function TestNewLEDDriver (line 22) | func TestNewLEDDriver(t *testing.T) {
function TestNewLEDDriverWithName (line 29) | func TestNewLEDDriverWithName(t *testing.T) {
function TestLEDWriteMatrix (line 41) | func TestLEDWriteMatrix(t *testing.T) {
function TestLEDWriteText (line 46) | func TestLEDWriteText(t *testing.T) {
function TestLEDCommands (line 51) | func TestLEDCommands(t *testing.T) {
FILE: drivers/ble/microbit/magnetometer_driver.go
constant magnetometerChara (line 13) | magnetometerChara = "e95dfb11251d470aa062fa1922dfa9a8"
constant MagnetometerEvent (line 15) | MagnetometerEvent = "magnetometer"
type MagnetometerDriver (line 19) | type MagnetometerDriver struct
method initialize (line 43) | func (d *MagnetometerDriver) initialize() error {
type MagnetometerData (line 24) | type MagnetometerData struct
function NewMagnetometerDriver (line 31) | func NewMagnetometerDriver(a gobot.BLEConnector, opts ...ble.OptionAppli...
FILE: drivers/ble/microbit/magnetometer_driver_test.go
function initTestMagnetometerDriver (line 19) | func initTestMagnetometerDriver() *MagnetometerDriver {
function TestMagnetometerDriver (line 24) | func TestMagnetometerDriver(t *testing.T) {
function TestNewMagnetometerDriverWithName (line 31) | func TestNewMagnetometerDriverWithName(t *testing.T) {
function TestMagnetometerStartAndHalt (line 43) | func TestMagnetometerStartAndHalt(t *testing.T) {
function TestMagnetometerReadData (line 49) | func TestMagnetometerReadData(t *testing.T) {
FILE: drivers/ble/microbit/temperature_driver.go
constant temperatureChara (line 12) | temperatureChara = "e95d9250251d470aa062fa1922dfa9a8"
constant TemperatureEvent (line 14) | TemperatureEvent = "temperature"
type TemperatureDriver (line 18) | type TemperatureDriver struct
method initialize (line 36) | func (d *TemperatureDriver) initialize() error {
function NewTemperatureDriver (line 24) | func NewTemperatureDriver(a gobot.BLEConnector, opts ...ble.OptionApplie...
FILE: drivers/ble/microbit/temperature_driver_test.go
function initTestTemperatureDriver (line 18) | func initTestTemperatureDriver() *TemperatureDriver {
function TestNewTemperatureDriver (line 23) | func TestNewTemperatureDriver(t *testing.T) {
function TestNewTemperatureDriverWithName (line 30) | func TestNewTemperatureDriverWithName(t *testing.T) {
function TestTemperatureStartAndHalt (line 42) | func TestTemperatureStartAndHalt(t *testing.T) {
function TestTemperatureReadData (line 48) | func TestTemperatureReadData(t *testing.T) {
FILE: drivers/ble/parrot/minidrone_driver.go
constant pcmdChara (line 20) | pcmdChara = "9a66fa0a0800919111e4012d1540cb8e"
constant commandChara (line 21) | commandChara = "9a66fa0b0800919111e4012d1540cb8e"
constant priorityChara (line 22) | priorityChara = "9a66fa0c0800919111e4012d1540cb8e"
constant flightStatusChara (line 25) | flightStatusChara = "9a66fb0e0800919111e4012d1540cb8e"
constant batteryChara (line 26) | batteryChara = "9a66fb0f0800919111e4012d1540cb8e"
constant flatTrimChanged (line 29) | flatTrimChanged = 0
constant flyingStateChanged (line 30) | flyingStateChanged = 1
constant flyingStateLanded (line 33) | flyingStateLanded = 0
constant flyingStateTakeoff (line 34) | flyingStateTakeoff = 1
constant flyingStateHovering (line 35) | flyingStateHovering = 2
constant flyingStateFlying (line 36) | flyingStateFlying = 3
constant flyingStateLanding (line 37) | flyingStateLanding = 4
constant flyingStateEmergency (line 38) | flyingStateEmergency = 5
constant flyingStateRolling (line 39) | flyingStateRolling = 6
constant BatteryEvent (line 41) | BatteryEvent = "battery"
constant FlightStatusEvent (line 42) | FlightStatusEvent = "flightstatus"
constant TakeoffEvent (line 43) | TakeoffEvent = "takeoff"
constant HoveringEvent (line 44) | HoveringEvent = "hovering"
constant FlyingEvent (line 45) | FlyingEvent = "flying"
constant LandingEvent (line 46) | LandingEvent = "landing"
constant LandedEvent (line 47) | LandedEvent = "landed"
constant EmergencyEvent (line 48) | EmergencyEvent = "emergency"
constant RollingEvent (line 49) | RollingEvent = "rolling"
constant FlatTrimChangeEvent (line 50) | FlatTrimChangeEvent = "flattrimchange"
constant LightFixed (line 53) | LightFixed = 0
constant LightBlinked (line 54) | LightBlinked = 1
constant LightOscillated (line 55) | LightOscillated = 3
constant ClawOpen (line 58) | ClawOpen = 0
constant ClawClosed (line 59) | ClawClosed = 1
type MinidroneDriver (line 63) | type MinidroneDriver struct
method GenerateAllStates (line 113) | func (d *MinidroneDriver) GenerateAllStates() error {
method TakeOff (line 122) | func (d *MinidroneDriver) TakeOff() error {
method Land (line 129) | func (d *MinidroneDriver) Land() error {
method FlatTrim (line 136) | func (d *MinidroneDriver) FlatTrim() error {
method Emergency (line 143) | func (d *MinidroneDriver) Emergency() error {
method TakePicture (line 150) | func (d *MinidroneDriver) TakePicture() error {
method StartPcmd (line 157) | func (d *MinidroneDriver) StartPcmd() {
method Up (line 172) | func (d *MinidroneDriver) Up(val int) error {
method Down (line 182) | func (d *MinidroneDriver) Down(val int) error {
method Forward (line 192) | func (d *MinidroneDriver) Forward(val int) error {
method Backward (line 202) | func (d *MinidroneDriver) Backward(val int) error {
method Right (line 212) | func (d *MinidroneDriver) Right(val int) error {
method Left (line 222) | func (d *MinidroneDriver) Left(val int) error {
method Clockwise (line 232) | func (d *MinidroneDriver) Clockwise(val int) error {
method CounterClockwise (line 243) | func (d *MinidroneDriver) CounterClockwise(val int) error {
method Stop (line 253) | func (d *MinidroneDriver) Stop() error {
method StartRecording (line 270) | func (d *MinidroneDriver) StartRecording() error {
method StopRecording (line 275) | func (d *MinidroneDriver) StopRecording() error {
method HullProtection (line 280) | func (d *MinidroneDriver) HullProtection(protect bool) error {
method Outdoor (line 285) | func (d *MinidroneDriver) Outdoor(outdoor bool) error {
method FrontFlip (line 290) | func (d *MinidroneDriver) FrontFlip() error {
method BackFlip (line 295) | func (d *MinidroneDriver) BackFlip() error {
method RightFlip (line 300) | func (d *MinidroneDriver) RightFlip() error {
method LeftFlip (line 305) | func (d *MinidroneDriver) LeftFlip() error {
method LightControl (line 317) | func (d *MinidroneDriver) LightControl(id uint8, mode uint8, intensity...
method ClawControl (line 328) | func (d *MinidroneDriver) ClawControl(id uint8, mode uint8) error {
method GunControl (line 338) | func (d *MinidroneDriver) GunControl(id uint8) error {
method initialize (line 345) | func (d *MinidroneDriver) initialize() error {
method shutdown (line 376) | func (d *MinidroneDriver) shutdown() error {
method generateAnimation (line 382) | func (d *MinidroneDriver) generateAnimation(direction int8) *bytes.Buf...
method generatePcmd (line 388) | func (d *MinidroneDriver) generatePcmd() *bytes.Buffer {
method processFlightStatus (line 447) | func (d *MinidroneDriver) processFlightStatus(data []byte) {
type Pcmd (line 75) | type Pcmd struct
function NewMinidroneDriver (line 85) | func NewMinidroneDriver(a gobot.BLEConnector, opts ...ble.OptionApplier)...
function ValidatePitch (line 491) | func ValidatePitch(data float64, offset float64) int {
function validatePitch (line 502) | func validatePitch(val int) int {
FILE: drivers/ble/parrot/minidrone_driver_test.go
function initTestMinidroneDriver (line 17) | func initTestMinidroneDriver() *MinidroneDriver {
function TestNewMinidroneDriver (line 25) | func TestNewMinidroneDriver(t *testing.T) {
function TestNewMinidroneDriverWithName (line 31) | func TestNewMinidroneDriverWithName(t *testing.T) {
function TestMinidroneHalt (line 43) | func TestMinidroneHalt(t *testing.T) {
function TestMinidroneTakeoff (line 48) | func TestMinidroneTakeoff(t *testing.T) {
function TestMinidroneEmergency (line 53) | func TestMinidroneEmergency(t *testing.T) {
function TestMinidroneTakePicture (line 58) | func TestMinidroneTakePicture(t *testing.T) {
function TestMinidroneUp (line 63) | func TestMinidroneUp(t *testing.T) {
function TestMinidroneUpTooFar (line 68) | func TestMinidroneUpTooFar(t *testing.T) {
function TestMinidroneDown (line 74) | func TestMinidroneDown(t *testing.T) {
function TestMinidroneForward (line 79) | func TestMinidroneForward(t *testing.T) {
function TestMinidroneBackward (line 84) | func TestMinidroneBackward(t *testing.T) {
function TestMinidroneRight (line 89) | func TestMinidroneRight(t *testing.T) {
function TestMinidroneLeft (line 94) | func TestMinidroneLeft(t *testing.T) {
function TestMinidroneClockwise (line 99) | func TestMinidroneClockwise(t *testing.T) {
function TestMinidroneCounterClockwise (line 104) | func TestMinidroneCounterClockwise(t *testing.T) {
function TestMinidroneStop (line 109) | func TestMinidroneStop(t *testing.T) {
function TestMinidroneStartStopRecording (line 114) | func TestMinidroneStartStopRecording(t *testing.T) {
function TestMinidroneHullProtectionOutdoor (line 120) | func TestMinidroneHullProtectionOutdoor(t *testing.T) {
function TestMinidroneHullFlips (line 126) | func TestMinidroneHullFlips(t *testing.T) {
function TestMinidroneLightControl (line 134) | func TestMinidroneLightControl(t *testing.T) {
function TestMinidroneClawControl (line 139) | func TestMinidroneClawControl(t *testing.T) {
function TestMinidroneGunControl (line 144) | func TestMinidroneGunControl(t *testing.T) {
function TestMinidroneProcessFlightData (line 149) | func TestMinidroneProcessFlightData(t *testing.T) {
function TestMinidroneValidatePitchWhenEqualOffset (line 169) | func TestMinidroneValidatePitchWhenEqualOffset(t *testing.T) {
function TestMinidroneValidatePitchWhenTiny (line 173) | func TestMinidroneValidatePitchWhenTiny(t *testing.T) {
function TestMinidroneValidatePitchWhenCentered (line 177) | func TestMinidroneValidatePitchWhenCentered(t *testing.T) {
FILE: drivers/ble/serial_port.go
type SerialPortDriver (line 11) | type SerialPortDriver struct
method Open (line 33) | func (p *SerialPortDriver) Open() error {
method Read (line 47) | func (p *SerialPortDriver) Read(b []byte) (int, error) {
method Write (line 71) | func (p *SerialPortDriver) Write(b []byte) (int, error) {
method Close (line 78) | func (p *SerialPortDriver) Close() error {
method Address (line 83) | func (p *SerialPortDriver) Address() string {
function NewSerialPortDriver (line 22) | func NewSerialPortDriver(a gobot.BLEConnector, rid string, tid string, o...
FILE: drivers/ble/serial_port_test.go
function TestNewSerialPortDriver (line 19) | func TestNewSerialPortDriver(t *testing.T) {
function TestNewSerialPortDriverWithName (line 24) | func TestNewSerialPortDriverWithName(t *testing.T) {
function TestSerialPortOpen (line 36) | func TestSerialPortOpen(t *testing.T) {
function TestSerialPortRead (line 75) | func TestSerialPortRead(t *testing.T) {
function TestSerialPortWrite (line 128) | func TestSerialPortWrite(t *testing.T) {
function TestSerialPortClose (line 181) | func TestSerialPortClose(t *testing.T) {
FILE: drivers/ble/sphero/sphero_bb8_driver.go
type BB8Driver (line 10) | type BB8Driver struct
function NewBB8Driver (line 15) | func NewBB8Driver(a gobot.BLEConnector, opts ...ble.OptionApplier) *BB8D...
function bb8DefaultCollisionConfig (line 20) | func bb8DefaultCollisionConfig() spherocommon.CollisionConfig {
FILE: drivers/ble/sphero/sphero_bb8_driver_test.go
function TestNewBB8Driver (line 16) | func TestNewBB8Driver(t *testing.T) {
function TestNewBB8DriverWithName (line 24) | func TestNewBB8DriverWithName(t *testing.T) {
FILE: drivers/ble/sphero/sphero_ollie_driver.go
type MotorModes (line 15) | type MotorModes
constant Off (line 19) | Off MotorModes = iota
constant Forward (line 20) | Forward
constant Reverse (line 21) | Reverse
constant Brake (line 22) | Brake
constant Ignore (line 23) | Ignore
constant wakeChara (line 30) | wakeChara = "22bb746f2bbf75542d6f726568705327"
constant txPowerChara (line 31) | txPowerChara = "22bb746f2bb275542d6f726568705327"
constant antiDosChara (line 32) | antiDosChara = "22bb746f2bbd75542d6f726568705327"
constant commandsChara (line 33) | commandsChara = "22bb746f2ba175542d6f726568705327"
constant responseChara (line 34) | responseChara = "22bb746f2ba675542d6f726568705327"
constant packetHeaderSize (line 37) | packetHeaderSize = 5
constant responsePacketMaxSize (line 40) | responsePacketMaxSize = 20
constant collisionDataSize (line 43) | collisionDataSize = 17
constant collisionResponseSize (line 46) | collisionResponseSize = packetHeaderSize + collisionDataSize
type packet (line 50) | type packet struct
type Point2D (line 57) | type Point2D struct
type OllieDriver (line 63) | type OllieDriver struct
method SetTXPower (line 100) | func (d *OllieDriver) SetTXPower(level int) error {
method Wake (line 111) | func (d *OllieDriver) Wake() error {
method ConfigureCollisionDetection (line 122) | func (d *OllieDriver) ConfigureCollisionDetection(cc spherocommon.Coll...
method GetLocatorData (line 127) | func (d *OllieDriver) GetLocatorData(f func(p Point2D)) {
method GetPowerState (line 134) | func (d *OllieDriver) GetPowerState(f func(p spherocommon.PowerStatePa...
method SetRGB (line 141) | func (d *OllieDriver) SetRGB(r uint8, g uint8, b uint8) {
method Roll (line 146) | func (d *OllieDriver) Roll(speed uint8, heading uint16) {
method Boost (line 153) | func (d *OllieDriver) Boost(state bool) {
method SetStabilization (line 162) | func (d *OllieDriver) SetStabilization(state bool) {
method SetRotationRate (line 173) | func (d *OllieDriver) SetRotationRate(speed uint8) {
method SetRawMotorValues (line 179) | func (d *OllieDriver) SetRawMotorValues(lmode MotorModes, lpower uint8...
method SetBackLEDBrightness (line 184) | func (d *OllieDriver) SetBackLEDBrightness(value uint8) {
method Stop (line 189) | func (d *OllieDriver) Stop() {
method Sleep (line 194) | func (d *OllieDriver) Sleep() {
method SetDataStreamingConfig (line 199) | func (d *OllieDriver) SetDataStreamingConfig(dsc spherocommon.DataStre...
method initialize (line 209) | func (d *OllieDriver) initialize() error {
method antiDOSOff (line 242) | func (d *OllieDriver) antiDOSOff() error {
method writeCommand (line 254) | func (d *OllieDriver) writeCommand(packet *packet) error {
method enableStopOnDisconnect (line 270) | func (d *OllieDriver) enableStopOnDisconnect() {
method shutdown (line 275) | func (d *OllieDriver) shutdown() error {
method handleResponses (line 282) | func (d *OllieDriver) handleResponses(data []byte) {
method handleDataStreaming (line 319) | func (d *OllieDriver) handleDataStreaming(data []byte) {
method handleLocatorDetected (line 336) | func (d *OllieDriver) handleLocatorDetected(data []uint8) {
method handlePowerStateDetected (line 363) | func (d *OllieDriver) handlePowerStateDetected(data []uint8) {
method handleCollisionDetected (line 373) | func (d *OllieDriver) handleCollisionDetected(data []uint8) {
method sendCraftPacket (line 414) | func (d *OllieDriver) sendCraftPacket(body []uint8, did byte, cid byte) {
method craftPacket (line 418) | func (d *OllieDriver) craftPacket(body []uint8, did byte, cid byte) *p...
function NewOllieDriver (line 78) | func NewOllieDriver(a gobot.BLEConnector, opts ...ble.OptionApplier) *Ol...
function newOllieBaseDriver (line 82) | func newOllieBaseDriver(
function ollieDefaultCollisionConfig (line 433) | func ollieDefaultCollisionConfig() spherocommon.CollisionConfig {
FILE: drivers/ble/sphero/sphero_ollie_driver_test.go
function initTestOllieDriver (line 20) | func initTestOllieDriver() *OllieDriver {
function TestNewOllieDriver (line 25) | func TestNewOllieDriver(t *testing.T) {
function TestNewOllieDriverWithName (line 33) | func TestNewOllieDriverWithName(t *testing.T) {
function TestOllieStartAndHalt (line 45) | func TestOllieStartAndHalt(t *testing.T) {
function TestLocatorData (line 51) | func TestLocatorData(t *testing.T) {
function TestDataStreaming (line 82) | func TestDataStreaming(t *testing.T) {
FILE: drivers/ble/sphero/sphero_sprkplus_driver.go
type SPRKPlusDriver (line 10) | type SPRKPlusDriver struct
function NewSPRKPlusDriver (line 15) | func NewSPRKPlusDriver(a gobot.BLEConnector, opts ...ble.OptionApplier) ...
function sprkplusDefaultCollisionConfig (line 20) | func sprkplusDefaultCollisionConfig() spherocommon.CollisionConfig {
FILE: drivers/ble/sphero/sphero_sprkplus_driver_test.go
function TestNewSPRKPlusDriver (line 16) | func TestNewSPRKPlusDriver(t *testing.T) {
function TestNewSPRKPlusDriverWithName (line 24) | func TestNewSPRKPlusDriverWithName(t *testing.T) {
FILE: drivers/ble/testutil/testutil.go
type bleTestClientAdaptor (line 12) | type bleTestClientAdaptor struct
method SubscribeCharaUUID (line 39) | func (t *bleTestClientAdaptor) SubscribeCharaUUID() string {
method SetReadCharacteristicTestFunc (line 43) | func (t *bleTestClientAdaptor) SetReadCharacteristicTestFunc(f func(cU...
method SetWriteCharacteristicTestFunc (line 49) | func (t *bleTestClientAdaptor) SetWriteCharacteristicTestFunc(f func(c...
method SetSimulateConnectError (line 55) | func (t *bleTestClientAdaptor) SetSimulateConnectError(val bool) {
method SetSimulateSubscribeError (line 59) | func (t *bleTestClientAdaptor) SetSimulateSubscribeError(val bool) {
method SetSimulateDisconnectError (line 63) | func (t *bleTestClientAdaptor) SetSimulateDisconnectError(val bool) {
method SendTestDataToSubscriber (line 67) | func (t *bleTestClientAdaptor) SendTestDataToSubscriber(data []byte) {
method Connect (line 73) | func (t *bleTestClientAdaptor) Connect() error {
method Reconnect (line 80) | func (t *bleTestClientAdaptor) Reconnect() error { return nil }
method Disconnect (line 82) | func (t *bleTestClientAdaptor) Disconnect() error {
method Finalize (line 89) | func (t *bleTestClientAdaptor) Finalize() error { return nil }
method Name (line 90) | func (t *bleTestClientAdaptor) Name() string { return t.n...
method SetName (line 91) | func (t *bleTestClientAdaptor) SetName(n string) { t.name = n }
method Address (line 92) | func (t *bleTestClientAdaptor) Address() string { return t.a...
method WithoutResponses (line 93) | func (t *bleTestClientAdaptor) WithoutResponses(use bool) { t.withoutR...
method ReadCharacteristic (line 95) | func (t *bleTestClientAdaptor) ReadCharacteristic(cUUID string) ([]byt...
method WriteCharacteristic (line 101) | func (t *bleTestClientAdaptor) WriteCharacteristic(cUUID string, data ...
method Subscribe (line 107) | func (t *bleTestClientAdaptor) Subscribe(cUUID string, f func(data []b...
function NewBleTestAdaptor (line 27) | func NewBleTestAdaptor() *bleTestClientAdaptor {
FILE: drivers/common/bit/bit.go
function Set (line 4) | func Set(n int, pos uint8) int {
function Clear (line 10) | func Clear(n int, pos uint8) int {
function IsSet (line 17) | func IsSet(n int, pos uint8) bool {
FILE: drivers/common/bit/bit_test.go
function TestSet (line 10) | func TestSet(t *testing.T) {
function TestClear (line 23) | func TestClear(t *testing.T) {
FILE: drivers/common/mfrc522/mfrc522_connectionwrapper.go
method readByteData (line 5) | func (d *MFRC522Common) readByteData(reg uint8) (uint8, error) {
method writeByteData (line 12) | func (d *MFRC522Common) writeByteData(reg uint8, data uint8) error {
method setRegisterBitMask (line 19) | func (d *MFRC522Common) setRegisterBitMask(reg uint8, mask uint8) error {
method clearRegisterBitMask (line 30) | func (d *MFRC522Common) clearRegisterBitMask(reg uint8, mask uint8) error {
FILE: drivers/common/mfrc522/mfrc522_pcd.go
constant pcdDebug (line 12) | pcdDebug = false
constant initTime (line 13) | initTime = 50 * time.Millisecond
constant antennaOnTime (line 15) | antennaOnTime = 10 * time.Millisecond
type busConnection (line 18) | type busConnection interface
type MFRC522Common (line 37) | type MFRC522Common struct
method Initialize (line 54) | func (d *MFRC522Common) Initialize(c busConnection) error {
method PrintReaderVersion (line 89) | func (d *MFRC522Common) PrintReaderVersion() error {
method getVersion (line 98) | func (d *MFRC522Common) getVersion() (uint8, error) {
method switchAntenna (line 102) | func (d *MFRC522Common) switchAntenna(targetState bool) error {
method setAntennaGain (line 131) | func (d *MFRC522Common) setAntennaGain(val uint8) error {
method softReset (line 135) | func (d *MFRC522Common) softReset() error {
method stopCrypto1 (line 155) | func (d *MFRC522Common) stopCrypto1() error {
method communicateWithPICC (line 159) | func (d *MFRC522Common) communicateWithPICC(command uint8, sendData []...
method calculateCRC (line 282) | func (d *MFRC522Common) calculateCRC(data []byte, result []byte) error {
method writeFifo (line 326) | func (d *MFRC522Common) writeFifo(fifoData []byte) error {
method readFifo (line 336) | func (d *MFRC522Common) readFifo(backData []byte) (uint8, error) {
method getFirstError (line 366) | func (d *MFRC522Common) getFirstError(errorRegValue uint8) error {
function NewMFRC522Common (line 48) | func NewMFRC522Common() *MFRC522Common {
FILE: drivers/common/mfrc522/mfrc522_pcd_register.go
constant regCommand (line 7) | regCommand = 0x01
constant commandRegIdle (line 10) | commandRegIdle = 0x00
constant commandRegMem (line 11) | commandRegMem = 0x01
constant commandRegGenerateRandomID (line 12) | commandRegGenerateRandomID = 0x02
constant commandRegCalcCRC (line 13) | commandRegCalcCRC = 0x03
constant commandRegTransmit (line 14) | commandRegTransmit = 0x04
constant commandRegTransceive (line 19) | commandRegTransceive = 0x0C
constant commandRegMFAuthent (line 21) | commandRegMFAuthent = 0x0E
constant commandRegSoftReset (line 22) | commandRegSoftReset = 0x0F
constant commandRegPowerDownBit (line 25) | commandRegPowerDownBit = 0x10
constant commandRegRcvOffBit (line 26) | commandRegRcvOffBit = 0x20
constant regComIEn (line 31) | regComIEn = 0x02
constant comIEnRegReset (line 33) | comIEnRegReset = 0x80
constant comIEnRegTimerIEnBit (line 34) | comIEnRegTimerIEnBit = 0x01
constant comIEnRegErrIEnBit (line 35) | comIEnRegErrIEnBit = 0x02
constant comIEnRegLoAlertIEnBit (line 36) | comIEnRegLoAlertIEnBit = 0x04
constant comIEnRegHiAlertIEnBit (line 37) | comIEnRegHiAlertIEnBit = 0x08
constant comIEnRegIdleIEnBit (line 38) | comIEnRegIdleIEnBit = 0x10
constant comIEnRegRxIEnBit (line 39) | comIEnRegRxIEnBit = 0x20
constant comIEnRegTxIEnBit (line 40) | comIEnRegTxIEnBit = 0x40
constant comIEnRegIRqInv (line 44) | comIEnRegIRqInv = 0x80
constant regComIrq (line 53) | regComIrq = 0x04
constant comIrqRegReset (line 55) | comIrqRegReset = 0x14
constant comIrqRegClearAll (line 56) | comIrqRegClearAll = 0x7F
constant comIrqRegTimerIRqBit (line 57) | comIrqRegTimerIRqBit = 0x01
constant comIrqRegErrIRq1anyBit (line 58) | comIrqRegErrIRq1anyBit = 0x02
constant comIrqRegIdleIRqBit (line 68) | comIrqRegIdleIRqBit = 0x10
constant comIrqRegRxIRqBit (line 71) | comIrqRegRxIRqBit = 0x20
constant comIrqRegTxIRqBit (line 72) | comIrqRegTxIRqBit = 0x40
constant regDivIrq (line 79) | regDivIrq = 0x05
constant divIrqRegCRCIRqBit (line 83) | divIrqRegCRCIRqBit = 0x04
constant regError (line 94) | regError = 0x06
constant errorRegProtocolErrBit (line 100) | errorRegProtocolErrBit = 0x01
constant errorRegParityErrBit (line 102) | errorRegParityErrBit = 0x02
constant errorRegCRCErrBit (line 105) | errorRegCRCErrBit = 0x04
constant errorRegCollErrBit (line 108) | errorRegCollErrBit = 0x08
constant errorRegBufferOvflBit (line 111) | errorRegBufferOvflBit = 0x10
constant errorRegTempErrBit (line 114) | errorRegTempErrBit = 0x40
constant errorRegWrErrBit (line 118) | errorRegWrErrBit = 0x80
constant regStatus2 (line 127) | regStatus2 = 0x08
constant status2RegMFCrypto1OnBit (line 142) | status2RegMFCrypto1OnBit = 0x08
constant regFIFOData (line 151) | regFIFOData = 0x09
constant regFIFOLevel (line 155) | regFIFOLevel = 0x0A
constant fifoLevelRegFlushBufferBit (line 163) | fifoLevelRegFlushBufferBit = 0x80
constant regControl (line 172) | regControl = 0x0C
constant controlRegRxLastBits (line 177) | controlRegRxLastBits = 0x07
constant regBitFraming (line 184) | regBitFraming = 0x0D
constant bitFramingRegReset (line 186) | bitFramingRegReset = 0x00
constant bitFramingRegTxLastBits (line 189) | bitFramingRegTxLastBits = 0x07
constant bitFramingRegStartSendBit (line 200) | bitFramingRegStartSendBit = 0x80
constant regColl (line 204) | regColl = 0x0E
constant collRegValuesAfterCollBit (line 217) | collRegValuesAfterCollBit = 0x80
constant regMode (line 225) | regMode = 0x11
constant modeRegCRCPreset0000 (line 231) | modeRegCRCPreset0000 = 0x00
constant modeRegCRCPreset6363 (line 232) | modeRegCRCPreset6363 = 0x01
constant modeRegCRCPresetA671 (line 233) | modeRegCRCPresetA671 = 0x10
constant modeRegCRCPresetFFFF (line 234) | modeRegCRCPresetFFFF = 0x11
constant modeRegPolMFinBit (line 238) | modeRegPolMFinBit = 0x08
constant modeRegTxWaitRFBit (line 240) | modeRegTxWaitRFBit = 0x20
constant regTxMode (line 248) | regTxMode = 0x12
constant regRxMode (line 249) | regRxMode = 0x13
constant rxtxModeRegReset (line 251) | rxtxModeRegReset = 0x00
constant regTxControl (line 281) | regTxControl = 0x14
constant txControlRegTx1RFEn1outputBit (line 285) | txControlRegTx1RFEn1outputBit = 0x01
constant txControlRegTx2RFEn1outputBit (line 287) | txControlRegTx2RFEn1outputBit = 0x02
constant regTxASK (line 299) | regTxASK = 0x15
constant txASKRegForce100ASKBit (line 303) | txASKRegForce100ASKBit = 0x40
constant regCRCResultH (line 321) | regCRCResultH = 0x21
constant regCRCResultL (line 322) | regCRCResultL = 0x22
constant regModWidth (line 327) | regModWidth = 0x24
constant modWidthRegReset (line 329) | modWidthRegReset = 0x26
constant regRFCfg (line 335) | regRFCfg = 0x26
constant rfcCfgRegRxGain18dB (line 340) | rfcCfgRegRxGain18dB = 0x00
constant rfcCfgRegRxGain23dB (line 341) | rfcCfgRegRxGain23dB = 0x10
constant rfcCfgRegRxGain018dB (line 342) | rfcCfgRegRxGain018dB = 0x20
constant rfcCfgRegRxGain023dB (line 343) | rfcCfgRegRxGain023dB = 0x30
constant rfcCfgRegRxGain33dB (line 344) | rfcCfgRegRxGain33dB = 0x40
constant rfcCfgRegRxGain38dB (line 345) | rfcCfgRegRxGain38dB = 0x50
constant rfcCfgRegRxGain43dB (line 346) | rfcCfgRegRxGain43dB = 0x60
constant rfcCfgRegRxGain48dB (line 347) | rfcCfgRegRxGain48dB = 0x70
constant regTMode (line 359) | regTMode = 0x2A
constant regTPrescaler (line 360) | regTPrescaler = 0x2B
constant tModeRegTAutoBit (line 368) | tModeRegTAutoBit = 0x80
constant regTReloadH (line 393) | regTReloadH = 0x2C
constant regTReloadL (line 394) | regTReloadL = 0x2D
constant tReloadRegReset (line 396) | tReloadRegReset = 0x0000
constant tReloadRegValue25ms (line 397) | tReloadRegValue25ms = 0x03E8
constant tReloadRegValue833ms (line 398) | tReloadRegValue833ms = 0x001E
constant regTestSel1 (line 408) | regTestSel1 = 0x31
constant regTestSel2 (line 409) | regTestSel2 = 0x32
constant regTestPinEn (line 410) | regTestPinEn = 0x33
constant regTestPinValue (line 411) | regTestPinValue = 0x34
constant regTestBus (line 412) | regTestBus = 0x35
constant regAutoTest (line 413) | regAutoTest = 0x36
constant regVersion (line 414) | regVersion = 0x37
constant regAnalogTest (line 415) | regAnalogTest = 0x38
constant regTestDAC1 (line 416) | regTestDAC1 = 0x39
constant regTestDAC2 (line 417) | regTestDAC2 = 0x3A
constant regTestADC (line 418) | regTestADC = 0x3B
FILE: drivers/common/mfrc522/mfrc522_pcd_test.go
type busConnMock (line 10) | type busConnMock struct
method ReadByteData (line 18) | func (c *busConnMock) ReadByteData(reg uint8) (uint8, error) {
method WriteByteData (line 36) | func (c *busConnMock) WriteByteData(reg uint8, data byte) error {
function initTestMFRC522CommonWithStubbedConnector (line 42) | func initTestMFRC522CommonWithStubbedConnector() (*MFRC522Common, *busCo...
function TestNewMFRC522Common (line 49) | func TestNewMFRC522Common(t *testing.T) {
function TestInitialize (line 56) | func TestInitialize(t *testing.T) {
function Test_getVersion (line 77) | func Test_getVersion(t *testing.T) {
function Test_switchAntenna (line 91) | func Test_switchAntenna(t *testing.T) {
function Test_stopCrypto1 (line 132) | func Test_stopCrypto1(t *testing.T) {
function Test_communicateWithPICC (line 144) | func Test_communicateWithPICC(t *testing.T) {
function Test_calculateCRC (line 174) | func Test_calculateCRC(t *testing.T) {
function Test_writeFifo (line 195) | func Test_writeFifo(t *testing.T) {
function Test_readFifo (line 207) | func Test_readFifo(t *testing.T) {
FILE: drivers/common/mfrc522/mfrc522_picc.go
constant piccDebug (line 8) | piccDebug = false
constant piccCommandRequestA (line 13) | piccCommandRequestA = 0x26
constant piccCommandWakeUpA (line 14) | piccCommandWakeUpA = 0x52
constant piccCommandCascadeLevel1 (line 16) | piccCommandCascadeLevel1 = 0x93
constant piccCommandCascadeLevel2 (line 17) | piccCommandCascadeLevel2 = 0x95
constant piccCommandCascadeLevel3 (line 18) | piccCommandCascadeLevel3 = 0x97
constant piccCascadeTag (line 19) | piccCascadeTag = 0x88
constant piccUIDNotComplete (line 20) | piccUIDNotComplete = 0x04
constant piccCommandHLTA (line 22) | piccCommandHLTA = 0x50
constant piccCommandRATS (line 23) | piccCommandRATS = 0xE0
constant piccCommandMFRegAUTHRegKEYRegA (line 27) | piccCommandMFRegAUTHRegKEYRegA = 0x60
constant piccCommandMFRegAUTHRegKEYRegB (line 28) | piccCommandMFRegAUTHRegKEYRegB = 0x61
constant piccCommandMFRegREAD (line 30) | piccCommandMFRegREAD = 0x30
constant piccCommandMFRegWRITE (line 32) | piccCommandMFRegWRITE = 0xA0
constant piccWriteAck (line 33) | piccWriteAck = 0x0A
constant piccCommandMFRegDECREMENT (line 34) | piccCommandMFRegDECREMENT = 0xC0
constant piccCommandMFRegINCREMENT (line 35) | piccCommandMFRegINCREMENT = 0xC1
constant piccCommandMFRegRESTORE (line 36) | piccCommandMFRegRESTORE = 0xC2
constant piccCommandMFRegTRANSFER (line 37) | piccCommandMFRegTRANSFER = 0xB0
constant piccReadWriteAuthBlock (line 43) | piccReadWriteAuthBlock = uint8(11)
method IsCardPresent (line 56) | func (d *MFRC522Common) IsCardPresent() error {
method ReadText (line 87) | func (d *MFRC522Common) ReadText() (string, error) {
method WriteText (line 132) | func (d *MFRC522Common) WriteText(text string) error {
method piccHalt (line 175) | func (d *MFRC522Common) piccHalt() error {
method piccWrite (line 198) | func (d *MFRC522Common) piccWrite(block uint8, blockData []byte) error {
method piccRead (line 242) | func (d *MFRC522Common) piccRead(block uint8) ([]byte, error) {
method piccAuthenticate (line 262) | func (d *MFRC522Common) piccAuthenticate(address uint8, key []byte, uid ...
method piccActivate (line 282) | func (d *MFRC522Common) piccActivate() ([]byte, error) {
method piccRequest (line 392) | func (d *MFRC522Common) piccRequest(reqMode uint8, answer []byte) error {
FILE: drivers/common/spherocommon/spherocommon.go
constant ErrorEvent (line 5) | ErrorEvent = "error"
constant SensorDataEvent (line 8) | SensorDataEvent = "sensordata"
constant CollisionEvent (line 11) | CollisionEvent = "collision"
function DefaultDataStreamingConfig (line 16) | func DefaultDataStreamingConfig() DataStreamingConfig {
function CalculateChecksum (line 27) | func CalculateChecksum(buf []byte) byte {
FILE: drivers/common/spherocommon/spherocommon_packets.go
type LocatorConfig (line 7) | type LocatorConfig struct
type CollisionConfig (line 21) | type CollisionConfig struct
type DataStreamingConfig (line 45) | type DataStreamingConfig struct
type PowerStatePacket (line 59) | type PowerStatePacket struct
type CollisionPacket (line 73) | type CollisionPacket struct
type DataStreamingPacket (line 87) | type DataStreamingPacket struct
FILE: drivers/common/spherocommon/spherocommon_test.go
function TestCalculateChecksum (line 10) | func TestCalculateChecksum(t *testing.T) {
FILE: drivers/gpio/aip1640_driver.go
constant AIP1640DataCmd (line 11) | AIP1640DataCmd = 0x40
constant AIP1640DispCtrl (line 12) | AIP1640DispCtrl = 0x88
constant AIP1640AddrCmd (line 13) | AIP1640AddrCmd = 0xC0
constant AIP1640FixedAddr (line 15) | AIP1640FixedAddr = 0x04
type AIP1640Driver (line 24) | type AIP1640Driver struct
method SetIntensity (line 54) | func (d *AIP1640Driver) SetIntensity(level byte) {
method Display (line 62) | func (d *AIP1640Driver) Display() error {
method Clear (line 87) | func (d *AIP1640Driver) Clear() {
method DrawPixel (line 94) | func (d *AIP1640Driver) DrawPixel(x, y byte, enabled bool) {
method DrawRow (line 107) | func (d *AIP1640Driver) DrawRow(row, data byte) {
method DrawMatrix (line 115) | func (d *AIP1640Driver) DrawMatrix(data [8]byte) {
method initialize (line 122) | func (d *AIP1640Driver) initialize() error {
method sendCommand (line 130) | func (d *AIP1640Driver) sendCommand(cmd byte) error {
method sendData (line 141) | func (d *AIP1640Driver) sendData(address byte, data byte) error {
method send (line 158) | func (d *AIP1640Driver) send(data byte) error {
function NewAIP1640Driver (line 39) | func NewAIP1640Driver(a gobot.Connection, clockPin string, dataPin strin...
FILE: drivers/gpio/aip1640_driver_test.go
function initTestAIP1640Driver (line 17) | func initTestAIP1640Driver() *AIP1640Driver {
function initTestAIP1640DriverWithStubbedAdaptor (line 22) | func initTestAIP1640DriverWithStubbedAdaptor() (*AIP1640Driver, *gpioTes...
function TestNewAIP1640Driver (line 27) | func TestNewAIP1640Driver(t *testing.T) {
function TestNewAIP1640Driver_options (line 48) | func TestNewAIP1640Driver_options(t *testing.T) {
function TestAIP1640Start (line 68) | func TestAIP1640Start(t *testing.T) {
function TestAIP1640DrawPixel (line 73) | func TestAIP1640DrawPixel(t *testing.T) {
function TestAIP1640DrawRow (line 80) | func TestAIP1640DrawRow(t *testing.T) {
function TestAIP1640DrawMatrix (line 86) | func TestAIP1640DrawMatrix(t *testing.T) {
function TestAIP1640Clear (line 93) | func TestAIP1640Clear(t *testing.T) {
function TestAIP1640SetIntensity (line 102) | func TestAIP1640SetIntensity(t *testing.T) {
function TestAIP1640SetIntensityHigherThan7 (line 108) | func TestAIP1640SetIntensityHigherThan7(t *testing.T) {
FILE: drivers/gpio/button_driver.go
type buttonOptionApplier (line 11) | type buttonOptionApplier interface
type buttonConfiguration (line 16) | type buttonConfiguration struct
type buttonReadIntervalOption (line 22) | type buttonReadIntervalOption
method String (line 163) | func (o buttonReadIntervalOption) String() string {
method apply (line 171) | func (o buttonReadIntervalOption) apply(cfg *buttonConfiguration) {
type buttonDefaultStateOption (line 25) | type buttonDefaultStateOption
method String (line 167) | func (o buttonDefaultStateOption) String() string {
method apply (line 175) | func (o buttonDefaultStateOption) apply(cfg *buttonConfiguration) {
type ButtonDriver (line 28) | type ButtonDriver struct
method Active (line 81) | func (d *ButtonDriver) Active() bool {
method SetDefaultState (line 91) | func (d *ButtonDriver) SetDefaultState(s int) {
method initialize (line 106) | func (d *ButtonDriver) initialize() error {
method shutdown (line 139) | func (d *ButtonDriver) shutdown() error {
method update (line 149) | func (d *ButtonDriver) update(newValue int) {
function NewButtonDriver (line 44) | func NewButtonDriver(a DigitalReader, pin string, opts ...interface{}) *...
function WithButtonPollInterval (line 71) | func WithButtonPollInterval(interval time.Duration) buttonOptionApplier {
function WithButtonDefaultState (line 76) | func WithButtonDefaultState(s int) buttonOptionApplier {
FILE: drivers/gpio/button_driver_test.go
constant buttonTestDelay (line 19) | buttonTestDelay = 250
function initTestButtonDriverWithStubbedAdaptor (line 21) | func initTestButtonDriverWithStubbedAdaptor() (*ButtonDriver, *gpioTestA...
function TestNewButtonDriver (line 27) | func TestNewButtonDriver(t *testing.T) {
function TestNewButtonDriver_options (line 52) | func TestNewButtonDriver_options(t *testing.T) {
function TestButton_WithButtonDefaultState (line 72) | func TestButton_WithButtonDefaultState(t *testing.T) {
function TestButtonStart (line 82) | func TestButtonStart(t *testing.T) {
function TestButtonStart_WithDefaultState (line 156) | func TestButtonStart_WithDefaultState(t *testing.T) {
function TestButtonHalt (line 200) | func TestButtonHalt(t *testing.T) {
function TestButtonActive (line 220) | func TestButtonActive(t *testing.T) {
FILE: drivers/gpio/buzzer_driver.go
constant Whole (line 12) | Whole = 4
constant Half (line 13) | Half = 2
constant Quarter (line 14) | Quarter = 1
constant Eighth (line 15) | Eighth = 0.500
constant Rest (line 20) | Rest = 0
constant C0 (line 21) | C0 = 16.35
constant Db0 (line 22) | Db0 = 17.32
constant D0 (line 23) | D0 = 18.35
constant Eb0 (line 24) | Eb0 = 19.45
constant E0 (line 25) | E0 = 20.60
constant F0 (line 26) | F0 = 21.83
constant Gb0 (line 27) | Gb0 = 23.12
constant G0 (line 28) | G0 = 24.50
constant Ab0 (line 29) | Ab0 = 25.96
constant A0 (line 30) | A0 = 27.50
constant Bb0 (line 31) | Bb0 = 29.14
constant B0 (line 32) | B0 = 30.87
constant C1 (line 33) | C1 = 32.70
constant Db1 (line 34) | Db1 = 34.65
constant D1 (line 35) | D1 = 36.71
constant Eb1 (line 36) | Eb1 = 38.89
constant E1 (line 37) | E1 = 41.20
constant F1 (line 38) | F1 = 43.65
constant Gb1 (line 39) | Gb1 = 46.25
constant G1 (line 40) | G1 = 49.00
constant Ab1 (line 41) | Ab1 = 51.91
constant A1 (line 42) | A1 = 55.00
constant Bb1 (line 43) | Bb1 = 58.27
constant B1 (line 44) | B1 = 61.74
constant C2 (line 45) | C2 = 65.41
constant Db2 (line 46) | Db2 = 69.30
constant D2 (line 47) | D2 = 73.42
constant Eb2 (line 48) | Eb2 = 77.78
constant E2 (line 49) | E2 = 82.41
constant F2 (line 50) | F2 = 87.31
constant Gb2 (line 51) | Gb2 = 92.50
constant G2 (line 52) | G2 = 98.00
constant Ab2 (line 53) | Ab2 = 103.83
constant A2 (line 54) | A2 = 110.00
constant Bb2 (line 55) | Bb2 = 116.54
constant B2 (line 56) | B2 = 123.47
constant C3 (line 57) | C3 = 130.81
constant Db3 (line 58) | Db3 = 138.59
constant D3 (line 59) | D3 = 146.83
constant Eb3 (line 60) | Eb3 = 155.56
constant E3 (line 61) | E3 = 164.81
constant F3 (line 62) | F3 = 174.61
constant Gb3 (line 63) | Gb3 = 185.00
constant G3 (line 64) | G3 = 196.00
constant Ab3 (line 65) | Ab3 = 207.65
constant A3 (line 66) | A3 = 220.00
constant Bb3 (line 67) | Bb3 = 233.08
constant B3 (line 68) | B3 = 246.94
constant C4 (line 69) | C4 = 261.63
constant Db4 (line 70) | Db4 = 277.18
constant D4 (line 71) | D4 = 293.66
constant Eb4 (line 72) | Eb4 = 311.13
constant E4 (line 73) | E4 = 329.63
constant F4 (line 74) | F4 = 349.23
constant Gb4 (line 75) | Gb4 = 369.99
constant G4 (line 76) | G4 = 392.00
constant Ab4 (line 77) | Ab4 = 415.30
constant A4 (line 78) | A4 = 440.00
constant Bb4 (line 79) | Bb4 = 466.16
constant B4 (line 80) | B4 = 493.88
constant C5 (line 81) | C5 = 523.25
constant Db5 (line 82) | Db5 = 554.37
constant D5 (line 83) | D5 = 587.33
constant Eb5 (line 84) | Eb5 = 622.25
constant E5 (line 85) | E5 = 659.25
constant F5 (line 86) | F5 = 698.46
constant Gb5 (line 87) | Gb5 = 739.99
constant G5 (line 88) | G5 = 783.99
constant Ab5 (line 89) | Ab5 = 830.61
constant A5 (line 90) | A5 = 880.00
constant Bb5 (line 91) | Bb5 = 932.33
constant B5 (line 92) | B5 = 987.77
constant C6 (line 93) | C6 = 1046.50
constant Db6 (line 94) | Db6 = 1108.73
constant D6 (line 95) | D6 = 1174.66
constant Eb6 (line 96) | Eb6 = 1244.51
constant E6 (line 97) | E6 = 1318.51
constant F6 (line 98) | F6 = 1396.91
constant Gb6 (line 99) | Gb6 = 1479.98
constant G6 (line 100) | G6 = 1567.98
constant Ab6 (line 101) | Ab6 = 1661.22
constant A6 (line 102) | A6 = 1760.00
constant Bb6 (line 103) | Bb6 = 1864.66
constant B6 (line 104) | B6 = 1975.53
constant C7 (line 105) | C7 = 2093.00
constant Db7 (line 106) | Db7 = 2217.46
constant D7 (line 107) | D7 = 2349.32
constant Eb7 (line 108) | Eb7 = 2489.02
constant E7 (line 109) | E7 = 2637.02
constant F7 (line 110) | F7 = 2793.83
constant Gb7 (line 111) | Gb7 = 2959.96
constant G7 (line 112) | G7 = 3135.96
constant Ab7 (line 113) | Ab7 = 3322.44
constant A7 (line 114) | A7 = 3520.00
constant Bb7 (line 115) | Bb7 = 3729.31
constant B7 (line 116) | B7 = 3951.07
constant C8 (line 117) | C8 = 4186.01
constant Db8 (line 118) | Db8 = 4434.92
constant D8 (line 119) | D8 = 4698.63
constant Eb8 (line 120) | Eb8 = 4978.03
constant E8 (line 121) | E8 = 5274.04
constant F8 (line 122) | F8 = 5587.65
constant Gb8 (line 123) | Gb8 = 5919.91
constant G8 (line 124) | G8 = 6271.93
constant Ab8 (line 125) | Ab8 = 6644.88
constant A8 (line 126) | A8 = 7040.00
constant Bb8 (line 127) | Bb8 = 7458.62
constant B8 (line 128) | B8 = 7902.13
type BuzzerDriver (line 132) | type BuzzerDriver struct
method SetBPM (line 164) | func (d *BuzzerDriver) SetBPM(val float64) {
method BPM (line 169) | func (d *BuzzerDriver) BPM() float64 {
method State (line 174) | func (d *BuzzerDriver) State() bool {
method On (line 179) | func (d *BuzzerDriver) On() error {
method Off (line 188) | func (d *BuzzerDriver) Off() error {
method Toggle (line 197) | func (d *BuzzerDriver) Toggle() error {
method Tone (line 205) | func (d *BuzzerDriver) Tone(hz, duration float64) error {
function NewBuzzerDriver (line 144) | func NewBuzzerDriver(a DigitalWriter, pin string, opts ...interface{}) *...
FILE: drivers/gpio/buzzer_driver_test.go
function initTestBuzzerDriver (line 17) | func initTestBuzzerDriver(conn DigitalWriter) *BuzzerDriver {
function TestNewBuzzerDriver (line 21) | func TestNewBuzzerDriver(t *testing.T) {
function TestNewBuzzerDriver_options (line 42) | func TestNewBuzzerDriver_options(t *testing.T) {
function TestBuzzerToggle (line 61) | func TestBuzzerToggle(t *testing.T) {
function TestBuzzerTone (line 70) | func TestBuzzerTone(t *testing.T) {
function TestBuzzerOnError (line 75) | func TestBuzzerOnError(t *testing.T) {
function TestBuzzerOffError (line 85) | func TestBuzzerOffError(t *testing.T) {
function TestBuzzerToneError (line 95) | func TestBuzzerToneError(t *testing.T) {
FILE: drivers/gpio/direct_pin_driver.go
type DirectPinDriver (line 10) | type DirectPinDriver struct
method Off (line 55) | func (d *DirectPinDriver) Off() error {
method On (line 60) | func (d *DirectPinDriver) On() error {
method DigitalRead (line 65) | func (d *DirectPinDriver) DigitalRead() (int, error) {
method DigitalWrite (line 70) | func (d *DirectPinDriver) DigitalWrite(level byte) error {
method PwmWrite (line 75) | func (d *DirectPinDriver) PwmWrite(level byte) error {
method ServoWrite (line 80) | func (d *DirectPinDriver) ServoWrite(level byte) error {
function NewDirectPinDriver (line 26) | func NewDirectPinDriver(a gobot.Connection, pin string, opts ...interfac...
FILE: drivers/gpio/direct_pin_driver_test.go
function initTestDirectPinDriver (line 18) | func initTestDirectPinDriver() *DirectPinDriver {
function TestNewDirectPinDriver (line 35) | func TestNewDirectPinDriver(t *testing.T) {
function TestNewDirectPinDriver_options (line 53) | func TestNewDirectPinDriver_options(t *testing.T) {
function TestDirectPin_Commands (line 72) | func TestDirectPin_Commands(t *testing.T) {
function TestDirectPinOff (line 92) | func TestDirectPinOff(t *testing.T) {
function TestDirectPinOffNotSupported (line 101) | func TestDirectPinOffNotSupported(t *testing.T) {
function TestDirectPinOn (line 107) | func TestDirectPinOn(t *testing.T) {
function TestDirectPinOnError (line 113) | func TestDirectPinOnError(t *testing.T) {
function TestDirectPinOnNotSupported (line 118) | func TestDirectPinOnNotSupported(t *testing.T) {
function TestDirectPinDigitalWrite (line 124) | func TestDirectPinDigitalWrite(t *testing.T) {
function TestDirectPinDigitalWriteNotSupported (line 130) | func TestDirectPinDigitalWriteNotSupported(t *testing.T) {
function TestDirectPinDigitalWriteError (line 136) | func TestDirectPinDigitalWriteError(t *testing.T) {
function TestDirectPinDigitalRead (line 141) | func TestDirectPinDigitalRead(t *testing.T) {
function TestDirectPinDigitalReadNotSupported (line 148) | func TestDirectPinDigitalReadNotSupported(t *testing.T) {
function TestDirectPinPwmWrite (line 155) | func TestDirectPinPwmWrite(t *testing.T) {
function TestDirectPinPwmWriteNotSupported (line 161) | func TestDirectPinPwmWriteNotSupported(t *testing.T) {
function TestDirectPinPwmWriteError (line 167) | func TestDirectPinPwmWriteError(t *testing.T) {
function TestDirectPinServoWrite (line 172) | func TestDirectPinServoWrite(t *testing.T) {
function TestDirectPinServoWriteNotSupported (line 178) | func TestDirectPinServoWriteNotSupported(t *testing.T) {
function TestDirectPinServoWriteError (line 184) | func TestDirectPinServoWriteError(t *testing.T) {
FILE: drivers/gpio/easy_driver.go
constant easyDriverDebug (line 11) | easyDriverDebug = false
type easyOptionApplier (line 14) | type easyOptionApplier interface
type easyConfiguration (line 19) | type easyConfiguration struct
type easyDirPinOption (line 26) | type easyDirPinOption
method String (line 249) | func (o easyDirPinOption) String() string {
method apply (line 261) | func (o easyDirPinOption) apply(cfg *easyConfiguration) {
type easyEnPinOption (line 29) | type easyEnPinOption
method String (line 253) | func (o easyEnPinOption) String() string {
method apply (line 265) | func (o easyEnPinOption) apply(cfg *easyConfiguration) {
type easySleepPinOption (line 32) | type easySleepPinOption
method String (line 257) | func (o easySleepPinOption) String() string {
method apply (line 269) | func (o easySleepPinOption) apply(cfg *easyConfiguration) {
type EasyDriver (line 37) | type EasyDriver struct
method SetDirection (line 118) | func (d *EasyDriver) SetDirection(direction string) error {
method Enable (line 147) | func (d *EasyDriver) Enable() error {
method Disable (line 163) | func (d *EasyDriver) Disable() error {
method IsEnabled (line 180) | func (d *EasyDriver) IsEnabled() bool {
method Wake (line 185) | func (d *EasyDriver) Wake() error {
method IsSleeping (line 204) | func (d *EasyDriver) IsSleeping() bool {
method onePinStepping (line 208) | func (d *EasyDriver) onePinStepping() error {
method sleepWithSleepPin (line 233) | func (d *EasyDriver) sleepWithSleepPin() error {
function NewEasyDriver (line 58) | func NewEasyDriver(a DigitalWriter, anglePerStep float32, stepPin string...
function WithEasyDirectionPin (line 103) | func WithEasyDirectionPin(pin string) easyOptionApplier {
function WithEasyEnablePin (line 108) | func WithEasyEnablePin(pin string) easyOptionApplier {
function WithEasySleepPin (line 113) | func WithEasySleepPin(pin string) easyOptionApplier {
FILE: drivers/gpio/easy_driver_test.go
function initTestEasyDriverWithStubbedAdaptor (line 15) | func initTestEasyDriverWithStubbedAdaptor() (*EasyDriver, *gpioTestAdapt...
function TestNewEasyDriver (line 23) | func TestNewEasyDriver(t *testing.T) {
function TestNewEasyDriver_options (line 55) | func TestNewEasyDriver_options(t *testing.T) {
function TestEasy_WithEasyEnablePin (line 77) | func TestEasy_WithEasyEnablePin(t *testing.T) {
function TestEasy_WithEasySleepPin (line 87) | func TestEasy_WithEasySleepPin(t *testing.T) {
function TestEasyMoveDeg_IsMoving (line 97) | func TestEasyMoveDeg_IsMoving(t *testing.T) {
function TestEasyRun_IsMoving (line 172) | func TestEasyRun_IsMoving(t *testing.T) {
function TestEasyStop_IsMoving (line 228) | func TestEasyStop_IsMoving(t *testing.T) {
function TestEasyDriverHalt_IsMoving (line 240) | func TestEasyDriverHalt_IsMoving(t *testing.T) {
function TestEasySetDirection (line 252) | func TestEasySetDirection(t *testing.T) {
function TestEasyMaxSpeed (line 321) | func TestEasyMaxSpeed(t *testing.T) {
function TestEasySetSpeed (line 366) | func TestEasySetSpeed(t *testing.T) {
function TestEasy_onePinStepping (line 416) | func TestEasy_onePinStepping(t *testing.T) {
function TestEasyEnable_IsEnabled (line 520) | func TestEasyEnable_IsEnabled(t *testing.T) {
function TestEasyDisable_IsEnabled (line 579) | func TestEasyDisable_IsEnabled(t *testing.T) {
function TestEasySleep_IsSleeping (line 660) | func TestEasySleep_IsSleeping(t *testing.T) {
function TestEasyWake_IsSleeping (line 739) | func TestEasyWake_IsSleeping(t *testing.T) {
FILE: drivers/gpio/gpio_driver.go
constant Error (line 29) | Error = "error"
constant ButtonRelease (line 31) | ButtonRelease = "release"
constant ButtonPush (line 33) | ButtonPush = "push"
constant MotionDetected (line 35) | MotionDetected = "motion-detected"
constant MotionStopped (line 37) | MotionStopped = "motion-stopped"
type PwmWriter (line 41) | type PwmWriter interface
type ServoWriter (line 46) | type ServoWriter interface
type DigitalWriter (line 51) | type DigitalWriter interface
type DigitalReader (line 56) | type DigitalReader interface
type optionApplier (line 61) | type optionApplier interface
type configuration (line 66) | type configuration struct
type nameOption (line 72) | type nameOption
method String (line 230) | func (o nameOption) String() string {
method apply (line 239) | func (o nameOption) apply(c *configuration) {
type pinOption (line 75) | type pinOption
method String (line 234) | func (o pinOption) String() string {
method apply (line 244) | func (o pinOption) apply(c *configuration) {
type driver (line 78) | type driver struct
method Name (line 128) | func (d *driver) Name() string {
method SetName (line 134) | func (d *driver) SetName(name string) {
method Pin (line 139) | func (d *driver) Pin() string {
method Connection (line 144) | func (d *driver) Connection() gobot.Connection {
method Start (line 159) | func (d *driver) Start() error {
method Halt (line 169) | func (d *driver) Halt() error {
method digitalRead (line 179) | func (d *driver) digitalRead(pin string) (int, error) {
method digitalWrite (line 192) | func (d *driver) digitalWrite(pin string, val byte) error {
method pwmWrite (line 205) | func (d *driver) pwmWrite(pin string, level byte) error {
method servoWrite (line 218) | func (d *driver) servoWrite(pin string, level byte) error {
function newDriver (line 94) | func newDriver(a gobot.Adaptor, name string, opts ...interface{}) *driver {
function WithName (line 117) | func WithName(name string) optionApplier {
function withPin (line 123) | func withPin(pin string) optionApplier {
FILE: drivers/gpio/gpio_driver_test.go
function initTestDriverWithStubbedAdaptor (line 15) | func initTestDriverWithStubbedAdaptor() (*driver, *gpioTestAdaptor) {
function initTestDriver (line 21) | func initTestDriver() *driver {
function TestNewDriver (line 26) | func TestNewDriver(t *testing.T) {
function Test_applyWithName (line 41) | func Test_applyWithName(t *testing.T) {
function Test_applywithPin (line 51) | func Test_applywithPin(t *testing.T) {
function TestConnection (line 61) | func TestConnection(t *testing.T) {
function TestStart (line 68) | func TestStart(t *testing.T) {
function TestHalt (line 79) | func TestHalt(t *testing.T) {
FILE: drivers/gpio/grove_drivers.go
type GroveRelayDriver (line 4) | type GroveRelayDriver struct
function NewGroveRelayDriver (line 21) | func NewGroveRelayDriver(a DigitalWriter, pin string) *GroveRelayDriver {
type GroveLedDriver (line 28) | type GroveLedDriver struct
function NewGroveLedDriver (line 46) | func NewGroveLedDriver(a DigitalWriter, pin string) *GroveLedDriver {
type GroveBuzzerDriver (line 53) | type GroveBuzzerDriver struct
function NewGroveBuzzerDriver (line 64) | func NewGroveBuzzerDriver(a DigitalWriter, pin string, opts ...interface...
type GroveButtonDriver (line 71) | type GroveButtonDriver struct
function NewGroveButtonDriver (line 84) | func NewGroveButtonDriver(a DigitalReader, pin string, opts ...interface...
type GroveTouchDriver (line 92) | type GroveTouchDriver struct
function NewGroveTouchDriver (line 105) | func NewGroveTouchDriver(a DigitalReader, pin string, opts ...interface{...
type GroveMagneticSwitchDriver (line 112) | type GroveMagneticSwitchDriver struct
function NewGroveMagneticSwitchDriver (line 125) | func NewGroveMagneticSwitchDriver(a DigitalReader, pin string, opts ...i...
FILE: drivers/gpio/grove_drivers_test.go
type DriverAndPinner (line 17) | type DriverAndPinner interface
type DriverAndEventer (line 22) | type DriverAndEventer interface
function TestDriverDefaults (line 27) | func TestDriverDefaults(t *testing.T) {
function TestDigitalDriverHalt (line 46) | func TestDigitalDriverHalt(t *testing.T) {
function TestDriverPublishesError (line 79) | func TestDriverPublishesError(t *testing.T) {
function getType (line 116) | func getType(driver interface{}) string {
FILE: drivers/gpio/hcsr04_driver.go
constant hcsr04SoundSpeed (line 13) | hcsr04SoundSpeed = 343
constant hcsr04StartTransmitTimeout (line 17) | hcsr04StartTransmitTimeout time.Duration = 100 * time.Millisecond
constant hcsr04ReceiveTimeout (line 18) | hcsr04ReceiveTimeout time.Duration = 60 * time.Millisecond
constant hcsr04EmitTriggerDuration (line 19) | hcsr04EmitTriggerDuration time.Duration = 10 * time.Microsecond
constant hcsr04MonitorUpdate (line 20) | hcsr04MonitorUpdate time.Duration = 200 * time.Millisecond
constant hcsr04PollInputIntervall (line 25) | hcsr04PollInputIntervall time.Duration = 10 * time.Microsecond
type hcsr04OptionApplier (line 29) | type hcsr04OptionApplier interface
type hcsr04Configuration (line 34) | type hcsr04Configuration struct
type hcsr04UseEdgePollingOption (line 40) | type hcsr04UseEdgePollingOption
method String (line 255) | func (o hcsr04UseEdgePollingOption) String() string {
method apply (line 259) | func (o hcsr04UseEdgePollingOption) apply(cfg *hcsr04Configuration) {
type HCSR04Driver (line 43) | type HCSR04Driver struct
method MeasureDistance (line 143) | func (d *HCSR04Driver) MeasureDistance() (float64, error) {
method Distance (line 152) | func (d *HCSR04Driver) Distance() float64 {
method StartDistanceMonitor (line 158) | func (d *HCSR04Driver) StartDistanceMonitor() error {
method StopDistanceMonitor (line 191) | func (d *HCSR04Driver) StopDistanceMonitor() error {
method createEventHandler (line 199) | func (d *HCSR04Driver) createEventHandler() func(int, time.Duration, s...
method stopDistanceMonitor (line 217) | func (d *HCSR04Driver) stopDistanceMonitor() error {
method measureDistance (line 228) | func (d *HCSR04Driver) measureDistance() error {
method emitTrigger (line 247) | func (d *HCSR04Driver) emitTrigger() error {
function NewHCSR04Driver (line 66) | func NewHCSR04Driver(a gobot.Adaptor, triggerPinID, echoPinID string, op...
function WithHCSR04UseEdgePolling (line 137) | func WithHCSR04UseEdgePolling() hcsr04OptionApplier {
FILE: drivers/gpio/hcsr04_driver_test.go
function initTestHCSR04DriverWithStubbedAdaptor (line 18) | func initTestHCSR04DriverWithStubbedAdaptor(triggerPinID string, echoPin...
function TestNewHCSR04Driver (line 29) | func TestNewHCSR04Driver(t *testing.T) {
function TestNewHCSR04Driver_options (line 59) | func TestNewHCSR04Driver_options(t *testing.T) {
function TestHCSR04MeasureDistance (line 80) | func TestHCSR04MeasureDistance(t *testing.T) {
function TestHCSR04Distance (line 154) | func TestHCSR04Distance(t *testing.T) {
function TestHCSR04StartDistanceMonitor (line 186) | func TestHCSR04StartDistanceMonitor(t *testing.T) {
function TestHCSR04StopDistanceMonitor (line 237) | func TestHCSR04StopDistanceMonitor(t *testing.T) {
function TestHCSR04_createEventHandler (line 279) | func TestHCSR04_createEventHandler(t *testing.T) {
FILE: drivers/gpio/hd44780_driver.go
constant HD44780_CLEARDISPLAY (line 13) | HD44780_CLEARDISPLAY = 0x01
constant HD44780_RETURNHOME (line 14) | HD44780_RETURNHOME = 0x02
constant HD44780_ENTRYMODESET (line 15) | HD44780_ENTRYMODESET = 0x04
constant HD44780_DISPLAYCONTROL (line 16) | HD44780_DISPLAYCONTROL = 0x08
constant HD44780_CURSORSHIFT (line 17) | HD44780_CURSORSHIFT = 0x10
constant HD44780_FUNCTIONSET (line 18) | HD44780_FUNCTIONSET = 0x20
constant HD44780_SETCGRAMADDR (line 19) | HD44780_SETCGRAMADDR = 0x40
constant HD44780_SETDDRAMADDR (line 20) | HD44780_SETDDRAMADDR = 0x80
constant HD44780_ENTRYRIGHT (line 21) | HD44780_ENTRYRIGHT = 0x00
constant HD44780_ENTRYLEFT (line 22) | HD44780_ENTRYLEFT = 0x02
constant HD44780_ENTRYSHIFTINCREMENT (line 23) | HD44780_ENTRYSHIFTINCREMENT = 0x01
constant HD44780_ENTRYSHIFTDECREMENT (line 24) | HD44780_ENTRYSHIFTDECREMENT = 0x00
constant HD44780_DISPLAYON (line 25) | HD44780_DISPLAYON = 0x04
constant HD44780_DISPLAYOFF (line 26) | HD44780_DISPLAYOFF = 0x00
constant HD44780_CURSORON (line 27) | HD44780_CURSORON = 0x02
constant HD44780_CURSOROFF (line 28) | HD44780_CURSOROFF = 0x00
constant HD44780_BLINKON (line 29) | HD44780_BLINKON = 0x01
constant HD44780_BLINKOFF (line 30) | HD44780_BLINKOFF = 0x00
constant HD44780_DISPLAYMOVE (line 31) | HD44780_DISPLAYMOVE = 0x08
constant HD44780_CURSORMOVE (line 32) | HD44780_CURSORMOVE = 0x00
constant HD44780_MOVERIGHT (line 33) | HD44780_MOVERIGHT = 0x04
constant HD44780_MOVELEFT (line 34) | HD44780_MOVELEFT = 0x00
constant HD44780_1LINE (line 35) | HD44780_1LINE = 0x00
constant HD44780_2LINE (line 36) | HD44780_2LINE = 0x08
constant HD44780_5x8DOTS (line 37) | HD44780_5x8DOTS = 0x00
constant HD44780_5x10DOTS (line 38) | HD44780_5x10DOTS = 0x04
constant HD44780_4BITBUS (line 39) | HD44780_4BITBUS = 0x00
constant HD44780_8BITBUS (line 40) | HD44780_8BITBUS = 0x10
constant HD44780_2NDLINEOFFSET (line 45) | HD44780_2NDLINEOFFSET = 0x40
type HD44780BusMode (line 49) | type HD44780BusMode
constant HD44780_4BITMODE (line 53) | HD44780_4BITMODE HD44780BusMode = iota + 1
constant HD44780_8BITMODE (line 54) | HD44780_8BITMODE
type HD44780DataPin (line 58) | type HD44780DataPin struct
type hd44780OptionApplier (line 70) | type hd44780OptionApplier interface
type hd44780Configuration (line 75) | type hd44780Configuration struct
type hd44780PinRWOption (line 80) | type hd44780PinRWOption
method String (line 526) | func (o hd44780PinRWOption) String() string {
method apply (line 530) | func (o hd44780PinRWOption) apply(cfg *hd44780Configuration) {
type HD44780Driver (line 84) | type HD44780Driver struct
method initialize (line 184) | func (d *HD44780Driver) initialize() error {
method Write (line 266) | func (d *HD44780Driver) Write(message string) error {
method Clear (line 293) | func (d *HD44780Driver) Clear() error {
method Home (line 301) | func (d *HD44780Driver) Home() error {
method SetCursor (line 314) | func (d *HD44780Driver) SetCursor(col int, row int) error {
method Display (line 322) | func (d *HD44780Driver) Display(on bool) error {
method Cursor (line 336) | func (d *HD44780Driver) Cursor(on bool) error {
method Blink (line 350) | func (d *HD44780Driver) Blink(on bool) error {
method ScrollLeft (line 364) | func (d *HD44780Driver) ScrollLeft() error {
method ScrollRight (line 372) | func (d *HD44780Driver) ScrollRight() error {
method LeftToRight (line 380) | func (d *HD44780Driver) LeftToRight() error {
method RightToLeft (line 389) | func (d *HD44780Driver) RightToLeft() error {
method SendCommand (line 398) | func (d *HD44780Driver) SendCommand(data int) error {
method WriteChar (line 406) | func (d *HD44780Driver) WriteChar(data int) error {
method CreateChar (line 414) | func (d *HD44780Driver) CreateChar(pos int, charMap [8]byte) error {
method sendCommand (line 435) | func (d *HD44780Driver) sendCommand(data int) error {
method writeChar (line 451) | func (d *HD44780Driver) writeChar(data int) error {
method clear (line 468) | func (d *HD44780Driver) clear() error {
method setCursor (line 480) | func (d *HD44780Driver) setCursor(col int, row int) error {
method writeDataPins (line 488) | func (d *HD44780Driver) writeDataPins(data int) error {
method fallingEdge (line 504) | func (d *HD44780Driver) fallingEdge() error {
method activateWriteMode (line 519) | func (d *HD44780Driver) activateWriteMode() error {
function NewHD44780Driver (line 113) | func NewHD44780Driver(
function WithHD44780RWPin (line 178) | func WithHD44780RWPin(pin string) hd44780OptionApplier {
FILE: drivers/gpio/hd44780_driver_test.go
function initTestHD44780Driver (line 17) | func initTestHD44780Driver() *HD44780Driver {
function initTestHD44780Driver4BitModeWithStubbedAdaptor (line 25) | func initTestHD44780Driver4BitModeWithStubbedAdaptor() (*HD44780Driver, ...
function initTestHD44780Driver8BitModeWithStubbedAdaptor (line 37) | func initTestHD44780Driver8BitModeWithStubbedAdaptor() (*HD44780Driver, ...
function TestNewHD44780Driver (line 53) | func TestNewHD44780Driver(t *testing.T) {
function TestNewHD44780Driver_options (line 93) | func TestNewHD44780Driver_options(t *testing.T) {
function TestHD44780Start (line 121) | func TestHD44780Start(t *testing.T) {
function TestHD44780StartError (line 128) | func TestHD44780StartError(t *testing.T) {
function TestHD44780Write (line 157) | func TestHD44780Write(t *testing.T) {
function TestHD44780WriteError (line 169) | func TestHD44780WriteError(t *testing.T) {
function TestHD44780Clear (line 188) | func TestHD44780Clear(t *testing.T) {
function TestHD44780Home (line 193) | func TestHD44780Home(t *testing.T) {
function TestHD44780SetCursor (line 198) | func TestHD44780SetCursor(t *testing.T) {
function TestHD44780SetCursorInvalid (line 203) | func TestHD44780SetCursorInvalid(t *testing.T) {
function TestHD44780DisplayOn (line 212) | func TestHD44780DisplayOn(t *testing.T) {
function TestHD44780DisplayOff (line 217) | func TestHD44780DisplayOff(t *testing.T) {
function TestHD44780CursorOn (line 222) | func TestHD44780CursorOn(t *testing.T) {
function TestHD44780CursorOff (line 227) | func TestHD44780CursorOff(t *testing.T) {
function TestHD44780BlinkOn (line 232) | func TestHD44780BlinkOn(t *testing.T) {
function TestHD44780BlinkOff (line 237) | func TestHD44780BlinkOff(t *testing.T) {
function TestHD44780ScrollLeft (line 242) | func TestHD44780ScrollLeft(t *testing.T) {
function TestHD44780ScrollRight (line 247) | func TestHD44780ScrollRight(t *testing.T) {
function TestHD44780LeftToRight (line 252) | func TestHD44780LeftToRight(t *testing.T) {
function TestHD44780RightToLeft (line 257) | func TestHD44780RightToLeft(t *testing.T) {
function TestHD44780SendCommand (line 262) | func TestHD44780SendCommand(t *testing.T) {
function TestHD44780WriteChar (line 267) | func TestHD44780WriteChar(t *testing.T) {
function TestHD44780CreateChar (line 272) | func TestHD44780CreateChar(t *testing.T) {
function TestHD44780CreateCharError (line 278) | func TestHD44780CreateCharError(t *testing.T) {
FILE: drivers/gpio/helpers_test.go
type gpioTestBareAdaptor (line 10) | type gpioTestBareAdaptor struct
method Connect (line 12) | func (t *gpioTestBareAdaptor) Connect() error { return nil }
method Finalize (line 13) | func (t *gpioTestBareAdaptor) Finalize() error { return nil }
method Name (line 14) | func (t *gpioTestBareAdaptor) Name() string { return "" }
method SetName (line 15) | func (t *gpioTestBareAdaptor) SetName(n string) {}
type digitalPinMock (line 17) | type digitalPinMock struct
method ApplyOptions (line 109) | func (d *digitalPinMock) ApplyOptions(options ...func(gobot.DigitalPin...
method Export (line 114) | func (d *digitalPinMock) Export() error {
method Unexport (line 119) | func (d *digitalPinMock) Unexport() error {
method Read (line 124) | func (d *digitalPinMock) Read() (int, error) {
method Write (line 129) | func (d *digitalPinMock) Write(b int) error {
type gpioTestWritten (line 21) | type gpioTestWritten struct
type gpioTestAdaptor (line 26) | type gpioTestAdaptor struct
method DigitalRead (line 62) | func (t *gpioTestAdaptor) DigitalRead(pin string) (int, error) {
method DigitalWrite (line 69) | func (t *gpioTestAdaptor) DigitalWrite(pin string, val byte) error {
method PwmWrite (line 81) | func (t *gpioTestAdaptor) PwmWrite(pin string, val byte) error {
method ServoWrite (line 88) | func (t *gpioTestAdaptor) ServoWrite(pin string, val byte) error {
method Connect (line 94) | func (t *gpioTestAdaptor) Connect() error { return nil }
method Finalize (line 95) | func (t *gpioTestAdaptor) Finalize() error { return nil }
method Name (line 96) | func (t *gpioTestAdaptor) Name() string { return t.name }
method SetName (line 97) | func (t *gpioTestAdaptor) SetName(n string) { t.name = n }
method Port (line 98) | func (t *gpioTestAdaptor) Port() string { return t.port }
method DigitalPin (line 101) | func (t *gpioTestAdaptor) DigitalPin(id string) (gobot.DigitalPinner, ...
method addDigitalPin (line 133) | func (t *gpioTestAdaptor) addDigitalPin(id string) *digitalPinMock {
function newGpioTestAdaptor (line 39) | func newGpioTestAdaptor() *gpioTestAdaptor {
FILE: drivers/gpio/led_driver.go
type LedDriver (line 8) | type LedDriver struct
method State (line 53) | func (d *LedDriver) State() bool {
method On (line 58) | func (d *LedDriver) On() error {
method Off (line 67) | func (d *LedDriver) Off() error {
method Toggle (line 76) | func (d *LedDriver) Toggle() error {
method Brightness (line 84) | func (d *LedDriver) Brightness(level byte) error {
function NewLedDriver (line 26) | func NewLedDriver(a DigitalWriter, pin string, opts ...interface{}) *Led...
FILE: drivers/gpio/led_driver_test.go
function initTestLedDriver (line 18) | func initTestLedDriver() *LedDriver {
function TestNewLedDriver (line 29) | func TestNewLedDriver(t *testing.T) {
function TestNewLedDriver_options (line 49) | func TestNewLedDriver_options(t *testing.T) {
function TestLed_Commands (line 67) | func TestLed_Commands(t *testing.T) {
function TestLedToggle (line 92) | func TestLedToggle(t *testing.T) {
function TestLedBrightness (line 101) | func TestLedBrightness(t *testing.T) {
FILE: drivers/gpio/max7219_driver.go
constant MAX7219Digit0 (line 11) | MAX7219Digit0 = 0x01
constant MAX7219Digit1 (line 12) | MAX7219Digit1 = 0x02
constant MAX7219Digit2 (line 13) | MAX7219Digit2 = 0x03
constant MAX7219Digit3 (line 14) | MAX7219Digit3 = 0x04
constant MAX7219Digit4 (line 15) | MAX7219Digit4 = 0x05
constant MAX7219Digit5 (line 16) | MAX7219Digit5 = 0x06
constant MAX7219Digit6 (line 17) | MAX7219Digit6 = 0x07
constant MAX7219Digit7 (line 18) | MAX7219Digit7 = 0x08
constant MAX7219DecodeMode (line 20) | MAX7219DecodeMode = 0x09
constant MAX7219Intensity (line 21) | MAX7219Intensity = 0x0a
constant MAX7219ScanLimit (line 22) | MAX7219ScanLimit = 0x0b
constant MAX7219Shutdown (line 23) | MAX7219Shutdown = 0x0c
constant MAX7219DisplayTest (line 24) | MAX7219DisplayTest = 0x0f
type MAX7219Driver (line 30) | type MAX7219Driver struct
method SetIntensity (line 65) | func (d *MAX7219Driver) SetIntensity(level byte) error {
method ClearAll (line 73) | func (d *MAX7219Driver) ClearAll() error {
method ClearOne (line 85) | func (d *MAX7219Driver) ClearOne(which uint) error {
method All (line 97) | func (d *MAX7219Driver) All(address byte, data byte) error {
method One (line 114) | func (d *MAX7219Driver) One(which uint, address byte, data byte) error {
method initialize (line 140) | func (d *MAX7219Driver) initialize() error {
method send (line 170) | func (d *MAX7219Driver) send(data byte) error {
function NewMAX7219Driver (line 44) | func NewMAX7219Driver(
FILE: drivers/gpio/max7219_driver_test.go
function initTestMAX7219Driver (line 16) | func initTestMAX7219Driver() *MAX7219Driver {
function initTestMAX7219DriverWithStubbedAdaptor (line 21) | func initTestMAX7219DriverWithStubbedAdaptor() (*MAX7219Driver, *gpioTes...
function TestNewMAX7219Driver (line 26) | func TestNewMAX7219Driver(t *testing.T) {
function TestNewMAX7219Driver_options (line 48) | func TestNewMAX7219Driver_options(t *testing.T) {
function TestMAX7219Start (line 67) | func TestMAX7219Start(t *testing.T) {
FILE: drivers/gpio/motor_driver.go
type motorOptionApplier (line 10) | type motorOptionApplier interface
type motorConfiguration (line 15) | type motorConfiguration struct
type motorModeIsAnalogOption (line 23) | type motorModeIsAnalogOption
method String (line 275) | func (o motorModeIsAnalogOption) String() string {
method apply (line 291) | func (o motorModeIsAnalogOption) apply(cfg *motorConfiguration) {
type motorDirectionPinOption (line 26) | type motorDirectionPinOption
method String (line 279) | func (o motorDirectionPinOption) String() string {
method apply (line 295) | func (o motorDirectionPinOption) apply(cfg *motorConfiguration) {
type motorForwardPinOption (line 29) | type motorForwardPinOption
method String (line 283) | func (o motorForwardPinOption) String() string {
method apply (line 299) | func (o motorForwardPinOption) apply(cfg *motorConfiguration) {
type motorBackwardPinOption (line 32) | type motorBackwardPinOption
method String (line 287) | func (o motorBackwardPinOption) String() string {
method apply (line 303) | func (o motorBackwardPinOption) apply(cfg *motorConfiguration) {
type MotorDriver (line 35) | type MotorDriver struct
method Off (line 101) | func (d *MotorDriver) Off() error {
method On (line 110) | func (d *MotorDriver) On() error {
method RunMin (line 123) | func (d *MotorDriver) RunMin() error {
method RunMax (line 128) | func (d *MotorDriver) RunMax() error {
method Toggle (line 133) | func (d *MotorDriver) Toggle() error {
method SetSpeed (line 142) | func (d *MotorDriver) SetSpeed(value byte) error {
method Forward (line 152) | func (d *MotorDriver) Forward(speed byte) error {
method Backward (line 164) | func (d *MotorDriver) Backward(speed byte) error {
method SetDirection (line 176) | func (d *MotorDriver) SetDirection(direction string) error {
method IsAnalog (line 215) | func (d *MotorDriver) IsAnalog() bool {
method IsDigital (line 220) | func (d *MotorDriver) IsDigital() bool {
method IsOn (line 225) | func (d *MotorDriver) IsOn() bool {
method IsOff (line 233) | func (d *MotorDriver) IsOff() bool {
method Direction (line 238) | func (d *MotorDriver) Direction() string {
method Speed (line 243) | func (d *MotorDriver) Speed() byte {
method changeState (line 247) | func (d *MotorDriver) changeState(state byte) error {
function NewMotorDriver (line 58) | func NewMotorDriver(a DigitalWriter, speedPin string, opts ...interface{...
function WithMotorAnalog (line 81) | func WithMotorAnalog() motorOptionApplier {
function WithMotorDirectionPin (line 86) | func WithMotorDirectionPin(pin string) motorOptionApplier {
function WithMotorForwardPin (line 91) | func WithMotorForwardPin(pin string) motorOptionApplier {
function WithMotorBackwardPin (line 96) | func WithMotorBackwardPin(pin string) motorOptionApplier {
FILE: drivers/gpio/motor_driver_test.go
function initTestMotorDriver (line 16) | func initTestMotorDriver() *MotorDriver {
function TestMotorDriver (line 20) | func TestMotorDriver(t *testing.T) {
function TestNewMotorDriver (line 25) | func TestNewMotorDriver(t *testing.T) {
function TestNewMotorDriver_options (line 51) | func TestNewMotorDriver_options(t *testing.T) {
function TestMotor_WithMotorDirectionPin (line 70) | func TestMotor_WithMotorDirectionPin(t *testing.T) {
function TestMotor_WithMotorForwardPin (line 80) | func TestMotor_WithMotorForwardPin(t *testing.T) {
function TestMotor_WithMotorBackwardPin (line 90) | func TestMotor_WithMotorBackwardPin(t *testing.T) {
function TestMotorIsOn (line 100) | func TestMotorIsOn(t *testing.T) {
function TestMotorIsOff (line 112) | func TestMotorIsOff(t *testing.T) {
function TestMotorOn (line 118) | func TestMotorOn(t *testing.T) {
function TestMotorOff (line 131) | func TestMotorOff(t *testing.T) {
function TestMotorToggle (line 144) | func TestMotorToggle(t *testing.T) {
function TestMotorRunMin (line 153) | func TestMotorRunMin(t *testing.T) {
function TestMotorRunMax (line 158) | func TestMotorRunMax(t *testing.T) {
function TestMotorSetSpeed (line 163) | func TestMotorSetSpeed(t *testing.T) {
function TestMotorForward (line 168) | func TestMotorForward(t *testing.T) {
function TestMotorBackward (line 175) | func TestMotorBackward(t *testing.T) {
function TestMotorSetDirection (line 182) | func TestMotorSetDirection(t *testing.T) {
function TestMotorDigital (line 190) | func TestMotorDigital(t *testing.T) {
FILE: drivers/gpio/pir_motion_driver.go
type pirMotionOptionApplier (line 11) | type pirMotionOptionApplier interface
type pirMotionConfiguration (line 16) | type pirMotionConfiguration struct
type pirMotionReadIntervalOption (line 21) | type pirMotionReadIntervalOption
method String (line 155) | func (o pirMotionReadIntervalOption) String() string {
method apply (line 159) | func (o pirMotionReadIntervalOption) apply(cfg *pirMotionConfiguration) {
type PIRMotionDriver (line 28) | type PIRMotionDriver struct
method Active (line 76) | func (d *PIRMotionDriver) Active() bool {
method initialize (line 96) | func (d *PIRMotionDriver) initialize() error {
method shutdown (line 126) | func (d *PIRMotionDriver) shutdown() error {
method update (line 136) | func (d *PIRMotionDriver) update(newValue int) {
function NewPIRMotionDriver (line 44) | func NewPIRMotionDriver(a DigitalReader, pin string, opts ...interface{}...
function WithPIRMotionPollInterval (line 71) | func WithPIRMotionPollInterval(interval time.Duration) pirMotionOptionAp...
FILE: drivers/gpio/pir_motion_driver_test.go
constant motionTestDelay (line 19) | motionTestDelay = 150
function initTestPIRMotionDriverWithStubbedAdaptor (line 21) | func initTestPIRMotionDriverWithStubbedAdaptor() (*PIRMotionDriver, *gpi...
function TestNewPIRMotionDriver (line 27) | func TestNewPIRMotionDriver(t *testing.T) {
function TestNewPIRMotionDriver_options (line 50) | func TestNewPIRMotionDriver_options(t *testing.T) {
function TestPIRMotionStart (line 71) | func TestPIRMotionStart(t *testing.T) {
function TestPIRMotionHalt (line 146) | func TestPIRMotionHalt(t *testing.T) {
function TestPIRMotionActive (line 166) | func TestPIRMotionActive(t *testing.T) {
FILE: drivers/gpio/relay_driver.go
type relayOptionApplier (line 10) | type relayOptionApplier interface
type relayConfiguration (line 15) | type relayConfiguration struct
type relayInvertedOption (line 20) | type relayInvertedOption
method String (line 132) | func (o relayInvertedOption) String() string {
method apply (line 136) | func (o relayInvertedOption) apply(cfg *relayConfiguration) {
type RelayDriver (line 23) | type RelayDriver struct
method State (line 81) | func (d *RelayDriver) State() bool {
method On (line 89) | func (d *RelayDriver) On() error {
method Off (line 104) | func (d *RelayDriver) Off() error {
method Toggle (line 119) | func (d *RelayDriver) Toggle() error {
method IsInverted (line 128) | func (d *RelayDriver) IsInverted() bool {
function NewRelayDriver (line 42) | func NewRelayDriver(a DigitalWriter, pin string, opts ...interface{}) *R...
function WithRelayInverted (line 76) | func WithRelayInverted() relayOptionApplier {
FILE: drivers/gpio/relay_driver_test.go
method High (line 17) | func (l *RelayDriver) High() bool { return l.high }
function initTestRelayDriver (line 19) | func initTestRelayDriver() (*RelayDriver, *gpioTestAdaptor) {
function TestNewRelayDriver (line 30) | func TestNewRelayDriver(t *testing.T) {
function TestNewRelayDriver_options (line 51) | func TestNewRelayDriver_options(t *testing.T) {
function TestRelayToggle (line 70) | func TestRelayToggle(t *testing.T) {
function TestRelayToggleInverted (line 89) | func TestRelayToggleInverted(t *testing.T) {
function TestRelay_Commands (line 109) | func TestRelay_Commands(t *testing.T) {
function TestRelay_CommandsInverted (line 130) | func TestRelay_CommandsInverted(t *testing.T) {
FILE: drivers/gpio/rgb_led_driver.go
type RgbLedDriver (line 8) | type RgbLedDriver struct
method Pin (line 65) | func (d *RgbLedDriver) Pin() string {
method RedPin (line 70) | func (d *RgbLedDriver) RedPin() string { return d.pinRed }
method GreenPin (line 73) | func (d *RgbLedDriver) GreenPin() string { return d.pinGreen }
method BluePin (line 76) | func (d *RgbLedDriver) BluePin() string { return d.pinBlue }
method State (line 79) | func (d *RgbLedDriver) State() bool {
method On (line 84) | func (d *RgbLedDriver) On() error {
method Off (line 102) | func (d *RgbLedDriver) Off() error {
method Toggle (line 120) | func (d *RgbLedDriver) Toggle() error {
method SetLevel (line 129) | func (d *RgbLedDriver) SetLevel(pin string, level byte) error {
method SetRGB (line 134) | func (d *RgbLedDriver) SetRGB(r, g, b byte) error {
function NewRgbLedDriver (line 32) | func NewRgbLedDriver(a PwmWriter, redPin string, greenPin string, bluePi...
FILE: drivers/gpio/rgb_led_driver_test.go
function initTestRgbLedDriver (line 18) | func initTestRgbLedDriver() *RgbLedDriver {
function TestNewRgbLedDriver (line 29) | func TestNewRgbLedDriver(t *testing.T) {
function TestNewRgbLedDriver_options (line 55) | func TestNewRgbLedDriver_options(t *testing.T) {
function TestRgbLed_Commands (line 74) | func TestRgbLed_Commands(t *testing.T) {
function TestRgbLedDriverToggle (line 100) | func TestRgbLedDriverToggle(t *testing.T) {
function TestRgbLedSetLevel (line 109) | func TestRgbLedSetLevel(t *testing.T) {
FILE: drivers/gpio/servo_driver.go
type ServoDriver (line 10) | type ServoDriver struct
method Move (line 53) | func (d *ServoDriver) Move(angle uint8) error {
method ToMin (line 62) | func (d *ServoDriver) ToMin() error {
method ToCenter (line 67) | func (d *ServoDriver) ToCenter() error {
method ToMax (line 72) | func (d *ServoDriver) ToMax() error {
method Angle (line 77) | func (d *ServoDriver) Angle() uint8 {
function NewServoDriver (line 28) | func NewServoDriver(a ServoWriter, pin string, opts ...interface{}) *Ser...
FILE: drivers/gpio/servo_driver_test.go
function initTestServoDriver (line 18) | func initTestServoDriver() *ServoDriver {
function TestNewServoDriver (line 22) | func TestNewServoDriver(t *testing.T) {
function TestNewServoDriver_options (line 42) | func TestNewServoDriver_options(t *testing.T) {
function TestServo_Commands (line 61) | func TestServo_Commands(t *testing.T) {
function TestServoMove (line 84) | func TestServoMove(t *testing.T) {
function TestServoMin (line 92) | func TestServoMin(t *testing.T) {
function TestServoMax (line 99) | func TestServoMax(t *testing.T) {
function TestServoCenter (line 105) | func TestServoCenter(t *testing.T) {
FILE: drivers/gpio/stepper_driver.go
constant stepperDriverDebug (line 18) | stepperDriverDebug = false
constant StepperDriverForward (line 21) | StepperDriverForward = "forward"
constant StepperDriverBackward (line 23) | StepperDriverBackward = "backward"
type phase (line 26) | type phase
type StepperDriver (line 62) | type StepperDriver struct
method Move (line 150) | func (d *StepperDriver) Move(stepsToMove int) error {
method MoveDeg (line 166) | func (d *StepperDriver) MoveDeg(degs int) error {
method Run (line 184) | func (d *StepperDriver) Run() error {
method IsMoving (line 192) | func (d *StepperDriver) IsMoving() bool {
method Stop (line 197) | func (d *StepperDriver) Stop() error {
method Sleep (line 209) | func (d *StepperDriver) Sleep() error {
method SetDirection (line 215) | func (d *StepperDriver) SetDirection(direction string) error {
method MaxSpeed (line 239) | func (d *StepperDriver) MaxSpeed() uint {
method SetSpeed (line 246) | func (d *StepperDriver) SetSpeed(rpm uint) error {
method CurrentStep (line 267) | func (d *StepperDriver) CurrentStep() int {
method SetHaltIfRunning (line 277) | func (d *StepperDriver) SetHaltIfRunning(val bool) {
method shutdown (line 282) | func (d *StepperDriver) shutdown() error {
method stepAsynch (line 287) | func (d *StepperDriver) stepAsynch(stepsToMove float64) error {
method getDelayPerStep (line 431) | func (d *StepperDriver) getDelayPerStep() time.Duration {
method phasedStepping (line 439) | func (d *StepperDriver) phasedStepping() error {
method sleepOuputs (line 473) | func (d *StepperDriver) sleepOuputs() error {
method stopIfRunning (line 483) | func (d *StepperDriver) stopIfRunning() error {
method debug (line 495) | func (d *StepperDriver) debug(text string) {
function NewStepperDriver (line 91) | func NewStepperDriver(
FILE: drivers/gpio/stepper_driver_test.go
function initTestStepperDriverWithStubbedAdaptor (line 16) | func initTestStepperDriverWithStubbedAdaptor() (*StepperDriver, *gpioTes...
function TestNewStepperDriver (line 24) | func TestNewStepperDriver(t *testing.T) {
function TestNewStepperDriver_options (line 48) | func TestNewStepperDriver_options(t *testing.T) {
function TestStepperMove_IsMoving (line 68) | func TestStepperMove_IsMoving(t *testing.T) {
function TestStepperRun_IsMoving (line 179) | func TestStepperRun_IsMoving(t *testing.T) {
function TestStepperStop_IsMoving (line 267) | func TestStepperStop_IsMoving(t *testing.T) {
function TestStepperHalt_IsMoving (line 301) | func TestStepperHalt_IsMoving(t *testing.T) {
function TestStepperSetDirection (line 329) | func TestStepperSetDirection(t *testing.T) {
function TestStepperMaxSpeed (line 367) | func TestStepperMaxSpeed(t *testing.T) {
function TestStepperSetSpeed (line 410) | func TestStepperSetSpeed(t *testing.T) {
FILE: drivers/gpio/tm1638_driver.go
constant TM1638None (line 12) | TM1638None = iota
constant TM1638Red (line 13) | TM1638Red
constant TM1638Green (line 14) | TM1638Green
constant TM1638DataCmd (line 19) | TM1638DataCmd = 0x40
constant TM1638DispCtrl (line 20) | TM1638DispCtrl = 0x80
constant TM1638AddrCmd (line 21) | TM1638AddrCmd = 0xC0
constant TM1638WriteDisp (line 23) | TM1638WriteDisp = 0x00
constant TM1638ReadKeys (line 24) | TM1638ReadKeys = 0x02
constant TM1638FixedAddr (line 25) | TM1638FixedAddr = 0x04
type TM1638Driver (line 35) | type TM1638Driver struct
method SetLED (line 65) | func (d *TM1638Driver) SetLED(color byte, pos byte) error {
method SetDisplay (line 73) | func (d *TM1638Driver) SetDisplay(data []byte) error {
method SetDisplayText (line 84) | func (d *TM1638Driver) SetDisplayText(text string) error {
method SendChar (line 96) | func (d *TM1638Driver) SendChar(pos byte, data byte, dot bool) error {
method AddFonts (line 108) | func (d *TM1638Driver) AddFonts(fonts map[string]byte) {
method ClearFonts (line 115) | func (d *TM1638Driver) ClearFonts() {
method initialize (line 120) | func (d *TM1638Driver) initialize() error {
method fromStringToByteArray (line 151) | func (d *TM1638Driver) fromStringToByteArray(str string) []byte {
method sendData (line 164) | func (d *TM1638Driver) sendData(address byte, data byte) error {
method sendCommand (line 181) | func (d *TM1638Driver) sendCommand(cmd byte) error {
method send (line 192) | func (d *TM1638Driver) send(data byte) error {
function NewTM1638Driver (line 49) | func NewTM1638Driver(a gobot.Connection, clockPin, dataPin, strobePin st...
function NewTM1638Fonts (line 218) | func NewTM1638Fonts() map[string]byte {
FILE: drivers/gpio/tm1638_driver_test.go
function initTestTM1638Driver (line 16) | func initTestTM1638Driver() *TM1638Driver {
function initTestTM1638DriverWithStubbedAdaptor (line 21) | func initTestTM1638DriverWithStubbedAdaptor() (*TM1638Driver, *gpioTestA...
function TestNewTM1638Driver (line 26) | func TestNewTM1638Driver(t *testing.T) {
function TestNewTM1638Driver_options (line 48) | func TestNewTM1638Driver_options(t *testing.T) {
function TestTM1638Start (line 67) | func TestTM1638Start(t *testing.T) {
function TestTM1638FromStringToByteArray (line 74) | func TestTM1638FromStringToByteArray(t *testing.T) {
function TestTM1638AddFonts (line 80) | func TestTM1638AddFonts(t *testing.T) {
function TestTM1638ClearFonts (line 87) | func TestTM1638ClearFonts(t *testing.T) {
FILE: drivers/i2c/adafruit1109_driver.go
constant adafruit1109Debug (line 12) | adafruit1109Debug = false
type adafruit1109PortPin (line 14) | type adafruit1109PortPin struct
method String (line 291) | func (ap *adafruit1109PortPin) String() string {
type Adafruit1109Driver (line 24) | type Adafruit1109Driver struct
method Connect (line 97) | func (d *Adafruit1109Driver) Connect() error { return nil }
method Finalize (line 101) | func (d *Adafruit1109Driver) Finalize() error { return nil }
method Name (line 104) | func (d *Adafruit1109Driver) Name() string {
method SetName (line 109) | func (d *Adafruit1109Driver) SetName(n string) { d.name = n }
method Connection (line 112) | func (d *Adafruit1109Driver) Connection() gobot.Connection { return d....
method Start (line 115) | func (d *Adafruit1109Driver) Start() error {
method Halt (line 166) | func (d *Adafruit1109Driver) Halt() error {
method DigitalWrite (line 206) | func (d *Adafruit1109Driver) DigitalWrite(id string, val byte) error {
method DigitalRead (line 214) | func (d *Adafruit1109Driver) DigitalRead(id string) (int, error) {
method SetRGB (line 225) | func (d *Adafruit1109Driver) SetRGB(r, g, b bool) error {
method SelectButton (line 259) | func (d *Adafruit1109Driver) SelectButton() (uint8, error) {
method UpButton (line 264) | func (d *Adafruit1109Driver) UpButton() (uint8, error) {
method DownButton (line 269) | func (d *Adafruit1109Driver) DownButton() (uint8, error) {
method LeftButton (line 274) | func (d *Adafruit1109Driver) LeftButton() (uint8, error) {
method RightButton (line 279) | func (d *Adafruit1109Driver) RightButton() (uint8, error) {
method writePin (line 283) | func (d *Adafruit1109Driver) writePin(ap adafruit1109PortPin, val uint...
method readPin (line 287) | func (d *Adafruit1109Driver) readPin(ap adafruit1109PortPin) (uint8, e...
method adafruit1109InitButton (line 304) | func (d *Adafruit1109Driver) adafruit1109InitButton(p adafruit1109Port...
method debuglnf (line 320) | func (d *Adafruit1109Driver) debuglnf(format string, p ...interface{}) {
function NewAdafruit1109Driver (line 53) | func NewAdafruit1109Driver(a Connector, options ...func(Config)) *Adafru...
function adafruit1109ParseID (line 295) | func adafruit1109ParseID(id string) adafruit1109PortPin {
FILE: drivers/i2c/adafruit1109_driver_test.go
function initTestAdafruit1109WithStubbedAdaptor (line 17) | func initTestAdafruit1109WithStubbedAdaptor() (*Adafruit1109Driver, *i2c...
function TestNewAdafruit1109Driver (line 22) | func TestNewAdafruit1109Driver(t *testing.T) {
function TestAdafruit1109Connect (line 52) | func TestAdafruit1109Connect(t *testing.T) {
function TestAdafruit1109Finalize (line 57) | func TestAdafruit1109Finalize(t *testing.T) {
function TestAdafruit1109SetName (line 62) | func TestAdafruit1109SetName(t *testing.T) {
function TestAdafruit1109Start (line 68) | func TestAdafruit1109Start(t *testing.T) {
function TestAdafruit1109StartWriteErr (line 73) | func TestAdafruit1109StartWriteErr(t *testing.T) {
function TestAdafruit1109StartReadErr (line 81) | func TestAdafruit1109StartReadErr(t *testing.T) {
function TestAdafruit1109Halt (line 89) | func TestAdafruit1109Halt(t *testing.T) {
function TestAdafruit1109DigitalRead (line 96) | func TestAdafruit1109DigitalRead(t *testing.T) {
function TestAdafruit1109SelectButton (line 143) | func TestAdafruit1109SelectButton(t *testing.T) {
function TestAdafruit1109UpButton (line 173) | func TestAdafruit1109UpButton(t *testing.T) {
function TestAdafruit1109DownButton (line 203) | func TestAdafruit1109DownButton(t *testing.T) {
function TestAdafruit1109LeftButton (line 233) | func TestAdafruit1109LeftButton(t *testing.T) {
function TestAdafruit1109RightButton (line 263) | func TestAdafruit1109RightButton(t *testing.T) {
function TestAdafruit1109_parseID (line 293) | func TestAdafruit1109_parseID(t *testing.T) {
FILE: drivers/i2c/adafruit2327_driver.go
type Adafruit2327Driver (line 12) | type Adafruit2327Driver struct
method SetServoMotorFreq (line 37) | func (d *Adafruit2327Driver) SetServoMotorFreq(freq float64) error {
method SetServoMotorPulse (line 43) | func (d *Adafruit2327Driver) SetServoMotorPulse(channel byte, on, off ...
function NewAdafruit2327Driver (line 25) | func NewAdafruit2327Driver(c Connector, options ...func(Config)) *Adafru...
FILE: drivers/i2c/adafruit2327_driver_test.go
function initTestAdafruit2327WithStubbedAdaptor (line 17) | func initTestAdafruit2327WithStubbedAdaptor() (*Adafruit2327Driver, *i2c...
function TestNewAdafruit2327Driver (line 26) | func TestNewAdafruit2327Driver(t *testing.T) {
function TestAdafruit2327Halt (line 35) | func TestAdafruit2327Halt(t *testing.T) {
function TestAdafruit2327Options (line 44) | func TestAdafruit2327Options(t *testing.T) {
function TestAdafruit2327SetServoMotorFreq (line 53) | func TestAdafruit2327SetServoMotorFreq(t *testing.T) {
function TestAdafruit2327SetServoMotorFreqError (line 65) | func TestAdafruit2327SetServoMotorFreqError(t *testing.T) {
function TestAdafruit2327SetServoMotorPulse (line 76) | func TestAdafruit2327SetServoMotorPulse(t *testing.T) {
function TestAdafruit2327SetServoMotorPulseError (line 92) | func TestAdafruit2327SetServoMotorPulseError(t *testing.T) {
FILE: drivers/i2c/adafruit2348_driver.go
constant adafruit2348Debug (line 12) | adafruit2348Debug = false
constant adafruit2348MotorHatDefaultAddress (line 15) | adafruit2348MotorHatDefaultAddress = 0x60
constant adafruit2348StepperMicrosteps (line 16) | adafruit2348StepperMicrosteps = 8
type Adafruit2348Direction (line 20) | type Adafruit2348Direction
type Adafruit2348StepStyle (line 23) | type Adafruit2348StepStyle
constant Adafruit2348Forward (line 27) | Adafruit2348Forward Adafruit2348Direction = iota
constant Adafruit2348Backward (line 28) | Adafruit2348Backward
constant Adafruit2348Release (line 29) | Adafruit2348Release
constant Adafruit2348Single (line 34) | Adafruit2348Single Adafruit2348StepStyle = iota
constant Adafruit2348Double (line 35) | Adafruit2348Double
constant Adafruit2348Interleave (line 36) | Adafruit2348Interleave
constant Adafruit2348Microstep (line 37) | Adafruit2348Microstep
type adafruit2348DCMotor (line 40) | type adafruit2348DCMotor struct
type adafruit2348StepperMotor (line 44) | type adafruit2348StepperMotor struct
type Adafruit2348Driver (line 58) | type Adafruit2348Driver struct
method SetDCMotorSpeed (line 128) | func (d *Adafruit2348Driver) SetDCMotorSpeed(dcMotor int, speed int32)...
method RunDCMotor (line 133) | func (d *Adafruit2348Driver) RunDCMotor(dcMotor int, dir Adafruit2348D...
method SetStepperMotorSpeed (line 161) | func (d *Adafruit2348Driver) SetStepperMotorSpeed(stepperMotor int, rp...
method Step (line 171) | func (d *Adafruit2348Driver) Step(motor, steps int, dir Adafruit2348Di...
method oneStep (line 207) | func (d *Adafruit2348Driver) oneStep(motor int, dir Adafruit2348Direct...
method setPin (line 330) | func (d *Adafruit2348Driver) setPin(pin byte, value int32) error {
function NewAdafruit2348Driver (line 77) | func NewAdafruit2348Driver(c Connector, options ...func(Config)) *Adafru...
FILE: drivers/i2c/adafruit2348_driver_test.go
function initTestAdafruit2348WithStubbedAdaptor (line 17) | func initTestAdafruit2348WithStubbedAdaptor() (*Adafruit2348Driver, *i2c...
function TestNewAdafruit2348Driver (line 26) | func TestNewAdafruit2348Driver(t *testing.T) {
function TestAdafruit2348Halt (line 36) | func TestAdafruit2348Halt(t *testing.T) {
function TestAdafruit2348Options (line 45) | func TestAdafruit2348Options(t *testing.T) {
function TestAdafruit2348SetDCMotorSpeed (line 55) | func TestAdafruit2348SetDCMotorSpeed(t *testing.T) {
function TestAdafruit2348SetDCMotorSpeedError (line 70) | func TestAdafruit2348SetDCMotorSpeedError(t *testing.T) {
function TestAdafruit2348RunDCMotor (line 80) | func TestAdafruit2348RunDCMotor(t *testing.T) {
function TestAdafruit2348RunDCMotorError (line 90) | func TestAdafruit2348RunDCMotorError(t *testing.T) {
function TestAdafruit2348SetStepperMotorSpeed (line 103) | func TestAdafruit2348SetStepperMotorSpeed(t *testing.T) {
function TestAdafruit2348StepperSingleStep (line 115) | func TestAdafruit2348StepperSingleStep(t *testing.T) {
function TestAdafruit2348StepperDoubleStep (line 130) | func TestAdafruit2348StepperDoubleStep(t *testing.T) {
function TestAdafruit2348StepperInterleaveStep (line 145) | func TestAdafruit2348StepperInterleaveStep(t *testing.T) {
function TestAdafruit2348StepperMicroStep (line 160) | func TestAdafruit2348StepperMicroStep(t *testing.T) {
FILE: drivers/i2c/ads1x15_driver.go
constant ads1x15DefaultAddress (line 12) | ads1x15DefaultAddress = 0x48
constant ads1x15Debug (line 15) | ads1x15Debug = false
constant ads1x15WaitMaxCount (line 16) | ads1x15WaitMaxCount = 200
constant ads1x15FullScaleValue (line 17) | ads1x15FullScaleValue = 0x7FFF
constant ads1x15PointerConversion (line 22) | ads1x15PointerConversion = 0x00
constant ads1x15PointerConfig (line 23) | ads1x15PointerConfig = 0x01
constant ads1x15PointerLowThreshold (line 24) | ads1x15PointerLowThreshold = 0x02
constant ads1x15PointerHighThreshold (line 25) | ads1x15PointerHighThreshold = 0x03
constant ads1x15ConfigCompQueDisable (line 28) | ads1x15ConfigCompQueDisable = 0x0003
constant ads1x15ConfigCompLatching (line 29) | ads1x15ConfigCompLatching = 0x0004
constant ads1x15ConfigCompActiveHigh (line 30) | ads1x15ConfigCompActiveHigh = 0x0008
constant ads1x15ConfigCompWindow (line 31) | ads1x15ConfigCompWindow = 0x0010
constant ads1x15ConfigModeContinuous (line 33) | ads1x15ConfigModeContinuous = 0x0000
constant ads1x15ConfigModeSingle (line 34) | ads1x15ConfigModeSingle = 0x0100
constant ads1x15ConfigOsSingle (line 35) | ads1x15ConfigOsSingle = 0x8000
constant ads1x15ConfigMuxOffset (line 36) | ads1x15ConfigMuxOffset = 12
constant ads1x15ConfigPgaOffset (line 37) | ads1x15ConfigPgaOffset = 9
type ads1x15ChanCfg (line 40) | type ads1x15ChanCfg struct
type ADS1x15Driver (line 52) | type ADS1x15Driver struct
method ReadDifferenceWithDefaults (line 290) | func (d *ADS1x15Driver) ReadDifferenceWithDefaults(diff int) (float64,...
method ReadDifference (line 306) | func (d *ADS1x15Driver) ReadDifference(diff int, gain int, dataRate in...
method ReadWithDefaults (line 318) | func (d *ADS1x15Driver) ReadWithDefaults(channel int) (float64, error) {
method Read (line 329) | func (d *ADS1x15Driver) Read(channel int, gain int, dataRate int) (flo...
method AnalogRead (line 340) | func (d *ADS1x15Driver) AnalogRead(pin string) (int, error) {
method readVoltage (line 374) | func (d *ADS1x15Driver) readVoltage(channel int, channelOffset int, ga...
method rawRead (line 388) | func (d *ADS1x15Driver) rawRead(channel int, channelOffset int, gain i...
method checkChannel (line 437) | func (d *ADS1x15Driver) checkChannel(channel int) error {
method waitForConversionFinished (line 444) | func (d *ADS1x15Driver) waitForConversionFinished(delay time.Duration)...
method writeWordBigEndian (line 478) | func (d *ADS1x15Driver) writeWordBigEndian(reg uint8, val uint16) error {
method readWordBigEndian (line 482) | func (d *ADS1x15Driver) readWordBigEndian(reg uint8) (uint16, error) {
method setChannelDataRates (line 490) | func (d *ADS1x15Driver) setChannelDataRates(ddr int) {
method setChannelGains (line 496) | func (d *ADS1x15Driver) setChannelGains(gain int) {
function NewADS1015Driver (line 72) | func NewADS1015Driver(a Connector, options ...func(Config)) *ADS1x15Driv...
function NewADS1115Driver (line 88) | func NewADS1115Driver(a Connector, options ...func(Config)) *ADS1x15Driv...
function newADS1x15Driver (line 104) | func newADS1x15Driver(c Connector, name string, drs map[int]uint16, ddr ...
function WithADS1x15BestGainForVoltage (line 159) | func WithADS1x15BestGainForVoltage(voltage float64) func(Config) {
function WithADS1x15ChannelBestGainForVoltage (line 176) | func WithADS1x15ChannelBestGainForVoltage(channel int, voltage float64) ...
function WithADS1x15Gain (line 194) | func WithADS1x15Gain(val int) func(Config) {
function WithADS1x15ChannelGain (line 211) | func WithADS1x15ChannelGain(channel int, val int) func(Config) {
function WithADS1x15DataRate (line 231) | func WithADS1x15DataRate(val int) func(Config) {
function WithADS1x15ChannelDataRate (line 248) | func WithADS1x15ChannelDataRate(channel int, val int) func(Config) {
function WithADS1x15WaitSingleCycle (line 273) | func WithADS1x15WaitSingleCycle() func(Config) {
function ads1x15GetFullScaleRange (line 502) | func ads1x15GetFullScaleRange(gain int) (float64, error) {
function ads1x15GetDataRateBits (line 516) | func ads1x15GetDataRateBits(dataRates map[int]uint16, dataRate int) (uin...
function ads1x15BestGainForVoltage (line 531) | func ads1x15BestGainForVoltage(voltage float64) (int, error) {
FILE: drivers/i2c/ads1x15_driver_1015_test.go
function initTestADS1015DriverWithStubbedAdaptor (line 12) | func initTestADS1015DriverWithStubbedAdaptor() (*ADS1x15Driver, *i2cTest...
function TestNewADS1015Driver (line 21) | func TestNewADS1015Driver(t *testing.T) {
function TestADS1015Halt (line 35) | func TestADS1015Halt(t *testing.T) {
function TestADS1015Options (line 44) | func TestADS1015Options(t *testing.T) {
function TestADS1015WithADS1x15BestGainForVoltage (line 55) | func TestADS1015WithADS1x15BestGainForVoltage(t *testing.T) {
function TestADS1015WithADS1x15ChannelBestGainForVoltage (line 63) | func TestADS1015WithADS1x15ChannelBestGainForVoltage(t *testing.T) {
function TestADS1015AnalogRead (line 75) | func TestADS1015AnalogRead(t *testing.T) {
function TestADS1x15AnalogReadError (line 120) | func TestADS1x15AnalogReadError(t *testing.T) {
function TestADS1x15AnalogReadInvalidPin (line 131) | func TestADS1x15AnalogReadInvalidPin(t *testing.T) {
function TestADS1x15AnalogReadWriteError (line 138) | func TestADS1x15AnalogReadWriteError(t *testing.T) {
function TestADS1x15ReadInvalidChannel (line 155) | func TestADS1x15ReadInvalidChannel(t *testing.T) {
function TestADS1x15ReadInvalidGain (line 162) | func TestADS1x15ReadInvalidGain(t *testing.T) {
function TestADS1x15ReadInvalidDataRate (line 169) | func TestADS1x15ReadInvalidDataRate(t *testing.T) {
function TestADS1x15ReadDifferenceInvalidChannel (line 176) | func TestADS1x15ReadDifferenceInvalidChannel(t *testing.T) {
function TestADS1015_rawRead (line 183) | func TestADS1015_rawRead(t *testing.T) {
FILE: drivers/i2c/ads1x15_driver_1115_test.go
function initTestADS1115DriverWithStubbedAdaptor (line 12) | func initTestADS1115DriverWithStubbedAdaptor() (*ADS1x15Driver, *i2cTest...
function TestNewADS1115Driver (line 21) | func TestNewADS1115Driver(t *testing.T) {
function TestADS1115Halt (line 35) | func TestADS1115Halt(t *testing.T) {
function TestADS1115Options (line 44) | func TestADS1115Options(t *testing.T) {
function TestADS1115WithADS1x15BestGainForVoltage (line 55) | func TestADS1115WithADS1x15BestGainForVoltage(t *testing.T) {
function TestADS1115WithADS1x15ChannelBestGainForVoltage (line 63) | func TestADS1115WithADS1x15ChannelBestGainForVoltage(t *testing.T) {
function TestADS1115AnalogRead (line 75) | func TestADS1115AnalogRead(t *testing.T) {
function TestADS1115AnalogReadError (line 120) | func TestADS1115AnalogReadError(t *testing.T) {
function TestADS1115AnalogReadInvalidPin (line 131) | func TestADS1115AnalogReadInvalidPin(t *testing.T) {
function TestADS1115AnalogReadWriteError (line 138) | func TestADS1115AnalogReadWriteError(t *testing.T) {
function TestADS1115ReadInvalidChannel (line 155) | func TestADS1115ReadInvalidChannel(t *testing.T) {
function TestADS1115ReadInvalidGain (line 162) | func TestADS1115ReadInvalidGain(t *testing.T) {
function TestADS1115ReadInvalidDataRate (line 169) | func TestADS1115ReadInvalidDataRate(t *testing.T) {
function TestADS1115ReadDifferenceInvalidChannel (line 176) | func TestADS1115ReadDifferenceInvalidChannel(t *testing.T) {
function TestADS1115_rawRead (line 183) | func TestADS1115_rawRead(t *testing.T) {
FILE: drivers/i2c/ads1x15_driver_test.go
function initTestADS1x15DriverWithStubbedAdaptor (line 21) | func initTestADS1x15DriverWithStubbedAdaptor() (*ADS1x15Driver, *i2cTest...
function TestADS1x15CommandsReadDifferenceWithDefaults (line 47) | func TestADS1x15CommandsReadDifferenceWithDefaults(t *testing.T) {
function TestADS1x15CommandsReadDifference (line 57) | func TestADS1x15CommandsReadDifference(t *testing.T) {
function TestADS1x15CommandsReadWithDefaults (line 67) | func TestADS1x15CommandsReadWithDefaults(t *testing.T) {
function TestADS1x15CommandsRead (line 77) | func TestADS1x15CommandsRead(t *testing.T) {
function TestADS1x15CommandsAnalogRead (line 87) | func TestADS1x15CommandsAnalogRead(t *testing.T) {
function TestADS1x15_ads1x15BestGainForVoltage (line 100) | func TestADS1x15_ads1x15BestGainForVoltage(t *testing.T) {
FILE: drivers/i2c/adxl345_driver.go
constant adxl345Debug (line 8) | adxl345Debug = false
constant ADXL345AddressPullUp (line 13) | ADXL345AddressPullUp = 0x1D
constant adxl345DefaultAddress (line 14) | adxl345DefaultAddress = 0x53
type ADXL345RateConfig (line 18) | type ADXL345RateConfig
type ADXL345FsRangeConfig (line 19) | type ADXL345FsRangeConfig
constant adxl345Reg_DEVID (line 24) | adxl345Reg_DEVID = 0x00
constant adxl345Reg_THRESH_TAP (line 25) | adxl345Reg_THRESH_TAP = 0x1D
constant adxl345Reg_OFSX (line 26) | adxl345Reg_OFSX = 0x1E
constant adxl345Reg_OFSY (line 27) | adxl345Reg_OFSY = 0x1F
constant adxl345Reg_OFSZ (line 28) | adxl345Reg_OFSZ = 0x20
constant adxl345Reg_DUR (line 29) | adxl345Reg_DUR = 0x21
constant adxl345Reg_LATENT (line 30) | adxl345Reg_LATENT = 0x22
constant adxl345Reg_WINDOW (line 31) | adxl345Reg_WINDOW = 0x23
constant adxl345Reg_THRESH_ACT (line 32) | adxl345Reg_THRESH_ACT = 0x24
constant adxl345Reg_THRESH_INACT (line 33) | adxl345Reg_THRESH_INACT = 0x25
constant adxl345Reg_TIME_INACT (line 34) | adxl345Reg_TIME_INACT = 0x26
constant adxl345Reg_ACT_INACT_CTL (line 35) | adxl345Reg_ACT_INACT_CTL = 0x27
constant adxl345Reg_THRESH_FF (line 36) | adxl345Reg_THRESH_FF = 0x28
constant adxl345Reg_TIME_FF (line 37) | adxl345Reg_TIME_FF = 0x29
constant adxl345Reg_TAP_AXES (line 38) | adxl345Reg_TAP_AXES = 0x2A
constant adxl345Reg_ACT_TAP_STATUS (line 39) | adxl345Reg_ACT_TAP_STATUS = 0x2B
constant adxl345Reg_BW_RATE (line 40) | adxl345Reg_BW_RATE = 0x2C
constant adxl345Reg_POWER_CTL (line 41) | adxl345Reg_POWER_CTL = 0x2D
constant adxl345Reg_INT_ENABLE (line 42) | adxl345Reg_INT_ENABLE = 0x2E
constant adxl345Reg_INT_MAP (line 43) | adxl345Reg_INT_MAP = 0x2F
constant adxl345Reg_INT_SOUCE (line 44) | adxl345Reg_INT_SOUCE = 0x30
constant adxl345Reg_DATA_FORMAT (line 45) | adxl345Reg_DATA_FORMAT = 0x31
constant adxl345Reg_DATAX0 (line 46) | adxl345Reg_DATAX0 = 0x32
constant adxl345Reg_DATAX1 (line 47) | adxl345Reg_DATAX1 = 0x33
constant adxl345Reg_DATAY0 (line 48) | adxl345Reg_DATAY0 = 0x34
constant adxl345Reg_DATAY1 (line 49) | adxl345Reg_DATAY1 = 0x35
constant adxl345Reg_DATAZ0 (line 50) | adxl345Reg_DATAZ0 = 0x36
constant adxl345Reg_DATAZ1 (line 51) | adxl345Reg_DATAZ1 = 0x37
constant adxl345Reg_FIFO_CTL (line 52) | adxl345Reg_FIFO_CTL = 0x38
constant adxl345Reg_FIFO_STATUS (line 53) | adxl345Reg_FIFO_STATUS = 0x39
constant adxl345Rate_LowPowerBit (line 55) | adxl345Rate_LowPowerBit = 0x10
constant ADXL345Rate_100mHZ (line 57) | ADXL345Rate_100mHZ ADXL345RateConfig = 0x00
constant ADXL345Rate_200mHZ (line 58) | ADXL345Rate_200mHZ ADXL345RateConfig = 0x01
constant ADXL345Rate_390mHZ (line 59) | ADXL345Rate_390mHZ ADXL345RateConfig = 0x02
constant ADXL345Rate_780mHZ (line 60) | ADXL345Rate_780mHZ ADXL345RateConfig = 0x03
constant ADXL345Rate_1560mHZ (line 61) | ADXL345Rate_1560mHZ ADXL345RateConfig = 0x04
constant ADXL345Rate_3130mHZ (line 62) | ADXL345Rate_3130mHZ ADXL345RateConfig = 0x05
constant ADXL345Rate_6250mHZ (line 63) | ADXL345Rate_6250mHZ ADXL345RateConfig = 0x06
constant ADXL345Rate_12500mHZ (line 64) | ADXL345Rate_12500mHZ ADXL345RateConfig = 0x07
constant ADXL345Rate_25HZ (line 65) | ADXL345Rate_25HZ ADXL345RateConfig = 0x08
constant ADXL345Rate_50HZ (line 66) | ADXL345Rate_50HZ ADXL345RateConfig = 0x09
constant ADXL345Rate_100HZ (line 67) | ADXL345Rate_100HZ ADXL345RateConfig = 0x0A
constant ADXL345Rate_200HZ (line 68) | ADXL345Rate_200HZ ADXL345RateConfig = 0x0B
constant ADXL345Rate_400HZ (line 69) | ADXL345Rate_400HZ ADXL345RateConfig = 0x0C
constant ADXL345Rate_800HZ (line 70) | ADXL345Rate_800HZ ADXL345RateConfig = 0x0D
constant ADXL345Rate_1600HZ (line 71) | ADXL345Rate_1600HZ ADXL345RateConfig = 0x0E
constant ADXL345Rate_3200HZ (line 72) | ADXL345Rate_3200HZ ADXL345RateConfig = 0x0F
constant ADXL345FsRange_2G (line 74) | ADXL345FsRange_2G ADXL345FsRangeConfig = 0x00
constant ADXL345FsRange_4G (line 75) | ADXL345FsRange_4G ADXL345FsRangeConfig = 0x01
constant ADXL345FsRange_8G (line 76) | ADXL345FsRange_8G ADXL345FsRangeConfig = 0x02
constant ADXL345FsRange_16G (line 77) | ADXL345FsRange_16G ADXL345FsRangeConfig = 0x03
type ADXL345Driver (line 86) | type ADXL345Driver struct
method UseLowPower (line 189) | func (d *ADXL345Driver) UseLowPower(lowPower bool) error {
method SetRate (line 198) | func (d *ADXL345Driver) SetRate(rate ADXL345RateConfig) error {
method SetRange (line 207) | func (d *ADXL345Driver) SetRange(fullScaleRange ADXL345FsRangeConfig) ...
method XYZ (line 216) | func (d *ADXL345Driver) XYZ() (float64, float64, float64, error) {
method RawXYZ (line 229) | func (d *ADXL345Driver) RawXYZ() (int16, int16, int16, error) {
method readRawData (line 236) | func (d *ADXL345Driver) readRawData() (int16, int16, int16, error) {
method initialize (line 248) | func (d *ADXL345Driver) initialize() error {
method shutdown (line 262) | func (d *ADXL345Driver) shutdown() error {
type adxl345PowerCtl (line 95) | type adxl345PowerCtl struct
method toByte (line 288) | func (p *adxl345PowerCtl) toByte() uint8 {
type adxl345DataFormat (line 104) | type adxl345DataFormat struct
method convertToG (line 272) | func (d *adxl345DataFormat) convertToG(rawValue int16) float64 {
method toByte (line 297) | func (d *adxl345DataFormat) toByte() uint8 {
type adxl345BwRate (line 114) | type adxl345BwRate struct
method toByte (line 307) | func (b *adxl345BwRate) toByte() uint8 {
function NewADXL345Driver (line 128) | func NewADXL345Driver(c Connector, options ...func(Config)) *ADXL345Driv...
function WithADXL345LowPowerMode (line 154) | func WithADXL345LowPowerMode(val bool) func(Config) {
function WithADXL345DataOutputRate (line 166) | func WithADXL345DataOutputRate(val ADXL345RateConfig) func(Config) {
function WithADXL345FullScaleRange (line 178) | func WithADXL345FullScaleRange(val ADXL345FsRangeConfig) func(Config) {
FILE: drivers/i2c/adxl345_driver_test.go
function initTestADXL345WithStubbedAdaptor (line 18) | func initTestADXL345WithStubbedAdaptor() (*ADXL345Driver, *i2cTestAdapto...
function TestNewADXL345Driver (line 24) | func TestNewADXL345Driver(t *testing.T) {
function TestADXL345Halt (line 39) | func TestADXL345Halt(t *testing.T) {
function TestADXL345Options (line 48) | func TestADXL345Options(t *testing.T) {
function TestADXL345WithADXL345DataOutputRate (line 56) | func TestADXL345WithADXL345DataOutputRate(t *testing.T) {
function TestADXL345WithADXL345FullScaleRange (line 70) | func TestADXL345WithADXL345FullScaleRange(t *testing.T) {
function TestADXL345UseLowPower (line 84) | func TestADXL345UseLowPower(t *testing.T) {
function TestADXL345SetRate (line 106) | func TestADXL345SetRate(t *testing.T) {
function TestADXL345SetRange (line 128) | func TestADXL345SetRange(t *testing.T) {
function TestADXL345RawXYZ (line 150) | func TestADXL345RawXYZ(t *testing.T) {
function TestADXL345RawXYZError (line 209) | func TestADXL345RawXYZError(t *testing.T) {
function TestADXL345XYZ (line 225) | func TestADXL345XYZ(t *testing.T) {
function TestADXL345XYZError (line 276) | func TestADXL345XYZError(t *testing.T) {
function TestADXL345_initialize (line 292) | func TestADXL345_initialize(t *testing.T) {
function TestADXL345_shutdown (line 322) | func TestADXL345_shutdown(t *testing.T) {
FILE: drivers/i2c/bh1750_driver.go
constant bh1750DefaultAddress (line 8) | bh1750DefaultAddress = 0x23
constant BH1750_POWER_DOWN (line 11) | BH1750_POWER_DOWN = 0x00
constant BH1750_POWER_ON (line 12) | BH1750_POWER_ON = 0x01
constant BH1750_RESET (line 13) | BH1750_RESET = 0x07
constant BH1750_CONTINUOUS_HIGH_RES_MODE (line 14) | BH1750_CONTINUOUS_HIGH_RES_MODE = 0x10
constant BH1750_CONTINUOUS_HIGH_RES_MODE_2 (line 15) | BH1750_CONTINUOUS_HIGH_RES_MODE_2 = 0x11
constant BH1750_CONTINUOUS_LOW_RES_MODE (line 16) | BH1750_CONTINUOUS_LOW_RES_MODE = 0x13
constant BH1750_ONE_TIME_HIGH_RES_MODE (line 17) | BH1750_ONE_TIME_HIGH_RES_MODE = 0x20
constant BH1750_ONE_TIME_HIGH_RES_MODE_2 (line 18) | BH1750_ONE_TIME_HIGH_RES_MODE_2 = 0x21
constant BH1750_ONE_TIME_LOW_RES_MODE (line 19) | BH1750_ONE_TIME_LOW_RES_MODE = 0x23
type BH1750Driver (line 23) | type BH1750Driver struct
method RawSensorData (line 54) | func (d *BH1750Driver) RawSensorData() (int, error) {
method Lux (line 70) | func (d *BH1750Driver) Lux() (int, error) {
method initialize (line 77) | func (d *BH1750Driver) initialize() error {
function NewBH1750Driver (line 38) | func NewBH1750Driver(c Connector, options ...func(Config)) *BH1750Driver {
FILE: drivers/i2c/bh1750_driver_test.go
function initTestBH1750DriverWithStubbedAdaptor (line 19) | func initTestBH1750DriverWithStubbedAdaptor() (*BH1750Driver, *i2cTestAd...
function TestNewBH1750Driver (line 28) | func TestNewBH1750Driver(t *testing.T) {
function TestBH1750Options (line 39) | func TestBH1750Options(t *testing.T) {
function TestBH1750Start (line 46) | func TestBH1750Start(t *testing.T) {
function TestBH1750Halt (line 51) | func TestBH1750Halt(t *testing.T) {
function TestBH1750NullLux (line 58) | func TestBH1750NullLux(t *testing.T) {
function TestBH1750Lux (line 64) | func TestBH1750Lux(t *testing.T) {
function TestBH1750NullRawSensorData (line 77) | func TestBH1750NullRawSensorData(t *testing.T) {
function TestBH1750RawSensorData (line 83) | func TestBH1750RawSensorData(t *testing.T) {
function TestBH1750LuxError (line 96) | func TestBH1750LuxError(t *testing.T) {
function TestBH1750RawSensorDataError (line 106) | func TestBH1750RawSensorDataError(t *testing.T) {
FILE: drivers/i2c/blinkm_driver.go
constant blinkmDefaultAddress (line 7) | blinkmDefaultAddress = 0x09
type BlinkMDriver (line 10) | type BlinkMDriver struct
method Rgb (line 64) | func (b *BlinkMDriver) Rgb(red byte, green byte, blue byte) error {
method Fade (line 73) | func (b *BlinkMDriver) Fade(red byte, green byte, blue byte) error {
method FirmwareVersion (line 82) | func (b *BlinkMDriver) FirmwareVersion() (string, error) {
method Color (line 95) | func (b *BlinkMDriver) Color() ([]byte, error) {
method initialize (line 107) | func (b *BlinkMDriver) initialize() error {
function NewBlinkMDriver (line 24) | func NewBlinkMDriver(c Connector, options ...func(Config)) *BlinkMDriver {
FILE: drivers/i2c/blinkm_driver_test.go
function initTestBlinkMDriverWithStubbedAdaptor (line 19) | func initTestBlinkMDriverWithStubbedAdaptor() (*BlinkMDriver, *i2cTestAd...
function TestNewBlinkMDriver (line 28) | func TestNewBlinkMDriver(t *testing.T) {
function TestBlinkMOptions (line 39) | func TestBlinkMOptions(t *testing.T) {
function TestBlinkMStart (line 46) | func TestBlinkMStart(t *testing.T) {
function TestBlinkMHalt (line 51) | func TestBlinkMHalt(t *testing.T) {
function TestNewBlinkMDriverCommands_Rgb (line 59) | func TestNewBlinkMDriverCommands_Rgb(t *testing.T) {
function TestNewBlinkMDriverCommands_Fade (line 66) | func TestNewBlinkMDriverCommands_Fade(t *testing.T) {
function TestNewBlinkMDriverCommands_FirmwareVersion (line 73) | func TestNewBlinkMDriverCommands_FirmwareVersion(t *testing.T) {
function TestNewBlinkMDriverCommands_Color (line 98) | func TestNewBlinkMDriverCommands_Color(t *testing.T) {
function TestBlinkMFirmwareVersion (line 108) | func TestBlinkMFirmwareVersion(t *testing.T) {
function TestBlinkMColor (line 136) | func TestBlinkMColor(t *testing.T) {
function TestBlinkMFade (line 164) | func TestBlinkMFade(t *testing.T) {
function TestBlinkMRGB (line 174) | func TestBlinkMRGB(t *testing.T) {
FILE: drivers/i2c/bme280_driver.go
constant bme280Debug (line 12) | bme280Debug = true
type BME280HumidityOversampling (line 14) | type BME280HumidityOversampling
constant bme280RegCalibDigH1 (line 17) | bme280RegCalibDigH1 = 0xA1
constant bme280RegCalibDigH2LSB (line 18) | bme280RegCalibDigH2LSB = 0xE1
constant bme280RegControlHumidity (line 19) | bme280RegControlHumidity = 0xF2
constant bme280RegHumidityMSB (line 20) | bme280RegHumidityMSB = 0xFD
constant BME280CtrlHumidityNoMeasurement (line 23) | BME280CtrlHumidityNoMeasurement BME280HumidityOversampling = 0x00
constant BME280CtrlHumidityOversampling1 (line 24) | BME280CtrlHumidityOversampling1 BME280HumidityOversampling = 0x01
constant BME280CtrlHumidityOversampling2 (line 25) | BME280CtrlHumidityOversampling2 BME280HumidityOversampling = 0x02
constant BME280CtrlHumidityOversampling4 (line 26) | BME280CtrlHumidityOversampling4 BME280HumidityOversampling = 0x03
constant BME280CtrlHumidityOversampling8 (line 27) | BME280CtrlHumidityOversampling8 BME280HumidityOversampling = 0x04
constant BME280CtrlHumidityOversampling16 (line 28) | BME280CtrlHumidityOversampling16 BME280HumidityOversampling = 0x05
type bmeHumidityCalibrationCoefficients (line 31) | type bmeHumidityCalibrationCoefficients struct
type BME280Driver (line 46) | type BME280Driver struct
method Humidity (line 130) | func (d *BME280Driver) Humidity() (float32, error) {
method initializationBME280 (line 142) | func (d *BME280Driver) initializationBME280() error {
method initHumidity (line 159) | func (d *BME280Driver) initHumidity() error {
method rawHumidity (line 222) | func (d *BME280Driver) rawHumidity() (uint32, error) {
method calculateHumidity (line 240) | func (d *BME280Driver) calculateHumidity(rawH uint32) float32 {
function NewBME280Driver (line 62) | func NewBME280Driver(c Connector, options ...func(Config)) *BME280Driver {
function WithBME280PressureOversampling (line 83) | func WithBME280PressureOversampling(val BMP280PressureOversampling) func...
function WithBME280TemperatureOversampling (line 95) | func WithBME280TemperatureOversampling(val BMP280TemperatureOversampling...
function WithBME280IIRFilter (line 107) | func WithBME280IIRFilter(val BMP280IIRFilter) func(Config) {
function WithBME280HumidityOversampling (line 119) | func WithBME280HumidityOversampling(val BME280HumidityOversampling) func...
FILE: drivers/i2c/bme280_driver_test.go
function initTestBME280WithStubbedAdaptor (line 19) | func initTestBME280WithStubbedAdaptor() (*BME280Driver, *i2cTestAdaptor) {
function TestNewBME280Driver (line 24) | func TestNewBME280Driver(t *testing.T) {
function TestBME280Halt (line 41) | func TestBME280Halt(t *testing.T) {
function TestBME280Options (line 50) | func TestBME280Options(t *testing.T) {
function TestBME280Measurements (line 65) | func TestBME280Measurements(t *testing.T) {
function TestBME280InitH1Error (line 93) | func TestBME280InitH1Error(t *testing.T) {
function TestBME280InitH2Error (line 115) | func TestBME280InitH2Error(t *testing.T) {
function TestBME280HumidityWriteError (line 137) | func TestBME280HumidityWriteError(t *testing.T) {
function TestBME280HumidityReadError (line 149) | func TestBME280HumidityReadError(t *testing.T) {
function TestBME280HumidityNotEnabled (line 161) | func TestBME280HumidityNotEnabled(t *testing.T) {
function TestBME280_initializationBME280 (line 189) | func TestBME280_initializationBME280(t *testing.T) {
FILE: drivers/i2c/bmp180_driver.go
constant bmp180Debug (line 10) | bmp180Debug = false
constant bmp180DefaultAddress (line 13) | bmp180DefaultAddress = 0x77
constant bmp180RegisterAC1MSB (line 16) | bmp180RegisterAC1MSB = 0xAA
constant bmp180RegisterCtl (line 17) | bmp180RegisterCtl = 0xF4
constant bmp180RegisterDataMSB (line 18) | bmp180RegisterDataMSB = 0xF6
constant bmp180CtlTemp (line 20) | bmp180CtlTemp = 0x2E
constant bmp180CtlPressure (line 21) | bmp180CtlPressure = 0x34
constant BMP180UltraLowPower (line 26) | BMP180UltraLowPower BMP180OversamplingMode = iota
constant BMP180Standard (line 28) | BMP180Standard
constant BMP180HighResolution (line 30) | BMP180HighResolution
constant BMP180UltraHighResolution (line 32) | BMP180UltraHighResolution
type BMP180OversamplingMode (line 36) | type BMP180OversamplingMode
type bmp180CalibrationCoefficients (line 38) | type bmp180CalibrationCoefficients struct
type BMP180Driver (line 54) | type BMP180Driver struct
method Temperature (line 99) | func (d *BMP180Driver) Temperature() (float32, error) {
method Pressure (line 111) | func (d *BMP180Driver) Pressure() (float32, error) {
method initialization (line 126) | func (d *BMP180Driver) initialization() error {
method rawTemp (line 166) | func (d *BMP180Driver) rawTemp() (int16, error) {
method calculateTemp (line 184) | func (d *BMP180Driver) calculateTemp(rawTemp int16) float32 {
method calculateB5 (line 190) | func (d *BMP180Driver) calculateB5(rawTemp int16) int32 {
method rawPressure (line 196) | func (d *BMP180Driver) rawPressure(oversampling BMP180OversamplingMode...
method calculatePressure (line 209) | func (d *BMP180Driver) calculatePressure(
function NewBMP180Driver (line 70) | func NewBMP180Driver(c Connector, options ...func(Config)) *BMP180Driver {
function WithBMP180OversamplingMode (line 88) | func WithBMP180OversamplingMode(val BMP180OversamplingMode) func(Config) {
function bmp180PauseForReading (line 237) | func bmp180PauseForReading(oversampling BMP180OversamplingMode) time.Dur...
FILE: drivers/i2c/bmp180_driver_test.go
function initTestBMP180WithStubbedAdaptor (line 21) | func initTestBMP180WithStubbedAdaptor() (*BMP180Driver, *i2cTestAdaptor) {
function TestNewBMP180Driver (line 26) | func TestNewBMP180Driver(t *testing.T) {
function TestBMP180Halt (line 40) | func TestBMP180Halt(t *testing.T) {
function TestBMP180Options (line 49) | func TestBMP180Options(t *testing.T) {
function TestBMP180Measurements (line 57) | func TestBMP180Measurements(t *testing.T) {
function TestBMP180TemperatureError (line 96) | func TestBMP180TemperatureError(t *testing.T) {
function TestBMP180PressureError (line 131) | func TestBMP180PressureError(t *testing.T) {
function TestBMP180PressureWriteError (line 164) | func TestBMP180PressureWriteError(t *testing.T) {
function TestBMP180_initialization (line 176) | func TestBMP180_initialization(t *testing.T) {
function TestBMP180_bmp180PauseForReading (line 223) | func TestBMP180_bmp180PauseForReading(t *testing.T) {
FILE: drivers/i2c/bmp280_driver.go
constant bmp280Debug (line 10) | bmp280Debug = true
constant bmp280DefaultAddress (line 14) | bmp280DefaultAddress = 0x77
type BMP280PressureOversampling (line 17) | type BMP280PressureOversampling
type BMP280TemperatureOversampling (line 18) | type BMP280TemperatureOversampling
type BMP280IIRFilter (line 19) | type BMP280IIRFilter
constant bmp280RegCalib00 (line 23) | bmp280RegCalib00 = 0x88
constant bmp280RegCtrl (line 24) | bmp280RegCtrl = 0xF4
constant bmp280RegConf (line 25) | bmp280RegConf = 0xF5
constant bmp280RegPressureData (line 26) | bmp280RegPressureData = 0xF7
constant bmp280RegTempData (line 27) | bmp280RegTempData = 0xFA
constant bmp280CtrlPwrSleepMode (line 30) | bmp280CtrlPwrSleepMode = 0x00
constant bmp280CtrlPwrForcedMode (line 31) | bmp280CtrlPwrForcedMode = 0x01
constant bmp280CtrlPwrForcedMode2 (line 32) | bmp280CtrlPwrForcedMode2 = 0x02
constant bmp280CtrlPwrNormalMode (line 33) | bmp280CtrlPwrNormalMode = 0x03
constant BMP280CtrlPressNoMeasurement (line 36) | BMP280CtrlPressNoMeasurement BMP280PressureOversampling = 0x00
constant BMP280CtrlPressOversampling1 (line 37) | BMP280CtrlPressOversampling1 BMP280PressureOversampling = 0x01
constant BMP280CtrlPressOversampling2 (line 38) | BMP280CtrlPressOversampling2 BMP280PressureOversampling = 0x02
constant BMP280CtrlPressOversampling4 (line 39) | BMP280CtrlPressOversampling4 BMP280PressureOversampling = 0x03
constant BMP280CtrlPressOversampling8 (line 40) | BMP280CtrlPressOversampling8 BMP280PressureOversampling = 0x04
constant BMP280CtrlPressOversampling16 (line 41) | BMP280CtrlPressOversampling16 BMP280PressureOversampling = 0x05
constant BMP280CtrlTempNoMeasurement (line 44) | BMP280CtrlTempNoMeasurement BMP280TemperatureOversampling = 0x00
constant BMP280CtrlTempOversampling1 (line 45) | BMP280CtrlTempOversampling1 BMP280TemperatureOversampling = 0x01
constant BMP280CtrlTempOversampling2 (line 46) | BMP280CtrlTempOversampling2 BMP280TemperatureOversampling = 0x02
constant BMP280CtrlTempOversampling4 (line 47) | BMP280CtrlTempOversampling4 BMP280TemperatureOversampling = 0x03
constant BMP280CtrlTempOversampling8 (line 48) | BMP280CtrlTempOversampling8 BMP280TemperatureOversampling = 0x04
constant BMP280CtrlTempOversampling16 (line 49) | BMP280CtrlTempOversampling16 BMP280TemperatureOversampling = 0x05
constant bmp280ConfSPIBit (line 52) | bmp280ConfSPIBit = 0x01
constant bmp280ConfStandBy0005 (line 55) | bmp280ConfStandBy0005 = 0x00
constant bmp280ConfStandBy0625 (line 56) | bmp280ConfStandBy0625 = 0x01
constant bmp280ConfStandBy0125 (line 57) | bmp280ConfStandBy0125 = 0x02
constant bmp280ConfStandBy0250 (line 58) | bmp280ConfStandBy0250 = 0x03
constant bmp280ConfStandBy0500 (line 59) | bmp280ConfStandBy0500 = 0x04
constant bmp280ConfStandBy1000 (line 60) | bmp280ConfStandBy1000 = 0x05
constant bmp280ConfStandBy2000 (line 61) | bmp280ConfStandBy2000 = 0x06
constant bmp280ConfStandBy4000 (line 62) | bmp280ConfStandBy4000 = 0x07
constant BMP280ConfFilterOff (line 65) | BMP280ConfFilterOff BMP280IIRFilter = 0x00
constant BMP280ConfFilter2 (line 66) | BMP280ConfFilter2 BMP280IIRFilter = 0x01
constant BMP280ConfFilter4 (line 67) | BMP280ConfFilter4 BMP280IIRFilter = 0x02
constant BMP280ConfFilter8 (line 68) | BMP280ConfFilter8 BMP280IIRFilter = 0x03
constant BMP280ConfFilter16 (line 69) | BMP280ConfFilter16 BMP280IIRFilter = 0x04
constant bmp280SeaLevelPressure (line 71) | bmp280SeaLevelPressure = 1013.25
type bmp280CalibrationCoefficients (line 74) | type bmp280CalibrationCoefficients struct
type BMP280Driver (line 90) | type BMP280Driver struct
method Temperature (line 165) | func (d *BMP280Driver) Temperature() (float32, error) {
method Pressure (line 178) | func (d *BMP280Driver) Pressure() (float32, error) {
method Altitude (line 200) | func (d *BMP280Driver) Altitude() (float32, error) {
method initialization (line 212) | func (d *BMP280Driver) initialization() error {
method rawTemp (line 264) | func (d *BMP280Driver) rawTemp() (int32, error) {
method rawPressure (line 285) | func (d *BMP280Driver) rawPressure() (int32, error) {
method calculateTemp (line 306) | func (d *BMP280Driver) calculateTemp(rawTemp int32) (float32, int32) {
method calculatePress (line 316) | func (d *BMP280Driver) calculatePress(rawPress int32, tFine int32) flo...
function NewBMP280Driver (line 109) | func NewBMP280Driver(c Connector, options ...func(Config)) *BMP280Driver {
function WithBMP280PressureOversampling (line 130) | func WithBMP280PressureOversampling(val BMP280PressureOversampling) func...
function WithBMP280TemperatureOversampling (line 142) | func WithBMP280TemperatureOversampling(val BMP280TemperatureOversampling...
function WithBMP280IIRFilter (line 154) | func WithBMP280IIRFilter(val BMP280IIRFilter) func(Config) {
FILE: drivers/i2c/bmp280_driver_test.go
function initTestBMP280WithStubbedAdaptor (line 19) | func initTestBMP280WithStubbedAdaptor() (*BMP280Driver, *i2cTestAdaptor) {
function TestNewBMP280Driver (line 24) | func TestNewBMP280Driver(t *testing.T) {
function TestBMP280Halt (line 40) | func TestBMP280Halt(t *testing.T) {
function TestBMP280Options (line 49) | func TestBMP280Options(t *testing.T) {
function TestWithBMP280TemperatureOversampling (line 57) | func TestWithBMP280TemperatureOversampling(t *testing.T) {
function TestWithBMP280IIRFilter (line 71) | func TestWithBMP280IIRFilter(t *testing.T) {
function TestBMP280Measurements (line 85) | func TestBMP280Measurements(t *testing.T) {
function TestBMP280TemperatureWriteError (line 115) | func TestBMP280TemperatureWriteError(t *testing.T) {
function TestBMP280TemperatureReadError (line 127) | func TestBMP280TemperatureReadError(t *testing.T) {
function TestBMP280PressureWriteError (line 139) | func TestBMP280PressureWriteError(t *testing.T) {
function TestBMP280PressureReadError (line 151) | func TestBMP280PressureReadError(t *testing.T) {
function TestBMP280_initialization (line 163) | func TestBMP280_initialization(t *testing.T) {
FILE: drivers/i2c/bmp388_driver.go
constant bmp388Debug (line 11) | bmp388Debug = false
constant bmp388DefaultAddress (line 14) | bmp388DefaultAddress = 0x77
type BMP388Accuracy (line 18) | type BMP388Accuracy
type BMP388IIRFilter (line 19) | type BMP388IIRFilter
constant bmp388ChipID (line 23) | bmp388ChipID = 0x50
constant bmp388RegChipID (line 25) | bmp388RegChipID = 0x00
constant bmp388RegStatus (line 26) | bmp388RegStatus = 0x03
constant bmp388RegPressureData (line 27) | bmp388RegPressureData = 0x04
constant bmp388RegTempData (line 28) | bmp388RegTempData = 0x07
constant bmp388RegPWRCTRL (line 29) | bmp388RegPWRCTRL = 0x1B
constant bmp388RegOSR (line 30) | bmp388RegOSR = 0x1C
constant bmp388RegODR (line 31) | bmp388RegODR = 0x1D
constant bmp388RegConf (line 32) | bmp388RegConf = 0x1F
constant bmp388RegCalib00 (line 33) | bmp388RegCalib00 = 0x31
constant bmp388RegCMD (line 34) | bmp388RegCMD = 0x7E
constant bmp388PWRCTRLPressEnableBit (line 37) | bmp388PWRCTRLPressEnableBit = 0x01
constant bmp388PWRCTRLTempEnableBit (line 38) | bmp388PWRCTRLTempEnableBit = 0x02
constant bmp388PWRCTRLSleep (line 41) | bmp388PWRCTRLSleep = 0x00
constant bmp388PWRCTRLForced (line 42) | bmp388PWRCTRLForced = 0x01
constant bmp388PWRCTRLNormal (line 43) | bmp388PWRCTRLNormal = 0x03
constant bmp388ConfFilterCoef0 (line 46) | bmp388ConfFilterCoef0 BMP388IIRFilter = 0
constant bmp388ConfFilterCoef1 (line 47) | bmp388ConfFilterCoef1 BMP388IIRFilter = 1
constant bmp388ConfFilterCoef3 (line 48) | bmp388ConfFilterCoef3 BMP388IIRFilter = 2
constant bmp388ConfFilterCoef7 (line 49) | bmp388ConfFilterCoef7 BMP388IIRFilter = 3
constant bmp388ConfFilterCoef15 (line 50) | bmp388ConfFilterCoef15 BMP388IIRFilter = 4
constant bmp388ConfFilterCoef31 (line 51) | bmp388ConfFilterCoef31 BMP388IIRFilter = 5
constant bmp388ConfFilterCoef63 (line 52) | bmp388ConfFilterCoef63 BMP388IIRFilter = 6
constant bmp388ConfFilterCoef127 (line 53) | bmp388ConfFilterCoef127 BMP388IIRFilter = 7
constant BMP388AccuracyUltraLow (line 56) | BMP388AccuracyUltraLow BMP388Accuracy = 0
constant BMP388AccuracyLow (line 57) | BMP388AccuracyLow BMP388Accuracy = 1
constant BMP388AccuracyStandard (line 58) | BMP388AccuracyStandard BMP388Accuracy = 2
constant BMP388AccuracyHigh (line 59) | BMP388AccuracyHigh BMP388Accuracy = 3
constant BMP388AccuracyUltraHigh (line 60) | BMP388AccuracyUltraHigh BMP388Accuracy = 4
constant BMP388AccuracyHighest (line 61) | BMP388AccuracyHighest BMP388Accuracy = 5
constant bmp388CMDReserved (line 63) | bmp388CMDReserved = 0x00
constant bmp388CMDExtModeEnMiddle (line 64) | bmp388CMDExtModeEnMiddle = 0x34
constant bmp388CMDFifoFlush (line 65) | bmp388CMDFifoFlush = 0xB0
constant bmp388CMDSoftReset (line 66) | bmp388CMDSoftReset = 0xB6
constant bmp388SeaLevelPressure (line 68) | bmp388SeaLevelPressure = 1013.25
type bmp388CalibrationCoefficients (line 71) | type bmp388CalibrationCoefficients struct
type BMP388Driver (line 89) | type BMP388Driver struct
method Temperature (line 136) | func (d *BMP388Driver) Temperature(accuracy BMP388Accuracy) (float32, ...
method Pressure (line 161) | func (d *BMP388Driver) Pressure(accuracy BMP388Accuracy) (float32, err...
method Altitude (line 192) | func (d *BMP388Driver) Altitude(accuracy BMP388Accuracy) (float32, err...
method initialization (line 204) | func (d *BMP388Driver) initialization() error {
method rawTemp (line 302) | func (d *BMP388Driver) rawTemp() (int32, error) {
method rawPressure (line 326) | func (d *BMP388Driver) rawPressure() (int32, error) {
method calculateTemp (line 350) | func (d *BMP388Driver) calculateTemp(rawTemp int32) float32 {
method calculatePress (line 360) | func (d *BMP388Driver) calculatePress(rawPress int32, tLin float64) fl...
function NewBMP388Driver (line 106) | func NewBMP388Driver(c Connector, options ...func(Config)) *BMP388Driver {
function WithBMP388IIRFilter (line 125) | func WithBMP388IIRFilter(val BMP388IIRFilter) func(Config) {
FILE: drivers/i2c/bmp388_driver_test.go
function initTestBMP388WithStubbedAdaptor (line 20) | func initTestBMP388WithStubbedAdaptor() (*BMP388Driver, *i2cTestAdaptor) {
function TestNewBMP388Driver (line 43) | func TestNewBMP388Driver(t *testing.T) {
function TestBMP388Halt (line 57) | func TestBMP388Halt(t *testing.T) {
function TestBMP388Options (line 66) | func TestBMP388Options(t *testing.T) {
function TestBMP388Measurements (line 74) | func TestBMP388Measurements(t *testing.T) {
function TestBMP388TemperatureWriteError (line 110) | func TestBMP388TemperatureWriteError(t *testing.T) {
function TestBMP388TemperatureReadError (line 122) | func TestBMP388TemperatureReadError(t *testing.T) {
function TestBMP388PressureWriteError (line 134) | func TestBMP388PressureWriteError(t *testing.T) {
function TestBMP388PressureReadError (line 146) | func TestBMP388PressureReadError(t *testing.T) {
function TestBMP388_initialization (line 158) | func TestBMP388_initialization(t *testing.T) {
FILE: drivers/i2c/ccs811_driver.go
type CCS811DriveMode (line 10) | type CCS811DriveMode
constant CCS811DriveModeIdle (line 15) | CCS811DriveModeIdle CCS811DriveMode = 0x00
constant CCS811DriveMode1Sec (line 16) | CCS811DriveMode1Sec CCS811DriveMode = 0x01
constant CCS811DriveMode10Sec (line 17) | CCS811DriveMode10Sec CCS811DriveMode = 0x02
constant CCS811DriveMode60Sec (line 18) | CCS811DriveMode60Sec CCS811DriveMode = 0x03
constant CCS811DriveMode250MS (line 19) | CCS811DriveMode250MS CCS811DriveMode = 0x04
constant ccs811DefaultAddress (line 25) | ccs811DefaultAddress = 0x5A
constant ccs811RegStatus (line 30) | ccs811RegStatus = 0x00
constant ccs811RegMeasMode (line 32) | ccs811RegMeasMode = 0x01
constant ccs811RegAlgResultData (line 35) | ccs811RegAlgResultData = 0x02
constant ccs811RegNtc (line 41) | ccs811RegNtc = 0x06
constant ccs811RegSwReset (line 43) | ccs811RegSwReset = 0xFF
constant ccs811RegHwID (line 45) | ccs811RegHwID = 0x20
constant ccs811RegHwVersion (line 47) | ccs811RegHwVersion = 0x21
constant ccs811RegFwBootVersion (line 50) | ccs811RegFwBootVersion = 0x23
constant ccs811RegFwAppVersion (line 53) | ccs811RegFwAppVersion = 0x24
constant ccs811RegAppStart (line 56) | ccs811RegAppStart = 0xF4
constant ccs811HwIDCode (line 60) | ccs811HwIDCode = 0x81
type CCS811Status (line 69) | type CCS811Status struct
function NewCCS811Status (line 81) | func NewCCS811Status(data uint8) *CCS811Status {
type CCS811MeasMode (line 93) | type CCS811MeasMode struct
method GetMeasMode (line 115) | func (mm *CCS811MeasMode) GetMeasMode() byte {
function NewCCS811MeasMode (line 105) | func NewCCS811MeasMode() *CCS811MeasMode {
type CCS811Driver (line 120) | type CCS811Driver struct
method GetHardwareVersion (line 162) | func (d *CCS811Driver) GetHardwareVersion() (uint8, error) {
method GetFirmwareBootVersion (line 175) | func (d *CCS811Driver) GetFirmwareBootVersion() (uint16, error) {
method GetFirmwareAppVersion (line 188) | func (d *CCS811Driver) GetFirmwareAppVersion() (uint16, error) {
method GetStatus (line 201) | func (d *CCS811Driver) GetStatus() (*CCS811Status, error) {
method GetTemperature (line 216) | func (d *CCS811Driver) GetTemperature() (float32, error) {
method GetGasData (line 241) | func (d *CCS811Driver) GetGasData() (uint16, uint16, error) {
method HasData (line 260) | func (d *CCS811Driver) HasData() (bool, error) {
method EnableExternalInterrupt (line 274) | func (d *CCS811Driver) EnableExternalInterrupt() error {
method DisableExternalInterrupt (line 283) | func (d *CCS811Driver) DisableExternalInterrupt() error {
method initialize (line 291) | func (d *CCS811Driver) initialize() error {
method resetDevice (line 322) | func (d *CCS811Driver) resetDevice() error {
method startApp (line 328) | func (d *CCS811Driver) startApp() error {
method updateMeasMode (line 335) | func (d *CCS811Driver) updateMeasMode() error {
function NewCCS811Driver (line 128) | func NewCCS811Driver(c Connector, options ...func(Config)) *CCS811Driver {
function WithCCS811MeasMode (line 145) | func WithCCS811MeasMode(mode CCS811DriveMode) func(Config) {
function WithCCS811NTCResistance (line 154) | func WithCCS811NTCResistance(val uint32) func(Config) {
FILE: drivers/i2c/ccs811_driver_test.go
function initTestCCS811WithStubbedAdaptor (line 18) | func initTestCCS811WithStubbedAdaptor() (*CCS811Driver, *i2cTestAdaptor) {
function TestNewCCS811Driver (line 28) | func TestNewCCS811Driver(t *testing.T) {
function TestCCS811Halt (line 41) | func TestCCS811Halt(t *testing.T) {
function TestCCS811Options (line 50) | func TestCCS811Options(t *testing.T) {
function TestCCS811WithCCS811MeasMode (line 59) | func TestCCS811WithCCS811MeasMode(t *testing.T) {
function TestCCS811GetGasData (line 64) | func TestCCS811GetGasData(t *testing.T) {
function TestCCS811GetTemperature (line 117) | func TestCCS811GetTemperature(t *testing.T) {
function TestCCS811HasData (line 173) | func TestCCS811HasData(t *testing.T) {
function TestCCS811_initialize (line 237) | func TestCCS811_initialize(t *testing.T) {
FILE: drivers/i2c/drv2605l_driver.go
type DRV2605Mode (line 4) | type DRV2605Mode
constant DRV2605ModeIntTrig (line 8) | DRV2605ModeIntTrig DRV2605Mode = 0x00
constant DRV2605ModeExtTrigEdge (line 9) | DRV2605ModeExtTrigEdge DRV2605Mode = 0x01
constant DRV2605ModeExtTrigLvl (line 10) | DRV2605ModeExtTrigLvl DRV2605Mode = 0x02
constant DRV2605ModePWMAnalog (line 11) | DRV2605ModePWMAnalog DRV2605Mode = 0x03
constant DRV2605ModeAudioVibe (line 12) | DRV2605ModeAudioVibe DRV2605Mode = 0x04
constant DRV2605ModeRealtime (line 13) | DRV2605ModeRealtime DRV2605Mode = 0x05
constant DRV2605ModeDiagnose (line 14) | DRV2605ModeDiagnose DRV2605Mode = 0x06
constant DRV2605ModeAutocal (line 15) | DRV2605ModeAutocal DRV2605Mode = 0x07
constant drv2605DefaultAddress (line 19) | drv2605DefaultAddress = 0x5A
constant drv2605RegStatus (line 21) | drv2605RegStatus = 0x00
constant drv2605RegMode (line 22) | drv2605RegMode = 0x01
constant drv2605Standby (line 24) | drv2605Standby = 0x40
constant drv2605RegRTPin (line 26) | drv2605RegRTPin = 0x02
constant drv2605RegLibrary (line 27) | drv2605RegLibrary = 0x03
constant drv2605RegWaveSeq1 (line 28) | drv2605RegWaveSeq1 = 0x04
constant drv2605RegWaveSeq2 (line 29) | drv2605RegWaveSeq2 = 0x05
constant drv2605RegWaveSeq3 (line 30) | drv2605RegWaveSeq3 = 0x06
constant drv2605RegWaveSeq4 (line 31) | drv2605RegWaveSeq4 = 0x07
constant drv2605RegWaveSeq5 (line 32) | drv2605RegWaveSeq5 = 0x08
constant drv2605RegWaveSeq6 (line 33) | drv2605RegWaveSeq6 = 0x09
constant drv2605RegWaveSeq7 (line 34) | drv2605RegWaveSeq7 = 0x0A
constant drv2605RegWaveSeq8 (line 35) | drv2605RegWaveSeq8 = 0x0B
constant drv2605RegGo (line 37) | drv2605RegGo = 0x0C
constant drv2605RegOverdrive (line 38) | drv2605RegOverdrive = 0x0D
constant drv2605RegSustainPos (line 39) | drv2605RegSustainPos = 0x0E
constant drv2605RegSustainNeg (line 40) | drv2605RegSustainNeg = 0x0F
constant drv2605RegBreak (line 41) | drv2605RegBreak = 0x10
constant drv2605RegAudioCtrl (line 42) | drv2605RegAudioCtrl = 0x11
constant drv2605RegAudioMinLevel (line 43) | drv2605RegAudioMinLevel = 0x12
constant drv2605RegAudioMaxLevel (line 44) | drv2605RegAudioMaxLevel = 0x13
constant drv2605RegAudioMinDrive (line 45) | drv2605RegAudioMinDrive = 0x14
constant drv2605RegAudioMaxDrive (line 46) | drv2605RegAudioMaxDrive = 0x15
constant drv2605RegRatedV (line 47) | drv2605RegRatedV = 0x16
constant drv2605RegClampV (line 48) | drv2605RegClampV = 0x17
constant drv2605RegAutocalComp (line 49) | drv2605RegAutocalComp = 0x18
constant drv2605RegAutocalEmp (line 50) | drv2605RegAutocalEmp = 0x19
constant drv2605RegFeedback (line 51) | drv2605RegFeedback = 0x1A
constant drv2605RegControl1 (line 52) | drv2605RegControl1 = 0x1B
constant drv2605RegControl2 (line 53) | drv2605RegControl2 = 0x1C
constant drv2605RegControl3 (line 54) | drv2605RegControl3 = 0x1D
constant drv2605RegControl4 (line 55) | drv2605RegControl4 = 0x1E
constant drv2605RegVBat (line 56) | drv2605RegVBat = 0x21
constant drv2605RegLRAResoPeriod (line 57) | drv2605RegLRAResoPeriod = 0x22
type DRV2605LDriver (line 71) | type DRV2605LDriver struct
method SetMode (line 101) | func (d *DRV2605LDriver) SetMode(newMode DRV2605Mode) error {
method SetStandbyMode (line 118) | func (d *DRV2605LDriver) SetStandbyMode(standby bool) error {
method SelectLibrary (line 136) | func (d *DRV2605LDriver) SelectLibrary(library uint8) error {
method GetPauseWaveform (line 144) | func (d *DRV2605LDriver) GetPauseWaveform(delayTime10MS uint8) uint8 {
method SetSequence (line 158) | func (d *DRV2605LDriver) SetSequence(waveforms []uint8) error {
method Go (line 176) | func (d *DRV2605LDriver) Go() error {
method writeByteRegisters (line 180) | func (d *DRV2605LDriver) writeByteRegisters(regValPairs []struct{ reg,...
method initialize (line 189) | func (d *DRV2605LDriver) initialize() error {
method shutdown (line 218) | func (d *DRV2605LDriver) shutdown() error {
function NewDRV2605LDriver (line 85) | func NewDRV2605LDriver(c Connector, options ...func(Config)) *DRV2605LDr...
FILE: drivers/i2c/drv2605l_driver_test.go
function initTestDRV2605LDriverWithStubbedAdaptor (line 20) | func initTestDRV2605LDriverWithStubbedAdaptor() (*DRV2605LDriver, *i2cTe...
function TestNewDRV2605LDriver (line 36) | func TestNewDRV2605LDriver(t *testing.T) {
function TestDRV2605LOptions (line 47) | func TestDRV2605LOptions(t *testing.T) {
function TestDRV2605LStart (line 54) | func TestDRV2605LStart(t *testing.T) {
function TestDRV2605LHaltIdempotent (line 59) | func TestDRV2605LHaltIdempotent(t *testing.T) {
function TestDRV2605LHalt (line 68) | func TestDRV2605LHalt(t *testing.T) {
function TestDRV2605LGetPause (line 84) | func TestDRV2605LGetPause(t *testing.T) {
function TestDRV2605LSequenceTermination (line 91) | func TestDRV2605LSequenceTermination(t *testing.T) {
function TestDRV2605LSequenceTruncation (line 102) | func TestDRV2605LSequenceTruncation(t *testing.T) {
function TestDRV2605LSetMode (line 118) | func TestDRV2605LSetMode(t *testing.T) {
function TestDRV2605LSetModeReadError (line 123) | func TestDRV2605LSetModeReadError(t *testing.T) {
function TestDRV2605LSetStandbyMode (line 131) | func TestDRV2605LSetStandbyMode(t *testing.T) {
function TestDRV2605LSetStandbyModeReadError (line 136) | func TestDRV2605LSetStandbyModeReadError(t *testing.T) {
function TestDRV2605LSelectLibrary (line 144) | func TestDRV2605LSelectLibrary(t *testing.T) {
function TestDRV2605LGo (line 149) | func TestDRV2605LGo(t *testing.T) {
FILE: drivers/i2c/generic_driver.go
type GenericDriver (line 9) | type GenericDriver struct
method WriteByte (line 19) | func (d *GenericDriver) WriteByte(val byte) error {
method WriteByteData (line 27) | func (d *GenericDriver) WriteByteData(reg uint8, val byte) error {
method WriteWordData (line 35) | func (d *GenericDriver) WriteWordData(reg uint8, val uint16) error {
method WriteBlockData (line 43) | func (d *GenericDriver) WriteBlockData(reg uint8, data []byte) error {
method WriteData (line 52) | func (d *GenericDriver) WriteData(reg uint8, data []byte) error {
method Write (line 64) | func (d *GenericDriver) Write(data []byte) error {
method ReadByte (line 72) | func (d *GenericDriver) ReadByte() (byte, error) {
method ReadByteData (line 80) | func (d *GenericDriver) ReadByteData(reg uint8) (byte, error) {
method ReadWordData (line 88) | func (d *GenericDriver) ReadWordData(reg uint8) (uint16, error) {
method ReadBlockData (line 96) | func (d *GenericDriver) ReadBlockData(reg uint8, data []byte) error {
method ReadData (line 105) | func (d *GenericDriver) ReadData(reg uint8, data []byte) error {
method Read (line 121) | func (d *GenericDriver) Read(data []byte) error {
method writeAndCheckCount (line 128) | func (d *GenericDriver) writeAndCheckCount(data []byte) error {
method readAndCheckCount (line 139) | func (d *GenericDriver) readAndCheckCount(data []byte) error {
function NewGenericDriver (line 14) | func NewGenericDriver(c Connector, name string, address int, options ......
FILE: drivers/i2c/generic_driver_test.go
function TestNewGenericDriver (line 15) | func TestNewGenericDriver(t *testing.T) {
FILE: drivers/i2c/grove_drivers.go
type GroveLcdDriver (line 7) | type GroveLcdDriver struct
type GroveAccelerometerDriver (line 12) | type GroveAccelerometerDriver struct
function NewGroveLcdDriver (line 25) | func NewGroveLcdDriver(a Connector, options ...func(Config)) *GroveLcdDr...
function NewGroveAccelerometerDriver (line 46) | func NewGroveAccelerometerDriver(a Connector, options ...func(Config)) *...
FILE: drivers/i2c/grove_drivers_test.go
function initTestGroveLcdDriver (line 17) | func initTestGroveLcdDriver() *GroveLcdDriver {
function initGroveLcdDriverWithStubbedAdaptor (line 22) | func initGroveLcdDriverWithStubbedAdaptor() (*GroveLcdDriver, *i2cTestAd...
function initTestGroveAccelerometerDriver (line 27) | func initTestGroveAccelerometerDriver() *GroveAccelerometerDriver {
function initGroveAccelerometerDriverWithStubbedAdaptor (line 32) | func initGroveAccelerometerDriverWithStubbedAdaptor() (*GroveAcceleromet...
function TestGroveLcdDriverName (line 37) | func TestGroveLcdDriverName(t *testing.T) {
function TestLcdDriverWithAddress (line 43) | func TestLcdDriverWithAddress(t *testing.T) {
function TestGroveAccelerometerDriverName (line 49) | func TestGroveAccelerometerDriverName(t *testing.T) {
function TestGroveAccelerometerDriverWithAddress (line 55) | func TestGroveAccelerometerDriverWithAddress(t *testing.T) {
FILE: drivers/i2c/grovepi_driver.go
constant grovePiDefaultAddress (line 13) | grovePiDefaultAddress = 0x04
constant commandReadDigital (line 19) | commandReadDigital = 1
constant commandWriteDigital (line 20) | commandWriteDigital = 2
constant commandReadAnalog (line 21) | commandReadAnalog = 3
constant commandWriteAnalog (line 22) | commandWriteAnalog = 4
constant commandSetPinMode (line 23) | commandSetPinMode = 5
constant commandReadUltrasonic (line 24) | commandReadUltrasonic = 7
constant commandReadFirmwareVersion (line 25) | commandReadFirmwareVersion = 8
constant commandReadDHT (line 26) | commandReadDHT = 40
type GrovePiDriver (line 34) | type GrovePiDriver struct
method Connect (line 64) | func (d *GrovePiDriver) Connect() error {
method Finalize (line 69) | func (d *GrovePiDriver) Finalize() error {
method AnalogRead (line 74) | func (d *GrovePiDriver) AnalogRead(pin string) (int, error) {
method DigitalRead (line 99) | func (d *GrovePiDriver) DigitalRead(pin string) (int, error) {
method UltrasonicRead (line 124) | func (d *GrovePiDriver) UltrasonicRead(pin string, duration int) (int,...
method FirmwareVersionRead (line 153) | func (d *GrovePiDriver) FirmwareVersionRead() (string, error) {
method DHTRead (line 177) | func (d *GrovePiDriver) DHTRead(pin string, sensorType byte, duration ...
method DigitalWrite (line 221) | func (d *GrovePiDriver) DigitalWrite(pin string, val byte) error {
method AnalogWrite (line 242) | func (d *GrovePiDriver) AnalogWrite(pin string, val int) error {
method SetPinMode (line 263) | func (d *GrovePiDriver) SetPinMode(pin byte, mode string) error {
method setPinMode (line 280) | func (d *GrovePiDriver) setPinMode(pin byte, mode string) error {
method ensurePinMode (line 297) | func (d *GrovePiDriver) ensurePinMode(pinNum int, mode string) error {
method preparePin (line 307) | func (d *GrovePiDriver) preparePin(pin string, mode string) (int, erro...
method readForCommand (line 321) | func (d *GrovePiDriver) readForCommand(command byte, data []byte) error {
function NewGrovePiDriver (line 49) | func NewGrovePiDriver(c Connector, options ...func(Config)) *GrovePiDriv...
function getPin (line 270) | func getPin(pin string) string {
function float32Of4BytesLittleEndian (line 335) | func float32Of4BytesLittleEndian(bytes []byte) float32 {
FILE: drivers/i2c/grovepi_driver_test.go
function initGrovePiDriverWithStubbedAdaptor (line 36) | func initGrovePiDriverWithStubbedAdaptor() (*GrovePiDriver, *i2cTestAdap...
function TestNewGrovePiDriver (line 41) | func TestNewGrovePiDriver(t *testing.T) {
function TestGrovePiOptions (line 53) | func TestGrovePiOptions(t *testing.T) {
function TestGrovePiSomeRead (line 60) | func TestGrovePiSomeRead(t *testing.T) {
function TestGrovePiSomeWrite (line 183) | func TestGrovePiSomeWrite(t *testing.T) {
function TestGrovePi_getPin (line 231) | func TestGrovePi_getPin(t *testing.T) {
FILE: drivers/i2c/helpers_test.go
type i2cTestAdaptor (line 15) | type i2cTestAdaptor struct
method Testi2cConnectErr (line 26) | func (t *i2cTestAdaptor) Testi2cConnectErr(val bool) {
method Testi2cReadImpl (line 32) | func (t *i2cTestAdaptor) Testi2cReadImpl(f func([]byte) (int, error)) {
method Testi2cWriteImpl (line 38) | func (t *i2cTestAdaptor) Testi2cWriteImpl(f func([]byte) (int, error)) {
method Read (line 44) | func (t *i2cTestAdaptor) Read(b []byte) (int, error) {
method Write (line 50) | func (t *i2cTestAdaptor) Write(b []byte) (int, error) {
method Close (line 57) | func (t *i2cTestAdaptor) Close() error {
method ReadByte (line 61) | func (t *i2cTestAdaptor) ReadByte() (byte, error) {
method ReadByteData (line 73) | func (t *i2cTestAdaptor) ReadByteData(reg uint8) (uint8, error) {
method ReadWordData (line 88) | func (t *i2cTestAdaptor) ReadWordData(reg uint8) (uint16, error) {
method ReadBlockData (line 107) | func (t *i2cTestAdaptor) ReadBlockData(reg uint8, b []byte) error {
method WriteByte (line 117) | func (t *i2cTestAdaptor) WriteByte(val byte) error {
method WriteByteData (line 123) | func (t *i2cTestAdaptor) WriteByteData(reg uint8, val uint8) error {
method WriteWordData (line 131) | func (t *i2cTestAdaptor) WriteWordData(reg uint8, val uint16) error {
method WriteBlockData (line 141) | func (t *i2cTestAdaptor) WriteBlockData(reg uint8, b []byte) error {
method WriteBytes (line 154) | func (t *i2cTestAdaptor) WriteBytes(b []byte) error {
method GetI2cConnection (line 164) | func (t *i2cTestAdaptor) GetI2cConnection(address int, bus int) (Conne...
method DefaultI2cBus (line 174) | func (t *i2cTestAdaptor) DefaultI2cBus() int {
method Name (line 178) | func (t *i2cTestAdaptor) Name() string { return t.name }
method SetName (line 179) | func (t *i2cTestAdaptor) SetName(n string) { t.name = n }
method Connect (line 180) | func (t *i2cTestAdaptor) Connect() error { return nil }
method Finalize (line 181) | func (t *i2cTestAdaptor) Finalize() error { return nil }
method readBytes (line 195) | func (t *i2cTestAdaptor) readBytes(b []byte) error {
method writeBytes (line 207) | func (t *i2cTestAdaptor) writeBytes(b []byte) error {
function newI2cTestAdaptor (line 183) | func newI2cTestAdaptor() *i2cTestAdaptor {
FILE: drivers/i2c/hmc5883l_driver.go
constant hmc5883lDebug (line 11) | hmc5883lDebug = false
constant hmc5883lDefaultAddress (line 12) | hmc5883lDefaultAddress = 0x1E
constant hmc5883lRegA (line 16) | hmc5883lRegA = 0x00
constant hmc5883lRegB (line 17) | hmc5883lRegB = 0x01
const
Condensed preview — 973 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (8,394K chars).
[
{
"path": ".chglog/CHANGELOG.gobot.md",
"chars": 937,
"preview": "# {{ .Info.Title }}\n\nPlease adjust manually before add content to CHANGELOG.md.\n\n{{ if .Versions -}}\n## [Unreleased]({{ "
},
{
"path": ".chglog/README.md",
"chars": 2027,
"preview": "# Creating a changelog automatically\n\n## Install and configure tool\n\nWe using <https://github.com/git-chglog/git-chglog>"
},
{
"path": ".chglog/config_gobot.yml",
"chars": 344,
"preview": "style: github\ntemplate: CHANGELOG.gobot.md\ninfo:\n title: Auto-Generated Changelog\n repository_url: https://github.com/"
},
{
"path": ".circleci/config.yml",
"chars": 2764,
"preview": "# Since switch to cimg, the GOPATH has been changed from /go to $HOME/go. \n# The latter will expand to the full path of "
},
{
"path": ".github/FUNDING.yml",
"chars": 417,
"preview": "# These are supported funding model platforms\n\n# github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., "
},
{
"path": ".github/dependabot.yml",
"chars": 283,
"preview": "# package-ecosystem, directory and schedule is mandatory\n\nversion: 2\nupdates:\n - package-ecosystem: \"gomod\"\n directo"
},
{
"path": ".github/pull_request_template.md",
"chars": 1201,
"preview": "## Solved issues and/or description of the change\n\n...\n\n## Manual test\n\n- OS and Version (Win/Mac/Linux):\n- Adaptor(s) a"
},
{
"path": ".github/workflows/golangci-lint.yml",
"chars": 1407,
"preview": "name: golangci-lint\non:\n push:\n tags:\n - v*\n branches:\n - dev\n pull_request:\npermissions:\n contents: "
},
{
"path": ".gitignore",
"chars": 179,
"preview": ".sass-cache\n*.test\n*.swp\n*.snap\nprofile.cov\ncount.out\n/parts\n/prime\n/stage\nvendor/\noutput/\n.idea/\ncoverage.txt\n.chglog/c"
},
{
"path": ".golangci.yml",
"chars": 7612,
"preview": "# note: GolangCI-Lint also searches for config files in all directories from the directory of the first analyzed path up"
},
{
"path": "CHANGELOG.md",
"chars": 70976,
"preview": "# CHANGELOG\n\n## [Unreleased](https://github.com/hybridgroup/gobot/compare/v2.6.0...HEAD)\n\n## [v2.6.0](https://github.com"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 3229,
"preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
},
{
"path": "CONTRIBUTING.md",
"chars": 6164,
"preview": "# Contributing to Gobot\n\n## Target Branch\n\n**Please open all non-hotfix PRs against the `dev` branch!**\n\nGobot follows a"
},
{
"path": "LICENSE.txt",
"chars": 565,
"preview": "Copyright (c) 2013-2020 The Hybrid Group\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not us"
},
{
"path": "MIGRATION.md",
"chars": 12202,
"preview": "# Migration guide\n\nFrom time to time a breaking change of API can happen. Following to [SemVer](https://semver.org/), th"
},
{
"path": "Makefile",
"chars": 2696,
"preview": "# include also examples in other than ./examples folder\nALL_EXAMPLES := $(shell grep -l -r --include \"*.go\" 'build examp"
},
{
"path": "README.md",
"chars": 20149,
"preview": "[]("
},
{
"path": "adaptor.go",
"chars": 11897,
"preview": "package gobot\n\nimport (\n\t\"io\"\n\t\"time\"\n)\n\n// DigitalPinOptioner is the interface to provide the possibility to change pin"
},
{
"path": "api/api.go",
"chars": 14118,
"preview": "package api\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/b"
},
{
"path": "api/api_test.go",
"chars": 13952,
"preview": "//nolint:forcetypeassert,usestdlibvars,bodyclose,noctx // ok here\npackage api\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"encoding/jso"
},
{
"path": "api/basic_auth.go",
"chars": 1021,
"preview": "package api\n\nimport (\n\t\"crypto/subtle\"\n\t\"encoding/base64\"\n\t\"net/http\"\n)\n\n// BasicAuth returns basic auth handler.\nfunc B"
},
{
"path": "api/basic_auth_test.go",
"chars": 657,
"preview": "//nolint:usestdlibvars,noctx // ok here\npackage api\n\nimport (\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"testing\"\n\n\t\"github.com/"
},
{
"path": "api/cors.go",
"chars": 2013,
"preview": "package api\n\nimport (\n\t\"net/http\"\n\t\"regexp\"\n\t\"strings\"\n)\n\n// CORS represents CORS configuration\ntype CORS struct {\n\tAllo"
},
{
"path": "api/cors_test.go",
"chars": 2875,
"preview": "//nolint:usestdlibvars,noctx // ok here\npackage api\n\nimport (\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"testing\"\n\n\t\"github.com/"
},
{
"path": "api/doc.go",
"chars": 925,
"preview": "/*\nPackage api provides a webserver to interact with your Gobot program over the network.\n\nExample:\n\n\tpackage main\n\n\timp"
},
{
"path": "api/helpers_test.go",
"chars": 2815,
"preview": "//nolint:forcetypeassert // ok here\npackage api\n\nimport (\n\t\"fmt\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\ntype NullReadWriteCloser str"
},
{
"path": "api/robeaux/robeaux.go",
"chars": 2198504,
"preview": "// Code generated by go-bindata.\n// sources:\n// css/.keep\n// css/application.css\n// css/application.css.map\n// css/fonts"
},
{
"path": "appveyor.yml",
"chars": 777,
"preview": "version: \"{build}\"\n\nimage: Visual Studio 2019\n\nclone_folder: c:\\gopath\\src\\gobot.io\\x\\gobot\n\nenvironment:\n PATH: C:\\min"
},
{
"path": "commander.go",
"chars": 1371,
"preview": "package gobot\n\ntype commander struct {\n\tcommands map[string]func(map[string]interface{}) interface{}\n}\n\n// Commander is "
},
{
"path": "commander_test.go",
"chars": 355,
"preview": "package gobot\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestCommander(t *testing.T) {\n\t// arra"
},
{
"path": "connection.go",
"chars": 1809,
"preview": "package gobot\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"reflect\"\n\n\tmultierror \"github.com/hashicorp/go-multierror\"\n)\n\n// JSONConnection "
},
{
"path": "debug.go",
"chars": 181,
"preview": "package gobot\n\nimport \"fmt\"\n\nfunc Debuglnf(isDebug bool, format string, a ...interface{}) {\n\tif isDebug {\n\t\tmsg := fmt.S"
},
{
"path": "device.go",
"chars": 2024,
"preview": "package gobot\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"reflect\"\n\n\tmultierror \"github.com/hashicorp/go-multierror\"\n)\n\n// JSONDevice is a"
},
{
"path": "doc.go",
"chars": 3578,
"preview": "// Copyright 2014-2018 The Hybrid Group. All rights reserved.\n\n/*\nPackage gobot is the primary entrypoint for Gobot (htt"
},
{
"path": "driver.go",
"chars": 649,
"preview": "package gobot\n\n// Driver is the interface that describes a driver in gobot\ntype Driver interface {\n\t// Name returns the "
},
{
"path": "drivers/aio/LICENSE",
"chars": 565,
"preview": "Copyright (c) 2013-2018 The Hybrid Group\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not us"
},
{
"path": "drivers/aio/README.md",
"chars": 857,
"preview": "# AIO\n\nThis package provides drivers for [Analog Input/Output (AIO)](https://en.wikipedia.org/wiki/Analog-to-digital_con"
},
{
"path": "drivers/aio/aio_driver.go",
"chars": 2853,
"preview": "package aio\n\nimport (\n\t\"log\"\n\t\"sync\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\nconst (\n\t// Error event\n\tError = \"error\"\n\t// Data event\n"
},
{
"path": "drivers/aio/aio_driver_test.go",
"chars": 1495,
"preview": "package aio\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/"
},
{
"path": "drivers/aio/analog_actuator_driver.go",
"chars": 4543,
"preview": "package aio\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n)\n\n// actuatorOptionApplier needs to be implemented by each configurable option "
},
{
"path": "drivers/aio/analog_actuator_driver_test.go",
"chars": 5885,
"preview": "//nolint:forcetypeassert // ok here\npackage aio\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/a"
},
{
"path": "drivers/aio/analog_sensor_driver.go",
"chars": 8001,
"preview": "package aio\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\n// sensorOptionApplier needs to be implemented by each c"
},
{
"path": "drivers/aio/analog_sensor_driver_test.go",
"chars": 8445,
"preview": "//nolint:forcetypeassert // ok here\npackage aio\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/str"
},
{
"path": "drivers/aio/doc.go",
"chars": 363,
"preview": "/*\nPackage aio provides Gobot drivers for Analog Input/Output devices.\n\nInstalling:\n\n\tPlease refer to the main [README.m"
},
{
"path": "drivers/aio/grove_drivers.go",
"chars": 2945,
"preview": "package aio\n\nimport \"gobot.io/x/gobot/v2\"\n\n// GroveRotaryDriver represents an analog rotary dial with a Grove connector\n"
},
{
"path": "drivers/aio/grove_drivers_test.go",
"chars": 6315,
"preview": "//nolint:forcetypeassert // ok here\npackage aio\n\nimport (\n\t\"errors\"\n\t\"reflect\"\n\t\"strings\"\n\t\"sync/atomic\"\n\t\"testing\"\n\t\"ti"
},
{
"path": "drivers/aio/grove_temperature_sensor_driver.go",
"chars": 1536,
"preview": "package aio\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\n// GroveTemperatureSensorDriver represents a temperature"
},
{
"path": "drivers/aio/grove_temperature_sensor_driver_test.go",
"chars": 4290,
"preview": "//nolint:forcetypeassert // ok here\npackage aio\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/a"
},
{
"path": "drivers/aio/helpers_test.go",
"chars": 1843,
"preview": "package aio\n\nimport (\n\t\"fmt\"\n\t\"sync\"\n)\n\nconst analogReadReturnValue = 99\n\ntype aioTestBareAdaptor struct{}\n\nfunc (t *aio"
},
{
"path": "drivers/aio/temperature_sensor_driver.go",
"chars": 5119,
"preview": "package aio\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"time\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\nconst kelvinOffset = 273.15\n\n// TemperatureSenso"
},
{
"path": "drivers/aio/temperature_sensor_driver_test.go",
"chars": 8543,
"preview": "//nolint:forcetypeassert // ok here\npackage aio\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr"
},
{
"path": "drivers/aio/thermalzone_driver.go",
"chars": 2617,
"preview": "package aio\n\nimport (\n\t\"fmt\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\n// thermalZoneOptionApplier needs to be implemented by each conf"
},
{
"path": "drivers/aio/thermalzone_driver_test.go",
"chars": 2952,
"preview": "package aio\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify"
},
{
"path": "drivers/ble/LICENSE",
"chars": 565,
"preview": "Copyright (c) 2014-2018 The Hybrid Group\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not us"
},
{
"path": "drivers/ble/README.md",
"chars": 873,
"preview": "# BLE\n\nThis package provides drivers for [Bluetooth LE (BLE)](http://en.wikipedia.org/wiki/Bluetooth_low_energy)\ndevices"
},
{
"path": "drivers/ble/battery_driver.go",
"chars": 773,
"preview": "package ble\n\nimport (\n\t\"bytes\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\nconst batteryCharaShort = \"2a19\"\n\n// BatteryDriver represents "
},
{
"path": "drivers/ble/battery_driver_test.go",
"chars": 1250,
"preview": "package ble\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require"
},
{
"path": "drivers/ble/ble_driver.go",
"chars": 2872,
"preview": "package ble\n\nimport (\n\t\"log\"\n\t\"sync\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\n// OptionApplier needs to be implemented by each configu"
},
{
"path": "drivers/ble/ble_driver_test.go",
"chars": 2369,
"preview": "package ble\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/"
},
{
"path": "drivers/ble/device_information_driver.go",
"chars": 2443,
"preview": "package ble\n\nimport (\n\t\"bytes\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\nconst (\n\tdeviceInformationModelNumberCharaShort = \"2a24\"\n"
},
{
"path": "drivers/ble/device_information_driver_test.go",
"chars": 2180,
"preview": "package ble\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require"
},
{
"path": "drivers/ble/doc.go",
"chars": 251,
"preview": "/*\nPackage ble provides the Gobot drivers for several Bluetooth LE Services.\n\nFor more information refer to the README:\n"
},
{
"path": "drivers/ble/generic_access_driver.go",
"chars": 2879,
"preview": "package ble\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\nconst (\n\tgenericAccessDeviceNameCharaShort "
},
{
"path": "drivers/ble/generic_access_driver_test.go",
"chars": 1549,
"preview": "package ble\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require"
},
{
"path": "drivers/ble/microbit/LICENSE",
"chars": 565,
"preview": "Copyright (c) 2014-2018 The Hybrid Group\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not us"
},
{
"path": "drivers/ble/microbit/accelerometer_driver.go",
"chars": 1595,
"preview": "package microbit\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\n\t\"gobot.io/x/gobot/v2\"\n\t\"gobot.io/x/gobot/v2/drivers/ble\"\n)\n\ncon"
},
{
"path": "drivers/ble/microbit/accelerometer_driver_test.go",
"chars": 1897,
"preview": "//nolint:forcetypeassert,dupl // ok here\npackage microbit\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr"
},
{
"path": "drivers/ble/microbit/button_driver.go",
"chars": 1193,
"preview": "package microbit\n\nimport (\n\t\"gobot.io/x/gobot/v2\"\n\t\"gobot.io/x/gobot/v2/drivers/ble\"\n)\n\nconst (\n\t// buttonService = \"e95"
},
{
"path": "drivers/ble/microbit/button_driver_test.go",
"chars": 1523,
"preview": "package microbit\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/te"
},
{
"path": "drivers/ble/microbit/doc.go",
"chars": 278,
"preview": "/*\nPackage microbit contains the Gobot drivers for the Microbit platform.\n\nFor more information refer to the microbit RE"
},
{
"path": "drivers/ble/microbit/io_pin_driver.go",
"chars": 5562,
"preview": "package microbit\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"strconv\"\n\n\t\"gobot.io/x/gobot/v2\"\n\t\"gobot.io/x/gobot/v"
},
{
"path": "drivers/ble/microbit/io_pin_driver_test.go",
"chars": 4556,
"preview": "package microbit\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/"
},
{
"path": "drivers/ble/microbit/led_driver.go",
"chars": 3080,
"preview": "package microbit\n\nimport (\n\t\"gobot.io/x/gobot/v2\"\n\t\"gobot.io/x/gobot/v2/drivers/ble\"\n)\n\nconst (\n\t// ledService = \"e95dd9"
},
{
"path": "drivers/ble/microbit/led_driver_test.go",
"chars": 1614,
"preview": "package microbit\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/re"
},
{
"path": "drivers/ble/microbit/magnetometer_driver.go",
"chars": 1583,
"preview": "package microbit\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\n\t\"gobot.io/x/gobot/v2\"\n\t\"gobot.io/x/gobot/v2/drivers/ble\"\n)\n\ncon"
},
{
"path": "drivers/ble/microbit/magnetometer_driver_test.go",
"chars": 1980,
"preview": "//nolint:forcetypeassert,dupl // ok here\npackage microbit\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr"
},
{
"path": "drivers/ble/microbit/temperature_driver.go",
"chars": 1093,
"preview": "package microbit\n\nimport (\n\t\"bytes\"\n\n\t\"gobot.io/x/gobot/v2\"\n\t\"gobot.io/x/gobot/v2/drivers/ble\"\n)\n\nconst (\n\t// temperatur"
},
{
"path": "drivers/ble/microbit/temperature_driver_test.go",
"chars": 1725,
"preview": "package microbit\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/te"
},
{
"path": "drivers/ble/parrot/LICENSE",
"chars": 565,
"preview": "Copyright (c) 2014-2018 The Hybrid Group\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not us"
},
{
"path": "drivers/ble/parrot/doc.go",
"chars": 288,
"preview": "/*\nPackage parrot contains the Gobot driver for the Parrot Minidrone platform.\n\nFor more information refer to the minidr"
},
{
"path": "drivers/ble/parrot/minidrone_driver.go",
"chars": 13157,
"preview": "package parrot\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"math\"\n\t\"sync\"\n\t\"time\"\n\n\t\"gobot.io/x/gobot/v2\"\n\t\"gobot.io/x"
},
{
"path": "drivers/ble/parrot/minidrone_driver_test.go",
"chars": 4782,
"preview": "package parrot\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/requ"
},
{
"path": "drivers/ble/serial_port.go",
"chars": 1913,
"preview": "package ble\n\nimport (\n\t\"sync\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\n// SerialPortDriver is a implementation of serial over Bluetoot"
},
{
"path": "drivers/ble/serial_port_test.go",
"chars": 5128,
"preview": "package ble\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/requi"
},
{
"path": "drivers/ble/sphero/LICENSE",
"chars": 565,
"preview": "Copyright (c) 2013-2018 The Hybrid Group\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not us"
},
{
"path": "drivers/ble/sphero/doc.go",
"chars": 455,
"preview": "/*\nPackage sphero provides the Gobot drivers for the Sphero BLE based platforms.\n\nFor further information refer to spher"
},
{
"path": "drivers/ble/sphero/sphero_bb8_driver.go",
"chars": 741,
"preview": "package sphero\n\nimport (\n\t\"gobot.io/x/gobot/v2\"\n\t\"gobot.io/x/gobot/v2/drivers/ble\"\n\t\"gobot.io/x/gobot/v2/drivers/common/"
},
{
"path": "drivers/ble/sphero/sphero_bb8_driver_test.go",
"chars": 930,
"preview": "package sphero\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\n\t\"gobot.io/x/gobot/v2\"\n\t\"gobot.io"
},
{
"path": "drivers/ble/sphero/sphero_ollie_driver.go",
"chars": 12463,
"preview": "package sphero\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"gobot.io/x/gobot/v2\"\n\t\"gobot.io/x/gobot/v2/driver"
},
{
"path": "drivers/ble/sphero/sphero_ollie_driver_test.go",
"chars": 3133,
"preview": "//nolint:forcetypeassert // ok here\npackage sphero\n\nimport (\n\t\"strconv\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testif"
},
{
"path": "drivers/ble/sphero/sphero_sprkplus_driver.go",
"chars": 793,
"preview": "package sphero\n\nimport (\n\t\"gobot.io/x/gobot/v2\"\n\t\"gobot.io/x/gobot/v2/drivers/ble\"\n\t\"gobot.io/x/gobot/v2/drivers/common/"
},
{
"path": "drivers/ble/sphero/sphero_sprkplus_driver_test.go",
"chars": 961,
"preview": "package sphero\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\n\t\"gobot.io/x/gobot/v2\"\n\t\"gobot.io"
},
{
"path": "drivers/ble/testutil/testutil.go",
"chars": 2996,
"preview": "package testutil\n\nimport (\n\t\"fmt\"\n\t\"sync\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\nvar _ gobot.BLEConnector = (*bleTestClientAdaptor)("
},
{
"path": "drivers/common/bit/bit.go",
"chars": 473,
"preview": "package bit\n\n// Set is used to set a bit in the given integer at a given position to 1.\nfunc Set(n int, pos uint8) int {"
},
{
"path": "drivers/common/bit/bit_test.go",
"chars": 549,
"preview": "package bit\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc T"
},
{
"path": "drivers/common/mfrc522/mfrc522_connectionwrapper.go",
"chars": 847,
"preview": "package mfrc522\n\nimport \"fmt\"\n\nfunc (d *MFRC522Common) readByteData(reg uint8) (uint8, error) {\n\tif d.connection == nil "
},
{
"path": "drivers/common/mfrc522/mfrc522_pcd.go",
"chars": 10804,
"preview": "package mfrc522\n\nimport (\n\t\"fmt\"\n\t\"time\"\n)\n\n// PCD: proximity coupling device (reader unit)\n// PICC: proximity integrate"
},
{
"path": "drivers/common/mfrc522/mfrc522_pcd_register.go",
"chars": 23992,
"preview": "//nolint:lll // ok here\npackage mfrc522\n\n// Page 0: Command and status\nconst (\n\t// 0x00 // reserved for"
},
{
"path": "drivers/common/mfrc522/mfrc522_pcd_test.go",
"chars": 5898,
"preview": "package mfrc522\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nty"
},
{
"path": "drivers/common/mfrc522/mfrc522_picc.go",
"chars": 13119,
"preview": "//nolint:lll // ok here\npackage mfrc522\n\nimport (\n\t\"fmt\"\n)\n\nconst piccDebug = false\n\n// Commands sent to the PICC, used "
},
{
"path": "drivers/common/spherocommon/spherocommon.go",
"chars": 898,
"preview": "package spherocommon\n\nconst (\n\t// ErrorEvent event when error encountered\n\tErrorEvent = \"error\"\n\n\t// SensorDataEvent eve"
},
{
"path": "drivers/common/spherocommon/spherocommon_packets.go",
"chars": 6113,
"preview": "package spherocommon\n\n// LocatorConfig provides configuration for the Location api.\n// For more information refer to the"
},
{
"path": "drivers/common/spherocommon/spherocommon_test.go",
"chars": 455,
"preview": "package spherocommon\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestCalculateChecksum(t"
},
{
"path": "drivers/gpio/LICENSE",
"chars": 565,
"preview": "Copyright (c) 2013-2018 The Hybrid Group\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not us"
},
{
"path": "drivers/gpio/README.md",
"chars": 1193,
"preview": "# GPIO\n\nThis package provides drivers for [General Purpose Input/Output (GPIO)](https://en.wikipedia.org/wiki/General_Pu"
},
{
"path": "drivers/gpio/aip1640_driver.go",
"chars": 3961,
"preview": "package gpio\n\nimport (\n\t\"time\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\n// Commands of the driver\nconst (\n\tAIP1640DataCmd = 0x40\n\tAIP"
},
{
"path": "drivers/gpio/aip1640_driver_test.go",
"chars": 3157,
"preview": "package gpio\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testif"
},
{
"path": "drivers/gpio/button_driver.go",
"chars": 4544,
"preview": "package gpio\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\n// buttonOptionApplier needs to be implemented by each "
},
{
"path": "drivers/gpio/button_driver_test.go",
"chars": 5806,
"preview": "package gpio\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/"
},
{
"path": "drivers/gpio/buzzer_driver.go",
"chars": 3924,
"preview": "package gpio\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\n// Some useful divider\nconst (\n\tWhole = 4\n\tHalf = "
},
{
"path": "drivers/gpio/buzzer_driver_test.go",
"chars": 2775,
"preview": "package gpio\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/test"
},
{
"path": "drivers/gpio/direct_pin_driver.go",
"chars": 2356,
"preview": "package gpio\n\nimport (\n\t\"strconv\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\n// DirectPinDriver represents a GPIO pin\ntype DirectPinDriv"
},
{
"path": "drivers/gpio/direct_pin_driver_test.go",
"chars": 5248,
"preview": "//nolint:forcetypeassert // ok here\npackage gpio\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testif"
},
{
"path": "drivers/gpio/doc.go",
"chars": 377,
"preview": "/*\nPackage gpio provides Gobot drivers for General Purpose Input/Output devices.\n\nInstalling:\n\n\tPlease refer to the main"
},
{
"path": "drivers/gpio/easy_driver.go",
"chars": 6996,
"preview": "package gpio\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\nconst easyDriverDebug = false\n\n// easyOption"
},
{
"path": "drivers/gpio/easy_driver_test.go",
"chars": 19802,
"preview": "package gpio\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr"
},
{
"path": "drivers/gpio/gpio_driver.go",
"chars": 6641,
"preview": "package gpio\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"log\"\n\t\"sync\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\nvar (\n\t// ErrServoWriteUnsupported is "
},
{
"path": "drivers/gpio/gpio_driver_test.go",
"chars": 1903,
"preview": "package gpio\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\n"
},
{
"path": "drivers/gpio/grove_drivers.go",
"chars": 3692,
"preview": "package gpio\n\n// GroveRelayDriver represents a Relay with a Grove connector\ntype GroveRelayDriver struct {\n\t*RelayDriver"
},
{
"path": "drivers/gpio/grove_drivers_test.go",
"chars": 2646,
"preview": "//nolint:forcetypeassert // ok here\npackage gpio\n\nimport (\n\t\"errors\"\n\t\"reflect\"\n\t\"sync/atomic\"\n\t\"testing\"\n\t\"time\"\n\n\t\"git"
},
{
"path": "drivers/gpio/hcsr04_driver.go",
"chars": 8449,
"preview": "package gpio\n\nimport (\n\t\"fmt\"\n\t\"sync\"\n\t\"time\"\n\n\t\"gobot.io/x/gobot/v2\"\n\t\"gobot.io/x/gobot/v2/system\"\n)\n\nconst (\n\thcsr04So"
},
{
"path": "drivers/gpio/hcsr04_driver_test.go",
"chars": 10155,
"preview": "package gpio\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"g"
},
{
"path": "drivers/gpio/hd44780_driver.go",
"chars": 12394,
"preview": "package gpio\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\n// Commands for the driver\nconst (\n\tHD44780_C"
},
{
"path": "drivers/gpio/hd44780_driver_test.go",
"chars": 7281,
"preview": "package gpio\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/test"
},
{
"path": "drivers/gpio/helpers_test.go",
"chars": 3831,
"preview": "package gpio\n\nimport (\n\t\"fmt\"\n\t\"sync\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\ntype gpioTestBareAdaptor struct{}\n\nfunc (t *gpioTestBar"
},
{
"path": "drivers/gpio/led_driver.go",
"chars": 1940,
"preview": "package gpio\n\nimport (\n\t\"gobot.io/x/gobot/v2\"\n)\n\n// LedDriver represents a digital Led\ntype LedDriver struct {\n\t*driver\n"
},
{
"path": "drivers/gpio/led_driver_test.go",
"chars": 2887,
"preview": "//nolint:forcetypeassert // ok here\npackage gpio\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testif"
},
{
"path": "drivers/gpio/max7219_driver.go",
"chars": 3978,
"preview": "package gpio\n\nimport (\n\t\"github.com/hashicorp/go-multierror\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\n// Access and command constants "
},
{
"path": "drivers/gpio/max7219_driver_test.go",
"chars": 2084,
"preview": "package gpio\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/requir"
},
{
"path": "drivers/gpio/motor_driver.go",
"chars": 7518,
"preview": "package gpio\n\nimport (\n\t\"fmt\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\n// motorOptionApplier needs to be implemented by each configura"
},
{
"path": "drivers/gpio/motor_driver_test.go",
"chars": 5442,
"preview": "package gpio\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/requir"
},
{
"path": "drivers/gpio/pir_motion_driver.go",
"chars": 4107,
"preview": "package gpio\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\n// pirMotionOptionApplier needs to be implemented by ea"
},
{
"path": "drivers/gpio/pir_motion_driver_test.go",
"chars": 4652,
"preview": "package gpio\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"sync\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/"
},
{
"path": "drivers/gpio/relay_driver.go",
"chars": 2982,
"preview": "package gpio\n\nimport (\n\t\"fmt\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\n// relayOptionApplier needs to be implemented by each configura"
},
{
"path": "drivers/gpio/relay_driver_test.go",
"chars": 3968,
"preview": "package gpio\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/requir"
},
{
"path": "drivers/gpio/rgb_led_driver.go",
"chars": 3166,
"preview": "package gpio\n\nimport (\n\t\"gobot.io/x/gobot/v2\"\n)\n\n// RgbLedDriver represents a digital RGB Led\ntype RgbLedDriver struct {"
},
{
"path": "drivers/gpio/rgb_led_driver_test.go",
"chars": 3289,
"preview": "//nolint:forcetypeassert // ok here\npackage gpio\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testif"
},
{
"path": "drivers/gpio/servo_driver.go",
"chars": 1892,
"preview": "package gpio\n\nimport (\n\t\"fmt\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\n// ServoDriver Represents a Servo\ntype ServoDriver struct {\n\t*d"
},
{
"path": "drivers/gpio/servo_driver_test.go",
"chars": 2908,
"preview": "//nolint:forcetypeassert // ok here\npackage gpio\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testif"
},
{
"path": "drivers/gpio/stepper_driver.go",
"chars": 13824,
"preview": "package gpio\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"math\"\n\t\"os\"\n\t\"os/signal\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"gobot.io/x/gobo"
},
{
"path": "drivers/gpio/stepper_driver_test.go",
"chars": 10923,
"preview": "package gpio\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/s"
},
{
"path": "drivers/gpio/tm1638_driver.go",
"chars": 6691,
"preview": "package gpio\n\nimport (\n\t\"math\"\n\t\"strings\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\n// Colors of the display\nconst (\n\tTM1638None = iota"
},
{
"path": "drivers/gpio/tm1638_driver_test.go",
"chars": 2731,
"preview": "package gpio\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/requir"
},
{
"path": "drivers/i2c/LICENSE",
"chars": 565,
"preview": "Copyright (c) 2013-2018 The Hybrid Group\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not us"
},
{
"path": "drivers/i2c/README.md",
"chars": 2372,
"preview": "# I2C\n\nThis package provides drivers for [i2c](https://en.wikipedia.org/wiki/I%C2%B2C)devices. It must be used along wit"
},
{
"path": "drivers/i2c/adafruit1109_driver.go",
"chars": 9286,
"preview": "package i2c\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"gobot.io/x/gobot/v2\"\n\t\"gobot.io/x/gobot/v2/drivers/gpio\"\n)\n\nconst "
},
{
"path": "drivers/i2c/adafruit1109_driver_test.go",
"chars": 7661,
"preview": "package i2c\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretch"
},
{
"path": "drivers/i2c/adafruit2327_driver.go",
"chars": 1595,
"preview": "package i2c\n\nimport (\n\t\"gobot.io/x/gobot/v2\"\n)\n\n// Adafruit2327Driver is a driver for Adafruit 16-Channel PWM/Servo HAT "
},
{
"path": "drivers/i2c/adafruit2327_driver_test.go",
"chars": 2872,
"preview": "package i2c\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testi"
},
{
"path": "drivers/i2c/adafruit2348_driver.go",
"chars": 11733,
"preview": "package i2c\n\nimport (\n\t\"errors\"\n\t\"log\"\n\t\"sync\"\n\t\"time\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\nconst adafruit2348Debug = false // Set"
},
{
"path": "drivers/i2c/adafruit2348_driver_test.go",
"chars": 4714,
"preview": "package i2c\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testi"
},
{
"path": "drivers/i2c/ads1x15_driver.go",
"chars": 15587,
"preview": "package i2c\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"math\"\n\t\"sort\"\n\t\"strconv\"\n\t\"time\"\n)\n\nconst ads1x15DefaultAddress = 0x48\n\nconst (\n\ta"
},
{
"path": "drivers/i2c/ads1x15_driver_1015_test.go",
"chars": 8343,
"preview": "package i2c\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testi"
},
{
"path": "drivers/i2c/ads1x15_driver_1115_test.go",
"chars": 8330,
"preview": "package i2c\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testi"
},
{
"path": "drivers/i2c/ads1x15_driver_test.go",
"chars": 3211,
"preview": "//nolint:forcetypeassert // ok here\npackage i2c\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com"
},
{
"path": "drivers/i2c/adxl345_driver.go",
"chars": 10481,
"preview": "package i2c\n\nimport (\n\t\"encoding/binary\"\n\t\"log\"\n)\n\nconst adxl345Debug = false\n\n// ADXL345 supports 2 addresses, which ca"
},
{
"path": "drivers/i2c/adxl345_driver_test.go",
"chars": 9391,
"preview": "package i2c\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testi"
},
{
"path": "drivers/i2c/bh1750_driver.go",
"chars": 1881,
"preview": "package i2c\n\nimport (\n\t\"errors\"\n\t\"time\"\n)\n\nconst bh1750DefaultAddress = 0x23\n\nconst (\n\tBH1750_POWER_DOWN "
},
{
"path": "drivers/i2c/bh1750_driver_test.go",
"chars": 3086,
"preview": "package i2c\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stret"
},
{
"path": "drivers/i2c/blinkm_driver.go",
"chars": 2897,
"preview": "package i2c\n\nimport (\n\t\"fmt\"\n)\n\nconst blinkmDefaultAddress = 0x09\n\n// BlinkMDriver is a Gobot Driver for a BlinkM LED\nty"
},
{
"path": "drivers/i2c/blinkm_driver_test.go",
"chars": 4708,
"preview": "//nolint:forcetypeassert // ok here\npackage i2c\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify"
},
{
"path": "drivers/i2c/bme280_driver.go",
"chars": 7614,
"preview": "package i2c\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"log\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\nconst bme280Debug = true\n\n"
},
{
"path": "drivers/i2c/bme280_driver_test.go",
"chars": 7440,
"preview": "package i2c\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stret"
},
{
"path": "drivers/i2c/bmp180_driver.go",
"chars": 7162,
"preview": "package i2c\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"log\"\n\t\"time\"\n)\n\nconst bmp180Debug = false\n\n// the default address is"
},
{
"path": "drivers/i2c/bmp180_driver_test.go",
"chars": 8813,
"preview": "package i2c\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/stretchr/testify"
},
{
"path": "drivers/i2c/bmp280_driver.go",
"chars": 10739,
"preview": "package i2c\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"log\"\n\t\"math\"\n)\n\nconst bmp280Debug = true\n\n// the default address is "
},
{
"path": "drivers/i2c/bmp280_driver_test.go",
"chars": 7436,
"preview": "package i2c\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stret"
},
{
"path": "drivers/i2c/bmp388_driver.go",
"chars": 10590,
"preview": "package i2c\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"log\"\n\t\"math\"\n)\n\nconst bmp388Debug = false\n\n// the default add"
},
{
"path": "drivers/i2c/bmp388_driver_test.go",
"chars": 7041,
"preview": "package i2c\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\""
},
{
"path": "drivers/i2c/ccs811_driver.go",
"chars": 10913,
"preview": "package i2c\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"time\"\n)\n\n// CCS811DriveMode type\ntype CCS811DriveMode uint8\n\n// Operating modes w"
},
{
"path": "drivers/i2c/ccs811_driver_test.go",
"chars": 7888,
"preview": "package i2c\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testi"
},
{
"path": "drivers/i2c/doc.go",
"chars": 345,
"preview": "/*\nPackage i2c provides Gobot drivers for i2c devices.\n\nInstalling:\n\n\tPlease refer to the main [README.md](https://githu"
},
{
"path": "drivers/i2c/drv2605l_driver.go",
"chars": 5880,
"preview": "package i2c\n\n// DRV2605Mode - operating mode\ntype DRV2605Mode uint8\n\n// Operating modes, for use in SetMode()\nconst (\n\tD"
},
{
"path": "drivers/i2c/drv2605l_driver_test.go",
"chars": 4617,
"preview": "package i2c\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\""
},
{
"path": "drivers/i2c/generic_driver.go",
"chars": 3945,
"preview": "package i2c\n\nimport (\n\t\"fmt\"\n\t\"time\"\n)\n\n// GenericDriver implements the interface gobot.Driver.\ntype GenericDriver struc"
},
{
"path": "drivers/i2c/generic_driver_test.go",
"chars": 564,
"preview": "package i2c\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require"
},
{
"path": "drivers/i2c/grove_drivers.go",
"chars": 1539,
"preview": "package i2c\n\n// GroveLcdDriver is a driver for the Jhd1313m1 LCD display which has two i2c addreses,\n// one belongs to a"
},
{
"path": "drivers/i2c/grove_drivers_test.go",
"chars": 1561,
"preview": "package i2c\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\nvar (\n\t_ g"
},
{
"path": "drivers/i2c/grovepi_driver.go",
"chars": 7729,
"preview": "package i2c\n\nimport (\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"math\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n)\n\n// default is for grovepi4 inst"
},
{
"path": "drivers/i2c/grovepi_driver_test.go",
"chars": 7710,
"preview": "package i2c\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretc"
},
{
"path": "drivers/i2c/helpers_test.go",
"chars": 4378,
"preview": "package i2c\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"sync\"\n)\n\nvar rgb = map[string]interface{}{\n\t\"red\": 1.0,\n\t\"green\": 1.0,\n\t\"blue"
},
{
"path": "drivers/i2c/hmc5883l_driver.go",
"chars": 9945,
"preview": "package i2c\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"math\"\n\t\"sort\"\n)\n\nconst (\n\thmc5883lDebug = false\n\thmc5883lDefaultAddress ="
},
{
"path": "drivers/i2c/hmc5883l_driver_test.go",
"chars": 6333,
"preview": "package i2c\n\nimport (\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require"
},
{
"path": "drivers/i2c/hmc6352_driver.go",
"chars": 1176,
"preview": "package i2c\n\nconst hmc6352DefaultAddress = 0x21\n\n// HMC6352Driver is a Driver for a HMC6352 digital compass\ntype HMC6352"
},
{
"path": "drivers/i2c/hmc6352_driver_test.go",
"chars": 2733,
"preview": "package i2c\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testi"
},
{
"path": "drivers/i2c/i2c_config.go",
"chars": 1245,
"preview": "package i2c\n\ntype i2cConfig struct {\n\tbus int\n\taddress int\n}\n\n// NewConfig returns a new I2c Config.\nfunc NewConfig("
},
{
"path": "drivers/i2c/i2c_config_test.go",
"chars": 1699,
"preview": "//nolint:forcetypeassert // ok here\npackage i2c\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com"
},
{
"path": "drivers/i2c/i2c_connection.go",
"chars": 3531,
"preview": "package i2c\n\nimport (\n\t\"fmt\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\nconst (\n\t// Error event\n\tError = \"error\"\n)\n\nconst (\n\t// BusNotIn"
},
{
"path": "drivers/i2c/i2c_connection_test.go",
"chars": 5541,
"preview": "//go:build !windows\n// +build !windows\n\npackage i2c\n\nimport (\n\t\"testing\"\n\t\"unsafe\"\n\n\t\"github.com/stretchr/testify/assert"
},
{
"path": "drivers/i2c/i2c_driver.go",
"chars": 6429,
"preview": "package i2c\n\nimport (\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"log\"\n\t\"strconv\"\n\t\"sync\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\n// Config is the in"
},
{
"path": "drivers/i2c/i2c_driver_test.go",
"chars": 2983,
"preview": "package i2c\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testify/require\"\n\n\t\"gobot."
},
{
"path": "drivers/i2c/ina3221_driver.go",
"chars": 5680,
"preview": "package i2c\n\n// INA3221Driver is a driver for the Texas Instruments INA3221 device. The INA3221 is a three-channel\n// cu"
},
{
"path": "drivers/i2c/ina3221_driver_test.go",
"chars": 4248,
"preview": "package i2c\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testi"
},
{
"path": "drivers/i2c/jhd1313m1_driver.go",
"chars": 10146,
"preview": "package i2c\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"strconv\"\n\t\"time\"\n\n\t\"gobot.io/x/gobot/v2\"\n)\n\nconst (\n\tREG_RED = 0x04\n\tREG_GREEN ="
},
{
"path": "drivers/i2c/jhd1313m1_driver_test.go",
"chars": 6409,
"preview": "package i2c\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testi"
},
{
"path": "drivers/i2c/l3gd20h_driver.go",
"chars": 4824,
"preview": "//nolint:lll // ok here\npackage i2c\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"log\"\n)\n\nconst (\n\tl3gd20hDebug = fal"
},
{
"path": "drivers/i2c/l3gd20h_driver_test.go",
"chars": 7457,
"preview": "package i2c\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stretchr/testi"
},
{
"path": "drivers/i2c/lidarlite_driver.go",
"chars": 1465,
"preview": "package i2c\n\nimport (\n\t\"time\"\n)\n\nconst lidarliteDefaultAddress = 0x62\n\n// LIDARLiteDriver is the Gobot driver for the LI"
},
{
"path": "drivers/i2c/lidarlite_driver_test.go",
"chars": 3824,
"preview": "package i2c\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/stret"
},
{
"path": "drivers/i2c/mcp23017_driver.go",
"chars": 13885,
"preview": "package i2c\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"strings\"\n\n\t\"gobot.io/x/gobot/v2\"\n\t\"gobot.io/x/gobot/v2/drivers/common/bit\"\n)\n\n// d"
}
]
// ... and 773 more files (download for full content)
About this extraction
This page contains the full source code of the hybridgroup/gobot GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 973 files (7.1 MB), approximately 1.9M tokens, and a symbol index with 8610 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.