diff --git a/.gitignore b/.gitignore index 3ed86a09f..5ca851962 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ _site/ *.orig *~ *.lock +.sass-cache +.jekyll-metadata +.DS_Store \ No newline at end of file diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 000000000..edfc68948 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +ruby 2.5.8 diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..c3f6b37e9 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +language: ruby +rvm: +- 2.5.3 + +before_script: + - chmod +x ./cibuild.sh # or do this locally and commit + +# Assume bundler is being used, therefore +# the `install` step will run `bundle install` by default. +script: ./cibuild.sh + +env: + global: + - NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer diff --git a/Gemfile b/Gemfile index 9c0465324..73c5a03d3 100644 --- a/Gemfile +++ b/Gemfile @@ -2,4 +2,5 @@ source 'https://rubygems.org' gem 'github-pages' require 'rbconfig' +gem "html-proofer", :platforms => :ruby gem 'wdm', '~> 0.1.0' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw/i diff --git a/README.md b/README.md index f4c51a0cc..886f02376 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,52 @@ -ev3dev.github.io +Pretty website for ev3dev [![Build Status](https://travis-ci.org/ev3dev/ev3dev.github.io.svg?branch=master)](https://travis-ci.org/ev3dev/ev3dev.github.io) ================ -This is the web page at and also . +This is the source repository for the **web page** at . If you want +to learn more about ev3dev in general, visit the site or check out our +[GitHub repo](github.com/ev3dev/ev3dev). -Feel free to fork and make a pull request. +Feel free to fork and make a pull request! If you're looking for ways to +contribute to our website, check out issues [tagged "help wanted"](https://github.com/ev3dev/ev3dev.github.io/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22); there are often tasks there +which are well-suited to new contributors. -You can view your changes locally by installing [jekyll](https://help.github.com/articles/using-jekyll-with-pages). - -Installing Jekyll in Ubuntu 14.04 +Previewing Locally --- -### Install Ruby via apt-get - sudo apt-get install git ruby2.0 ruby2.0-dev nodejs +You can view your changes locally by installing [Jekyll](https://help.github.com/articles/using-jekyll-with-pages). + +### Installing Jekyll in Ubuntu 16.04 + +#### Install Ruby via apt-get + sudo apt-get install git ruby ruby-dev zlib1g-dev nodejs sudo gem install bundler -### Install Ruby via RVM (Ruby Version Manager) -If you hit any snags with apt another option is to install via RVM. Note that -you must do the 'source' line when you open a new xterm. +#### Install Ruby via RVM (Ruby Version Manager) +If you use ruby for other things and don't want to mess up you system ruby +installation, you can install ruby via `rvm` instead. Note that you must do the +'source' line when you open a new xterm or add it to `~/.bashrc`. gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 \curl -sSL https://get.rvm.io | bash -s stable --ruby source ~/.rvm/scripts/rvm -### Checkout Code and Run Jekyll +You will still need to run the following too... + + sudo apt-get install git zlib1g-dev nodejs + sudo gem install bundler + +#### Check Out Code and Run Jekyll git clone git@github.com:/ev3dev.github.io cd ev3dev.github.io bundle install - bundle exec jekyll serve & + bundle exec jekyll serve --safe --incremental & www-browser http://localhost:4000 & # work, work, work -Installing Jekyll in Windows ---- +### Installing Jekyll on Windows -- Follow the instructions in step 1 [here](http://jekyll-windows.juthilo.com/1-ruby-and-devkit/) (Installing Ruby and the Ruby DevKit). +First, follow the instructions in step 1 +[here](http://jekyll-windows.juthilo.com/1-ruby-and-devkit/): +"Installing Ruby and the Ruby DevKit." Then run: @@ -41,28 +54,16 @@ Then run: git clone https://github.com//ev3dev.github.io cd ev3dev.github.io bundle install - bundle exec jekyll serve + bundle exec jekyll serve --safe --incremental -Now you should be able to visit your page at: [http://localhost:4000](http://localhost:4000). It should auto-update when you change the source files, so all you have to do is refresh your browser. +Now you should be able to visit your page at: . +It should auto-update when you change the source files, so all you have to do is +refresh your browser. Previewing Your Changes Online --- -When forking, you can create a new branch called `gh-pages`, then your -changes can be viewed as `http://.github.io/ev3dev.github.io`. When you do this -though, GitHub will send you lots of email like this, which you should ignore. - - The page build completed successfully, but returned the following warning: - - CNAME already taken: www.ev3dev.org - - For information on troubleshooting Jekyll see: - - https://help.github.com/articles/using-jekyll-with-pages#troubleshooting - - If you have any questions please contact us at https://github.com/contact. - -If it really gets on your nerves, you can rename the `CNAME` file. Just make sure to -change it back before you submit your pull request. - +After you have previewed your changes locally, you can use a special Ruby script to publish your changes using the `gh-pages` +branch of your fork of ev3dev.github.io. +If you have SSH setup for your GitHub account, simply run `./publish.rb --ssh` where `` is your actual GitHub user name. If you do not have SSH set up, use `./publish.rb `. This will copy the contents of `_site`, fix it up a bit and push it to your fork on GitHub. You can view the results at `http://.github.io/ev3dev.github.io`. diff --git a/_config.yml b/_config.yml index deae3ee45..8ad378c34 100644 --- a/_config.yml +++ b/_config.yml @@ -1,8 +1,17 @@ markdown: kramdown permalink: pretty -exclude: [README.md, Gemfile, Gemfile.lock, repo-metadata.html] +exclude: + - README.md + - Gemfile + - Gemfile.lock + - repo-metadata.html + - publish.rb + - vendor + - cibuild.sh + - .travis.yml + - maintainer-notes.md -gems: +plugins: - jekyll-mentions - jekyll-sitemap - jekyll-redirect-from @@ -15,30 +24,13 @@ defaults: values: layout: "docs" categories: "docs" - - - scope: - path: "docs/drivers" - type: "pages" - values: - category: "drivers" - scope: path: "docs/tutorials" type: "pages" values: category: "tutorials" - - - scope: - path: "docs/sensors" - type: "pages" - values: - category: "sensors" - - - scope: - path: "docs/motors" - type: "pages" - values: - category: "motors" + layout: "tutorial" - scope: path: "docs/devtools" @@ -57,12 +49,15 @@ defaults: type: "posts" values: layout: "project" + excerpt_separator: - scope: path: "news" type: "posts" values: layout: "news" + excerpt_separator: kramdown: - toc_levels: "2,3" + toc_levels: "2,3" + input: GFM diff --git a/_data/breadcrumbs.yml b/_data/breadcrumbs.yml new file mode 100644 index 000000000..b681546aa --- /dev/null +++ b/_data/breadcrumbs.yml @@ -0,0 +1,16 @@ +docs: + name: "Documentation" + devtools: + name: Developer Tools + drivers: + name: Kernel Drivers + kernel-hackers-notebook: + name: Kernel Hacker's Notebook + motors: + name: Motors + ports: + name: Input and Output Ports + sensors: + name: Sensors + tutorials: + name: Tutorials \ No newline at end of file diff --git a/_data/motors.json b/_data/motors.json deleted file mode 100644 index d3a19b136..000000000 --- a/_data/motors.json +++ /dev/null @@ -1,211 +0,0 @@ -[ - { - "count_per_rot": "360", - "encoder_polarity": "DC_MOTOR_POLARITY_INVERSED", - "id": "FIRGELLI_L12_EV3_100", - "legoev3_info": [], - "max_speed": "1200", - "motor_type": "ev3", - "name": "fi-l12-ev3-100", - "source_file": "drivers/lego/motors/ev3_motor_defs.c", - "source_line": 27, - "url_name": "firgelli-l12-ev3-100mm", - "vendor_name": "Firgelli", - "vendor_part_name": "L12 EV3 100mm", - "vendor_part_number": "L12-EV3-100", - "vendor_website": "http://store.firgelli.com/product_p/l12-ev3-100.htm" - }, - { - "count_per_rot": "360", - "encoder_polarity": "DC_MOTOR_POLARITY_INVERSED", - "id": "FIRGELLI_L12_EV3_50", - "legoev3_info": [], - "max_speed": "1200", - "motor_type": "ev3", - "name": "fi-l12-ev3-50", - "source_file": "drivers/lego/motors/ev3_motor_defs.c", - "source_line": 27, - "url_name": "firgelli-l12-ev3-50mm", - "vendor_name": "Firgelli", - "vendor_part_name": "L12 EV3 50mm", - "vendor_part_number": "L12-EV3-50", - "vendor_website": "http://store.firgelli.com/product_p/l12-ev3-50.htm" - }, - { - "id": "LEGO_9V_MINI_MOTOR_NEWER", - "motor_type": "rcx", - "name": "rcx-motor", - "source_file": "drivers/lego/motors/rcx_motor_defs.c", - "source_line": 25, - "url_name": "lego-motor-9v-mini-motor-newer-lighter-weight", - "vendor_name": "LEGO", - "vendor_part_name": "Motor 9V Mini-motor, newer lighter weight", - "vendor_part_number": "43362", - "vendor_website": "http://www.bricklink.com/catalogItem.asp?P=43362c01" - }, - { - "count_per_rot": "360", - "id": "LEGO_EV3_LARGE_MOTOR", - "legoev3_info": [], - "max_speed": "1200", - "motor_type": "ev3", - "name": "lego-ev3-l-motor", - "source_file": "drivers/lego/motors/ev3_motor_defs.c", - "source_line": 27, - "url_name": "lego-ev3-large-servo-motor", - "vendor_name": "LEGO", - "vendor_part_name": "EV3 Large Servo Motor", - "vendor_part_number": "45502", - "vendor_website": "http://shop.lego.com/en-US/EV3-Large-Servo-Motor-45502" - }, - { - "count_per_rot": "360", - "id": "LEGO_EV3_MEDIUM_MOTOR", - "legoev3_info": [], - "max_speed": "900", - "motor_type": "ev3", - "name": "lego-ev3-m-motor", - "source_file": "drivers/lego/motors/ev3_motor_defs.c", - "source_line": 27, - "url_name": "lego-ev3-medium-servo-motor", - "vendor_name": "LEGO", - "vendor_part_name": "EV3 Medium Servo Motor", - "vendor_part_number": "45503", - "vendor_website": "http://shop.lego.com/en-US/EV3-Medium-Servo-Motor-45503" - }, - { - "id": "LEGO_9V_GEARED", - "motor_type": "rcx", - "name": "rcx-motor", - "source_file": "drivers/lego/motors/rcx_motor_defs.c", - "source_line": 25, - "url_name": "lego-technic-motor-9v-geared", - "vendor_name": "LEGO", - "vendor_part_name": "Technic Motor 9V Geared ", - "vendor_part_number": "47154", - "vendor_website": "http://alpha.bricklink.com/pages/clone/catalogitem.page?P=47154c01" - }, - { - "id": "LEGO_9V_MICROMOTOR", - "motor_type": "rcx", - "name": "rcx-motor", - "source_file": "drivers/lego/motors/rcx_motor_defs.c", - "source_line": 25, - "url_name": "lego-motor-9v-micromotor", - "vendor_name": "LEGO", - "vendor_part_name": "Motor 9V Micromotor", - "vendor_part_number": "70823", - "vendor_website": "http://www.bricklink.com/catalogItem.asp?P=2986" - }, - { - "id": "LEGO_9V_MINI_MOTOR_OLDER", - "motor_type": "rcx", - "name": "rcx-motor", - "source_file": "drivers/lego/motors/rcx_motor_defs.c", - "source_line": 25, - "url_name": "lego-motor-9v-mini-motor-older-heavier-weight", - "vendor_name": "LEGO", - "vendor_part_name": "Motor 9V Mini-motor, older heavier weight", - "vendor_part_number": "71427", - "vendor_website": "http://www.bricklink.com/catalogItem.asp?P=71427c01" - }, - { - "id": "LEGO_TECHNIC_MOTOR_9V", - "motor_type": "rcx", - "name": "rcx-motor", - "source_file": "drivers/lego/motors/rcx_motor_defs.c", - "source_line": 25, - "url_name": "lego-technic-motor-9v", - "vendor_name": "LEGO", - "vendor_part_name": "Technic Motor 9V", - "vendor_part_number": "74569", - "vendor_website": "http://www.bricklink.com/catalogItem.asp?P=2838c01" - }, - { - "id": "LEGO_PF_TRAIN_MOTOR", - "motor_type": "rcx", - "name": "rcx-motor", - "source_file": "drivers/lego/motors/rcx_motor_defs.c", - "source_line": 25, - "url_name": "lego-power-functions-train-motor", - "vendor_name": "LEGO", - "vendor_part_name": "Power Functions Train Motor", - "vendor_part_number": "88002", - "vendor_website": "http://shop.lego.com/en-US/Power-Functions-Train-Motor-88002" - }, - { - "id": "LEGO_PF_L_MOTOR", - "motor_type": "rcx", - "name": "rcx-motor", - "source_file": "drivers/lego/motors/rcx_motor_defs.c", - "source_line": 25, - "url_name": "lego-power-functions-l-motor", - "vendor_name": "LEGO", - "vendor_part_name": "Power Functions L-Motor", - "vendor_part_number": "88003", - "vendor_website": "http://shop.lego.com/en-US/Power-Functions-L-Motor-88003" - }, - { - "id": "LEGO_PF_SERVO_MOTOR", - "motor_type": "rcx", - "name": "rcx-motor", - "source_file": "drivers/lego/motors/rcx_motor_defs.c", - "source_line": 25, - "url_name": "lego-power-functions-servo-motor", - "vendor_name": "LEGO", - "vendor_part_name": "Power Functions Servo Motor", - "vendor_part_number": "88004", - "vendor_website": "http://shop.lego.com/en-US/Power-Functions-Servo-Motor-88004" - }, - { - "id": "LEGO_PF_XL_MOTOR", - "motor_type": "rcx", - "name": "rcx-motor", - "source_file": "drivers/lego/motors/rcx_motor_defs.c", - "source_line": 25, - "url_name": "lego-power-functions-xl-motor", - "vendor_name": "LEGO", - "vendor_part_name": "Power Functions XL-Motor", - "vendor_part_number": "8882", - "vendor_website": "http://shop.lego.com/en-US/LEGO-Power-Functions-XL-Motor-8882" - }, - { - "id": "LEGO_PF_M_MOTOR", - "motor_type": "rcx", - "name": "rcx-motor", - "source_file": "drivers/lego/motors/rcx_motor_defs.c", - "source_line": 25, - "url_name": "lego-power-functions-m-motor", - "vendor_name": "LEGO", - "vendor_part_name": "Power Functions M-Motor", - "vendor_part_number": "8883", - "vendor_website": "http://shop.lego.com/en-US/LEGO-Power-Functions-M-Motor-8883" - }, - { - "id": "LEGO_PF_E_MOTOR", - "motor_type": "rcx", - "name": "rcx-motor", - "source_file": "drivers/lego/motors/rcx_motor_defs.c", - "source_line": 25, - "url_name": "lego-e-motor", - "vendor_name": "LEGO", - "vendor_part_name": "E-Motor", - "vendor_part_number": "9670", - "vendor_website": "https://education.lego.com/en-us/lego-education-product-database/machines-and-mechanisms/9670-e-motor" - }, - { - "count_per_rot": "360", - "id": "LEGO_NXT_MOTOR", - "legoev3_info": [], - "max_speed": "1200", - "motor_type": "ev3", - "name": "lego-nxt-motor", - "source_file": "drivers/lego/motors/ev3_motor_defs.c", - "source_line": 27, - "url_name": "lego-interactive-servo-motor-nxt", - "vendor_name": "LEGO", - "vendor_part_name": "Interactive Servo Motor (NXT)", - "vendor_part_number": "9842", - "vendor_website": "http://shop.lego.com/en-US/Interactive-Servo-Motor-9842" - } -] diff --git a/_data/ports.json b/_data/ports.json deleted file mode 100644 index 32722f08f..000000000 --- a/_data/ports.json +++ /dev/null @@ -1,361 +0,0 @@ -[ - { - "connection_types": "NXT/Analog, NXT/I2C, EV3/Analog, EV3/UART", - "description": "Dexter Industries BrickPi Input Port", - "mode_info": [ - { - "description": "No sensor", - "id": "BRICKPI_IN_PORT_MODE_NONE", - "name": "none" - }, - { - "description": "NXT/Analog sensor", - "id": "BRICKPI_IN_PORT_MODE_NXT_ANALOG", - "name": "nxt-analog", - "name_footnote": "[^nxt-analog-mode]", - "notes": "\n[^nxt-analog-mode]: The [nxt-analog] driver will be loaded when\n this mode is set. You must manually specify the correct\n driver for your sensor using `set_device` if you want to use\n another driver. Any driver with a connection type of\n NXT/Analog is allowed.\n ^\n [nxt-analog]: /docs/sensors/generic-nxt-analog-sensor\n \n " - }, - { - "description": "LEGO NXT Color sensor", - "id": "BRICKPI_IN_PORT_MODE_NXT_COLOR", - "name": "nxt-color" - }, - { - "description": "NXT/I2C sensor", - "id": "BRICKPI_IN_PORT_MODE_NXT_I2C", - "name": "nxt-i2c", - "name_footnote": "[^nxt-i2c-mode]", - "notes": "\n[^nxt-i2c-mode]: No sensors are loaded by default. You must\n manually specify the sensor that is connected by using the\n `set_device` attribute.\n \n " - }, - { - "description": "EV3/Analog sensor", - "id": "BRICKPI_IN_PORT_MODE_EV3_ANALOG", - "name": "ev3-analog", - "name_footnote": "[^ev3-analog-mode]", - "notes": "\n[^ev3-analog-mode]: Only the LEGO EV3 Touch sensor is supported.\n The driver will load by default.\n \n " - }, - { - "description": "EV3/UART sensor", - "id": "BRICKPI_IN_PORT_MODE_EV3_UART", - "name": "ev3-uart", - "name_footnote": "[^ev3-uart-mode]", - "notes": "\n[^ev3-uart-mode]: Only the LEGO EV3 Ultrasonic, Color, Gyro,\n and Infrared sensors are supported. They cannot be automatically\n detected, so you must specify the sensor manually using the\n `set_device` attribute. No sensors are loaded by default.\n \n " - } - ], - "module": "brickpi-ports-in", - "name": "brickpi-in-port", - "num_modes": 6, - "prefix": "in", - "source_file": "drivers/lego/brickpi/brickpi_ports_in.c", - "source_line": 56, - "url_name": "brickpi-in-port" - }, - { - "connection_types": "tacho-motor, dc-motor, led", - "description": "Dexter Industries BrickPi Output Port", - "mode_info": [ - { - "description": "NXT/EV3 Large Motor", - "id": "BRICKPI_OUT_PORT_MODE_TACHO_MOTOR", - "name": "tacho-motor" - }, - { - "description": "RCX/Power Functions motor", - "id": "BRICKPI_OUT_PORT_MODE_DC_MOTOR", - "name": "dc-motor" - }, - { - "description": "RCX/Power Functions LED", - "id": "BRICKPI_OUT_PORT_MODE_LED", - "name": "led" - } - ], - "module": "brickpi-ports-out", - "name": "brickpi-out-port", - "num_modes": 3, - "prefix": "out", - "source_file": "drivers/lego/brickpi/brickpi_ports_out.c", - "source_line": 53, - "url_name": "brickpi-out-port" - }, - { - "connection_types": "NXT/I2C, NXT/Analog", - "description": "HiTechnic NXT Sensor Multiplexer Input Port", - "mode_info": [ - { - "description": "NXT/Analog sensor", - "id": "HT_NXT_SMUX_PORT_MODE_ANALOG", - "name": "analog", - "name_footnote": "[^analog-mode]", - "notes": "\n[^analog-mode]: The [nxt-analog] driver will be loaded when\n this mode is set. You must manually specify the correct\n driver for your sensor using `set_device` if you want to use\n another driver. Any driver with a connection type of\n NXT/Analog is allowed.\n ^\n [nxt-analog]: /docs/sensors/generic-nxt-analog-sensor\n \n " - }, - { - "description": "NXT/I2C sensor", - "id": "HT_NXT_SMUX_PORT_MODE_I2C", - "name": "i2c", - "name_footnote": "[^i2c-mode]", - "notes": "\n[^i2c-mode]: If one of the supported sensors was detected\n by invoking the `DETECT` command on the [ht-nxt-smux]\n associated with this port, then the appropriate driver will\n be automatically loaded. Otherwise, you can use `set_device`\n to load the correct driver for your sensor. Any driver with\n a connection type of NXT/I2C is allowed.\n ^\n [ht-nxt-smux]: /docs/sensors/hitechnic-nxt-sensor-multiplexer\n \n " - } - ], - "module": "ht-nxt-smux", - "name": "ht-nxt-smux-port", - "notes": "\n[^address-prefix]: The full `address` is in the format:\n ^\n [:]mux\n ^\n For example, if we are looking at port 1 of this mux plugged into\n input port 2 on the EV3, the address will be `in2:i2c08:mux1`.\n \n ", - "num_modes": 2, - "prefix": "mux", - "prefix_footnote": "[^address-prefix]", - "source_file": "drivers/lego/sensors/ht_nxt_smux.c", - "source_line": 39, - "url_name": "ht-nxt-smux-port" - }, - { - "connection_types": "NXT/Analog, NXT/I2C, Other/I2C, EV3/Analog, EV3/UART, Other/UART", - "description": "EV3 Input Port", - "mode_info": [ - { - "description": "Automatically detect sensors.", - "id": "EV3_INPUT_PORT_MODE_AUTO", - "name": "auto", - "name_footnote": "[^auto-mode]", - "notes": "\n[^auto-mode]: In auto mode, the port will attempt to\n automatically detect the type of sensor that was connected\n and load the appropriate driver. See the list of [supported\n sensors] to determine if a sensor can be automatically\n detected.\n ^\n [supported sensors]: /docs/sensors/#supported-sensors\n \n " - }, - { - "description": "Load the [nxt-analog] device.", - "id": "EV3_INPUT_PORT_MODE_NXT_ANALOG", - "name": "nxt-analog", - "name_footnote": "[^nxt-analog-mode]", - "notes": "\n[^nxt-analog-mode]: This loads the [generic NXT/Analog sensor]\n [nxt-analog] driver. Use `set_device` to load the appropriate\n device/driver.\n ^\n [nxt-analog]: /docs/sensors/generic-nxt-analog-sensor\n \n " - }, - { - "description": "Load the [nxt-color-sensor] device.", - "id": "EV3_INPUT_PORT_MODE_NXT_COLOR", - "name": "nxt-color", - "name_footnote": "[^nxt-color-mode]", - "notes": "\n[^nxt-color-mode]: NXT Color sensor driver has not been\n implemented yet, so right now, this mode does nothing.\n \n " - }, - { - "description": "Configure for I2C communications and load the [nxt-i2c-host] device.", - "id": "EV3_INPUT_PORT_MODE_NXT_I2C", - "name": "nxt-i2c" - }, - { - "description": "Load the [ev3-analog] device.", - "id": "EV3_INPUT_PORT_MODE_EV3_ANALOG", - "name": "ev3-analog" - }, - { - "description": "Configure for UART communications and load the [ev3-uart-host] device.", - "id": "EV3_INPUT_PORT_MODE_EV3_UART", - "name": "ev3-uart" - }, - { - "description": "Configure for UART communications but do not load any device.", - "id": "EV3_INPUT_PORT_MODE_OTHER_UART", - "name": "other-uart" - }, - { - "description": "Provide access to low level drivers.", - "id": "EV3_INPUT_PORT_MODE_RAW", - "name": "raw", - "name_footnote": "[^raw-mode]", - "notes": "\n[^raw-mode]: Exports gpios and analog/digital converter values\n to sysfs so that they can be controlled directly.\n \n " - } - ], - "module": "legoev3-ports", - "name": "legoev3-input-port", - "num_modes": 8, - "prefix": "in", - "source_file": "drivers/lego/ev3/legoev3_ports_in.c", - "source_line": 291, - "url_name": "legoev3-input-port" - }, - { - "connection_types": "tacho-motor, dc-motor, led", - "description": "EV3 Output Port", - "mode_info": [ - { - "description": "Automatically detect motors when they are connected.", - "id": "EV3_OUTPUT_PORT_MODE_AUTO", - "name": "auto", - "name_footnote": "[^auto-mode]", - "notes": "\n[^auto-mode]: Only the EV3/NXT large motors and the EV3\n medium motor can be automatically detected. All other devices\n must be manually configured.\n \n " - }, - { - "description": "Load the [tacho-motor] device.", - "id": "EV3_OUTPUT_PORT_MODE_TACHO_MOTOR", - "name": "tacho-motor", - "name_footnote": "[^tacho-motor-mode]", - "notes": "\n[^tacho-motor-mode]: Configures the port to use the\n [tacho-motor] driver module. The default driver is the\n EV3 Large Motor (`lego-ev3-l-motor`). You can change\n the driver using the `set_device` attribute.\n ^\n [tacho-motor]: /docs/drivers/tacho-motor\n \n " - }, - { - "description": "Load the [dc-motor] device.", - "id": "EV3_OUTPUT_PORT_MODE_DC_MOTOR", - "name": "dc-motor", - "name_footnote": "[^dc-motor-mode]", - "notes": "\n[^dc-motor-mode]: This can be use with MINDSTORMS RCX\n motors, Power Functions motors and any other 'plain' DC\n motor. By 'plain', we mean the motor is just a motor without\n any feedback.\n ^\n [dc-motor]: /docs/drivers/dc-motor\n \n " - }, - { - "description": "Load the [led] device.", - "id": "EV3_OUTPUT_PORT_MODE_LED", - "name": "led", - "name_footnote": "[^led-mode]", - "notes": "\n[^led-mode]: This can be used with MINDSTORMS RCX LEDs,\n Power Functions LEDs or any other LED connected to pins 1\n and 2 of the output port.\n ^\n [led]: /docs/drivers/led\n \n " - }, - { - "description": "Provide access to low level drivers.", - "id": "EV3_OUTPUT_PORT_MODE_RAW", - "name": "raw", - "name_footnote": "[^raw-mode]", - "notes": "\n[^raw-mode]: Exports gpios, pwm and analog/digital converter\n values to sysfs so that they can be controlled directly.\n \n " - } - ], - "module": "legoev3-ports", - "name": "legoev3-output-port", - "num_modes": 5, - "prefix": "out", - "source_file": "drivers/lego/ev3/legoev3_ports_out.c", - "source_line": 110, - "url_name": "legoev3-output-port" - }, - { - "connection_types": "EV3/UART, EV3/Analog", - "description": "mindsensors.com EV3 Sensor Multiplexer Input Port", - "mode_info": [ - { - "description": "EV3/UART sensor", - "id": "MS_EV3_SMUX_MODE_UART", - "name": "uart", - "name_footnote": "[^uart-mode]", - "notes": "\n[^uart-mode]: UART sensor types are not automatically\n detected. By default, the `lego-ev3-color` driver\n will be loaded when this mode is set.\n Use `set_device` to load other sensor devices/drivers.\n \n Supported sensors are:\n \n | Sensor Name | Device/Driver Name |\n |---------------------|--------------------|\n | LEGO EV3 Color | `lego-ev3-color` |\n | LEGO EV3 Ultrasonic | `lego-ev3-us` |\n | LEGO EV3 GYRO | `lego-ev3-gyro` |\n | LEGO EV3 Infrared | `lego-ev3-ir` |\n \n " - }, - { - "description": "EV3/Analog sensor", - "id": "MS_EV3_SMUX_MODE_ANALOG", - "name": "analog", - "name_footnote": "[^analog-mode]", - "notes": "\n[^analog-mode]: Currently only the LEGO EV3 Touch sensor is\n supported. The `lego-ev3-touch` device/driver is loaded when\n this mode is set.\n \n " - } - ], - "module": "ms-ev3-smux", - "name": "ms-ev3-smux-port", - "notes": "\n[^address-prefix]: The full `address` is in the format:\n ^\n [:]mux\n ^\n For example, if we are looking at port 1 of this mux plugged into\n input port 2 on the EV3, the address will be `in2:i2c50:mux1`.\n \n ", - "num_modes": 2, - "prefix": "mux", - "prefix_footnote": "[^address-prefix]", - "source_file": "drivers/lego/sensors/ms_ev3_smux.c", - "source_line": 42, - "url_name": "ms-ev3-smux-port" - }, - { - "connection_types": "tacho-motor", - "description": "mindsensors.com NXTMMX Output Port", - "mode_info": [ - { - "description": "NXT/EV3 Large Motor", - "id": "MS_NXTMMX_OUT_PORT_MODE_TACHO_MOTOR", - "name": "tacho-motor" - } - ], - "module": "ms-nxtmmx", - "name": "ms-nxtmmx-out-port", - "notes": "\n[^prefix]: The full address will be something like `in2:i2c3:M1`\n depending on what port the motor multiplexer is plugged into.\n \n ", - "num_modes": 1, - "prefix": "M", - "prefix_footnote": "[^prefix]", - "source_file": "drivers/lego/sensors/ms_nxtmmx.c", - "source_line": 142, - "url_name": "ms-nxtmmx-out-port" - }, - { - "connection_types": "NXT/Analog, NXT/Color, NXT/I2C, Other/I2C, EV3/Analog, EV3/UART", - "description": "mindsensors.com PiStorms Input Port", - "mode_info": [ - { - "description": "No sensor", - "id": "PS_IN_PORT_MODE_NONE", - "name": "none" - }, - { - "description": "NXT/Analog sensor", - "id": "PS_IN_PORT_MODE_NXT_ANALOG", - "name": "nxt-analog", - "name_footnote": "[^nxt-analog-mode]", - "notes": "\n[^nxt-analog-mode]: The generic [nxt-analog] driver will be\n loaded when this mode is set. You must manually specify the\n correct driver for your sensor using `set_device` if you want\n to use another driver. Any driver with a connection type of\n NXT/Analog is allowed.\n ^\n [nxt-analog]: /docs/sensors/generic-nxt-analog-sensor\n \n " - }, - { - "description": "NXT/Color sensor", - "id": "PS_IN_PORT_MODE_NXT_COLOR", - "name": "nxt-color" - }, - { - "description": "I2C pass through", - "id": "PS_IN_PORT_MODE_I2C_THRU", - "name": "i2c-thru", - "name_footnote": "[^i2c-thru-mode]", - "notes": "\n[^i2c-thru-mode]: I2C signals are passed through the\n input port to `i2c_arm` on the Raspberry Pi. This means that\n all 4 input ports share the same I2C master and the devices\n must have different addresses even if they are connected to\n different ports on the PiStorms. Additionally, the LEGO NXT\n Ultrasonic sensor is not supported on the PiStorms.\n ^\n NXT/I2C sensors will be automatically detected, otherwise\n you must manually specify the sensor that is connected by\n using the `set_device` attribute.\n \n " - }, - { - "description": "EV3/Analog sensor", - "id": "PS_IN_PORT_MODE_EV3_ANALOG", - "name": "ev3-analog", - "name_footnote": "[^ev3-analog-mode]", - "notes": "\n[^ev3-analog-mode]: Only the LEGO EV3 Touch sensor is supported.\n The driver will load by default.\n \n " - }, - { - "description": "EV3/UART sensor", - "id": "PS_IN_PORT_MODE_EV3_UART", - "name": "ev3-uart", - "name_footnote": "[^ev3-uart-mode]", - "notes": "\n[^ev3-uart-mode]: Only the LEGO EV3 Ultrasonic, Color, Gyro,\n and Infrared sensors are supported. When this mode is set,\n a sensor device will be registered for the type of sensor\n that is attached (or was most recently attached).\n \n " - } - ], - "module": "pistorms-ports-in", - "name": "pistorms-in-port", - "notes": "\n[^address-prefix]: The full `address` is in the format:\n ^\n pistorms:B:\n ^\n For example, if we are looking at the port labeled \"BBS2\" on the\n PiStorms, the address will be `pistorms:BB:S2`.\n \n ", - "num_modes": 6, - "prefix": "S", - "prefix_footnote": "[^address-prefix]", - "source_file": "drivers/lego/pistorms/pistorms_ports_in.c", - "source_line": 134, - "url_name": "pistorms-in-port" - }, - { - "connection_types": "tacho-motor", - "description": "mindsensors.com PiStorms Output Port", - "mode_info": [ - { - "description": "NXT/EV3 Large Motor", - "id": "PISTORMS_OUT_PORT_MODE_TACHO_MOTOR", - "name": "tacho-motor" - } - ], - "module": "pistorms-ports-out", - "name": "pistorms-out-port", - "notes": "\n[^prefix]: The full address will be something like `pistorms:BAM1`.\n \n ", - "num_modes": 1, - "prefix": "M", - "prefix_footnote": "[^prefix]", - "source_file": "drivers/lego/pistorms/pistorms_ports_out.c", - "source_line": 31, - "url_name": "pistorms-out-port" - }, - { - "connection_types": "WeDo/Analog, dc-motor, led", - "description": "LEGO WeDo Port", - "mode_info": [ - { - "description": "The attached device is automatically detected.", - "id": "0", - "name": "auto" - } - ], - "module": "wedo", - "name": "wedo-port", - "notes": "\n[^address-prefix]: The full `address` is in the format:\n ^\n usb:wedo\n ^\n The USB path might be something like `1-1.3:1.0`. Read more about\n it [here](http://gajjarpremal.blogspot.in/2015/04/sysfs-structures-for-linux-usb.html).\n Run `lsusb -t` to help figure out the correct path for your WeDo hub.\n ^\n For example, this...\n ^\n /: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/4p, 480M\n |__ Port 4: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M\n |__ Port 2: Dev 6, If 0, Class=Human Interface Device, Driver=wedo, 1.5M\n ^\n ...translates to `usb5-4.2:1.0:wedo1`. You can see how `Bus 05`,\n `Port 4` and `Port 2` result in `5-4.2`. The last bit (configuration\n and interface) will always be `:1.0`.\n \n ", - "num_modes": 1, - "prefix": "wedo", - "prefix_footnote": "[^address-prefix]", - "source_file": "drivers/lego/wedo/wedo_port.c", - "source_line": 417, - "url_name": "wedo-port" - } -] diff --git a/_data/sensors.json b/_data/sensors.json deleted file mode 100644 index 1ebf0ff6a..000000000 --- a/_data/sensors.json +++ /dev/null @@ -1,3414 +0,0 @@ -[ - { - "id": "GENERIC_EV3_ANALOG_SENSOR", - "mode_info": [ - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S32", - "decimals": "3", - "description": "Raw analog value", - "id": "0", - "name": "ANALOG", - "raw_max": "5000", - "si_max": "5000", - "units": "V", - "units_description": "volts", - "value0": "Voltage (0 - 5000)" - } - ], - "name": "ev3-analog-XX", - "num_modes": "1", - "sensor_type": "ev3-analog-sensor", - "source_file": "drivers/lego/sensors/ev3_analog_sensor_defs.c", - "source_line": 46, - "url_name": "generic-ev3-analog-sensor", - "vendor_part_name": "Generic EV3 Analog Sensor" - }, - { - "analog_mode_info": [ - { - "id": "0", - "pin5_state": "LEGO_PORT_GPIO_LOW" - }, - { - "id": "1", - "pin5_state": "LEGO_PORT_GPIO_HIGH" - } - ], - "id": "GENERIC_NXT_ANALOG_SENSOR", - "mode_info": [ - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S32", - "decimals": "3", - "description": "Raw analog value", - "id": "0", - "name": "ANALOG-0", - "pct_max": "100", - "raw_max": "5000", - "si_max": "5000", - "units": "V", - "units_description": "volts", - "value0": "Voltage (0 - 5000)" - }, - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S32", - "decimals": "3", - "description": "Raw analog value
Pin 5 high", - "id": "1", - "name": "ANALOG-1", - "pct_max": "100", - "raw_max": "5000", - "si_max": "5000", - "units": "V", - "units_description": "volts", - "value0": "Voltage (0 - 5000)" - } - ], - "name": "nxt-analog", - "num_modes": "2", - "sensor_type": "nxt-analog-sensor", - "source_file": "drivers/lego/sensors/nxt_analog_sensor_defs.c", - "source_line": 117, - "url_name": "generic-nxt-analog-sensor", - "vendor_part_name": "Generic NXT Analog Sensor" - }, - { - "default_address": "0x01", - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0" - }, - { - "id": "1", - "read_data_reg": "0" - }, - { - "id": "2", - "read_data_reg": "0" - }, - { - "id": "3", - "read_data_reg": "0" - }, - { - "id": "4", - "read_data_reg": "0" - }, - { - "id": "5", - "read_data_reg": "0" - }, - { - "id": "6", - "read_data_reg": "0" - }, - { - "id": "7", - "read_data_reg": "0" - }, - { - "id": "8", - "read_data_reg": "0" - }, - { - "id": "9", - "read_data_reg": "0" - } - ], - "id": "PX_PIXY", - "mode_info": [ - { - "data_sets": "7", - "description": "All", - "id": "0", - "name": "ALL", - "notes": "\n[^angle]: Angle information is only available for color codes, otherwise the value is 0.\n \n ", - "value0": "Signature low byte", - "value1": "Signature high byte", - "value2": "X", - "value3": "Y", - "value4": "Width", - "value5": "Height", - "value6": "Angle", - "value6_footnote": "[^angle]" - }, - { - "data_sets": "5", - "description": "Signature #1", - "id": "1", - "name": "SIG1", - "value0": "Count", - "value1": "X", - "value2": "Y", - "value3": "Width", - "value4": "Height" - }, - { - "data_sets": "5", - "description": "Signature #2", - "id": "2", - "name": "SIG2", - "value0": "Count", - "value1": "X", - "value2": "Y", - "value3": "Width", - "value4": "Height" - }, - { - "data_sets": "5", - "description": "Signature #3", - "id": "3", - "name": "SIG3", - "value0": "Count", - "value1": "X", - "value2": "Y", - "value3": "Width", - "value4": "Height" - }, - { - "data_sets": "5", - "description": "Signature #4", - "id": "4", - "name": "SIG4", - "value0": "Count", - "value1": "X", - "value2": "Y", - "value3": "Width", - "value4": "Height" - }, - { - "data_sets": "5", - "description": "Signature #5", - "id": "5", - "name": "SIG5", - "value0": "Count", - "value1": "X", - "value2": "Y", - "value3": "Width", - "value4": "Height" - }, - { - "data_sets": "5", - "description": "Signature #6", - "id": "6", - "name": "SIG6", - "value0": "Count", - "value1": "X", - "value2": "Y", - "value3": "Width", - "value4": "Height" - }, - { - "data_sets": "5", - "description": "Signature #7", - "id": "7", - "name": "SIG7", - "value0": "Count", - "value1": "X", - "value2": "Y", - "value3": "Width", - "value4": "Height" - }, - { - "data_sets": "6", - "description": "Color code", - "id": "8", - "name": "COL-CODE", - "value0": "Count", - "value1": "X", - "value2": "Y", - "value3": "Width", - "value4": "Height", - "value5": "Angle" - }, - { - "data_sets": "1", - "description": "Angle", - "description_footnote": "[^angle]", - "id": "9", - "name": "ANGLE", - "value0": "Angle" - } - ], - "name": "pixy-lego", - "num_modes": "10", - "product_id": "Pixy", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "charmed-labs-pixy-cmucam5-for-lego", - "vendor_id": "Pixy", - "vendor_name": "Charmed Labs", - "vendor_part_name": "Pixy (CMUcam5) for LEGO", - "vendor_website": "http://charmedlabs.com/default/pixy-cmucam5-for-lego/" - }, - { - "id": "DI_DFLEX_SENSOR", - "mode_info": [ - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S32", - "description": "Flex", - "id": "0", - "name": "FLEX", - "raw_max": "4510", - "raw_min": "4150", - "si_max": "100", - "si_min": "0", - "value0": "Flex (0-100)", - "value0_footnote": "[^adjusted-value]" - } - ], - "name": "di-dflex", - "num_modes": "1", - "sensor_type": "nxt-analog-sensor", - "source_file": "drivers/lego/sensors/nxt_analog_sensor_defs.c", - "source_line": 117, - "url_name": "dexter-industries-dflex", - "vendor_name": "Dexter Industries", - "vendor_part_name": "dFlex", - "vendor_website": "http://www.dexterindustries.com/shop/dflex-lego-mindstorms-nxt-flexible-sensor-for-mindstorms/" - }, - { - "default_address": "0x01", - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0" - }, - { - "id": "1", - "read_data_reg": "0" - }, - { - "id": "2", - "read_data_reg": "0" - }, - { - "id": "3", - "read_data_reg": "0" - }, - { - "id": "4", - "read_data_reg": "0" - }, - { - "id": "5", - "read_data_reg": "0" - }, - { - "id": "6", - "read_data_reg": "0" - } - ], - "id": "HT_NXT_COLOR_SENSOR", - "mode_info": [ - { - "description": "Color", - "id": "0", - "name": "COLOR", - "notes": "\n[^color-value]: Color Values:
\n ![Color chart](http://www.hitechnic.com/contents/media/Color%20Number.jpg)\n \n ", - "raw_max": "17", - "si_max": "17", - "value0": "Color (0 to 17)", - "value0_footnote": "[^color-value]" - }, - { - "description": "Red component", - "id": "1", - "name": "RED", - "value0": "Reflected light intensity (0 to 255)" - }, - { - "description": "Green component", - "id": "2", - "name": "GREEN", - "value0": "Reflected light intensity (0 to 255)" - }, - { - "description": "Blue component", - "id": "3", - "name": "BLUE", - "value0": "Reflected light intensity (0 to 255)" - }, - { - "data_sets": "3", - "data_type": "LEGO_SENSOR_DATA_U16", - "description": "Raw values", - "id": "4", - "name": "RAW", - "raw_max": "USHRT_MAX", - "si_max": "USHRT_MAX", - "value0": "Red Component (0 to 255)", - "value1": "Green Component (0 to 255)", - "value2": "Blue Component (0 to 255)" - }, - { - "data_sets": "4", - "description": "Normalized values", - "id": "5", - "name": "NORM", - "value0": "Red Component (0 to 255)", - "value1": "Green Component (0 to 255)", - "value2": "Blue Component (0 to 255)", - "value3": "??? Component (0 to 255)" - }, - { - "data_sets": "4", - "description": "All values", - "id": "6", - "name": "ALL", - "value0": "Color (0 to 17)", - "value0_footnote": "[^color-value]", - "value1": "Red Component (0 to 255)", - "value2": "Green Component (0 to 255)", - "value3": "Blue Component (0 to 255)" - } - ], - "name": "ht-nxt-color", - "num_modes": "7", - "product_id": "Color", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "hitechnic-nxt-color-sensor", - "vendor_id": "HiTechnc", - "vendor_name": "HiTechnic", - "vendor_part_name": "NXT Color Sensor" - }, - { - "cmd_info": [ - { - "description": "Reset accumulated angle", - "id": "0", - "name": "RESET" - }, - { - "description": "Reset accumulated angle and save to EEPROM", - "id": "1", - "name": "CAL", - "name_footnote": "[^calibrate]", - "notes": "\n[^calibrate]: When Calibrating the sensor wait\n least 25ms before further reads from the sensor.\n That means disable polling by setting `poll_ms`\n to 0 before sending this command.\n \n " - } - ], - "default_address": "0x01", - "i2c_cmd_info": [ - { - "cmd_data": "0", - "cmd_reg": "0", - "id": "0" - }, - { - "cmd_data": "0", - "cmd_reg": "0", - "id": "1" - } - ], - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0" - }, - { - "id": "1", - "read_data_reg": "0" - }, - { - "id": "2", - "read_data_reg": "0" - } - ], - "id": "HT_NXT_ANGLE_SENSOR", - "mode_info": [ - { - "description": "Angle", - "id": "0", - "name": "ANGLE", - "raw_max": "180", - "si_max": "180", - "units": "deg", - "units_description": "degrees", - "value0": "Angle (0 to 180)" - }, - { - "data_type": "LEGO_SENSOR_DATA_S32", - "description": "Accumulated angle", - "figures": "9", - "id": "1", - "name": "ANGLE-ACC", - "raw_max": "INT_MAX", - "raw_min": "INT_MIN", - "si_max": "INT_MAX", - "si_min": "INT_MIN", - "units": "deg", - "units_description": "degrees", - "value0": "Angle (-2147483648 to 2147483647)" - }, - { - "data_type": "LEGO_SENSOR_DATA_S16", - "description": "Rotational speed", - "id": "2", - "name": "SPEED", - "raw_max": "SHRT_MAX", - "raw_min": "SHRT_MIN", - "si_max": "SHRT_MAX", - "si_min": "SHRT_MIN", - "units": "RPM", - "units_description": "revolutions per minute", - "value0": "Angle (-32768 to 32768)" - } - ], - "name": "ht-nxt-angle", - "num_commands": "2", - "num_modes": "3", - "product_id": "AnglSnsr", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "hitechnic-nxt-angle-sensor", - "vendor_id": "HITECHNC", - "vendor_name": "HiTechnic", - "vendor_part_name": "NXT Angle Sensor", - "vendor_part_number": "NAA1030", - "vendor_website": "http://www.hitechnic.com/cgi-bin/commerce.cgi?preadd=action&key=NAA1030" - }, - { - "default_address": "0x01", - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0" - }, - { - "id": "1", - "read_data_reg": "0" - } - ], - "id": "HT_NXT_ACCELERATION_TILT_SENSOR", - "mode_info": [ - { - "description": "Single-axis acceleration", - "id": "0", - "name": "ACCEL", - "notes": "\n[^mode-0-value]: Value is 8 most significant bits out of 10-bit total resolution.\n \n ", - "value0": "Acceleration (coarse value)", - "value0_footnote": "[^mode-0-value]" - }, - { - "data_sets": "6", - "description": "Three-axis acceleration", - "id": "1", - "name": "ALL", - "notes": "\n[^mode-1-value]: Only the 2 most significant bits are used.\n Actual value is `MSB << 2 + LSB >> 6` or `MSB << 2 + LSB & 0x03`\n (can someone confirm which one?).\n \n ", - "value0": "X-axis acceleration (most significant byte)", - "value1": "Y-axis acceleration (most significant byte)", - "value2": "Z-axis acceleration (most significant byte)", - "value3": "X-axis acceleration (least significant byte)", - "value3_footnote": "[^mode-1-value]", - "value4": "Y-axis acceleration (least significant byte)", - "value4_footnote": "[^mode-1-value]", - "value5": "Z-axis acceleration (least significant byte)", - "value5_footnote": "[^mode-1-value]" - } - ], - "name": "ht-nxt-accel", - "num_modes": "2", - "product_id": "Accel.", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "hitechnic-nxt-acceleration-tilt-sensor", - "vendor_id": "HITECHNC", - "vendor_name": "HiTechnic", - "vendor_part_name": "NXT Acceleration / Tilt Sensor", - "vendor_part_number": "NAC1040", - "vendor_website": "http://www.hitechnic.com/cgi-bin/commerce.cgi?preadd=action&key=NAC1040" - }, - { - "default_address": "0x01", - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0" - }, - { - "id": "1", - "read_data_reg": "0" - } - ], - "id": "HT_NXT_BAROMETRIC_SENSOR", - "mode_info": [ - { - "decimals": "1", - "description": "Barometric Pressure", - "id": "0", - "name": "PRESS", - "raw_max": "29400", - "raw_min": "30400", - "si_max": "3000", - "units": "m", - "units_description": "???", - "value0": "Absolute Pressure (0 to 3000)" - }, - { - "decimals": "1", - "description": "Temperature", - "id": "1", - "name": "TEMP", - "raw_max": "1000", - "si_max": "1000", - "units": "C", - "units_description": "degrees Celsius", - "value0": "Absolute Pressure (0 to 1000)" - } - ], - "name": "ht-nxt-barometric", - "num_modes": "2", - "product_id": "Barometr", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "hitechnic-nxt-barometric-sensor", - "vendor_id": "HiTechnc", - "vendor_name": "HiTechnic", - "vendor_part_name": "NXT Barometric Sensor", - "vendor_part_number": "NBR1036", - "vendor_website": "http://www.hitechnic.com/cgi-bin/commerce.cgi?preadd=action&key=NBR1036" - }, - { - "default_address": "0x01", - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0", - "set_mode_reg": "0" - }, - { - "id": "1", - "read_data_reg": "0", - "set_mode_reg": "0" - }, - { - "id": "2", - "read_data_reg": "0", - "set_mode_reg": "0" - }, - { - "id": "3", - "read_data_reg": "0", - "set_mode_reg": "0" - }, - { - "id": "4", - "read_data_reg": "0", - "set_mode_reg": "0" - }, - { - "id": "5", - "read_data_reg": "0", - "set_mode_reg": "0" - }, - { - "id": "6", - "read_data_reg": "0", - "set_mode_reg": "0" - }, - { - "id": "7", - "read_data_reg": "0", - "set_mode_data": "0", - "set_mode_reg": "0" - } - ], - "id": "HT_NXT_COLOR_SENSOR_V2", - "mode_info": [ - { - "description": "Color", - "id": "0", - "name": "COLOR", - "notes": "\n[^color-value]: Color Values:
\n ![Color chart](http://www.hitechnic.com/contents/media/Color%20Number.jpg)\n \n ", - "raw_max": "17", - "si_max": "17", - "value0": "Color (0 to 17)", - "value0_footnote": "[^color-value]" - }, - { - "description": "Red component", - "id": "1", - "name": "RED", - "value0": "Reflected light intensity (0 to 255)" - }, - { - "description": "Green component", - "id": "2", - "name": "GREEN", - "value0": "Reflected light intensity (0 to 255)" - }, - { - "description": "Blue component", - "id": "3", - "name": "BLUE", - "value0": "Reflected light intensity (0 to 255)" - }, - { - "description": "White component", - "id": "4", - "name": "WHITE", - "value0": "Reflected light intensity (0 to 255)" - }, - { - "data_sets": "4", - "description": "Normalized values", - "id": "5", - "name": "NORM", - "value0": "Red Component (0 to 255)", - "value1": "Green Component (0 to 255)", - "value2": "Blue Component (0 to 255)", - "value3": "White Component (0 to 255)" - }, - { - "data_sets": "5", - "description": "All values", - "id": "6", - "name": "ALL", - "value0": "Red Component (0 to 255)", - "value1": "Green Component (0 to 255)", - "value2": "Blue Component (0 to 255)", - "value3": "White Component (0 to 255)", - "value4": "??? (0 to 255)" - }, - { - "data_sets": "4", - "data_type": "LEGO_SENSOR_DATA_U16", - "description": "Raw values", - "id": "7", - "name": "RAW", - "raw_max": "USHRT_MAX", - "si_max": "USHRT_MAX", - "value0": "Red Component (0 to 255)", - "value1": "Green Component (0 to 255)", - "value2": "Blue Component (0 to 255)", - "value3": "White Component (0 to 255)" - } - ], - "name": "ht-nxt-color-v2", - "num_modes": "8", - "num_read_only_modes": "7", - "product_id": "ColorPD", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "hitechnic-nxt-color-sensor-v2", - "vendor_id": "HiTechnc", - "vendor_name": "HiTechnic", - "vendor_part_name": "NXT Color Sensor V2", - "vendor_part_number": "NCO1038", - "vendor_website": "http://www.hitechnic.com/cgi-bin/commerce.cgi?preadd=action&key=NCO1038" - }, - { - "analog_mode_info": [ - { - "id": "0", - "pin5_state": "LEGO_PORT_GPIO_HIGH" - }, - { - "id": "1", - "pin5_state": "LEGO_PORT_GPIO_LOW" - } - ], - "id": "HT_EOPD_SENSOR", - "mode_info": [ - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S32", - "description": "Proximity (long range)", - "id": "0", - "name": "LONG", - "notes": "\n[^adjusted-value]: This value is the square root of the\n raw value. You can derive a value proportional (linear)\n to distance by dividing a constant by this value,\n e.g. `35 / value0`.\n \n ", - "scale": "ht_eopd_sensor_scale", - "value0": "Proximity (0-100)", - "value0_footnote": "[^adjusted-value]" - }, - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S32", - "description": "Proximity (short range)", - "id": "1", - "name": "SHORT", - "scale": "ht_eopd_sensor_scale", - "value0": "Proximity (0-100)", - "value0_footnote": "[^adjusted-value]" - } - ], - "name": "ht-nxt-eopd", - "num_modes": "2", - "sensor_type": "nxt-analog-sensor", - "source_file": "drivers/lego/sensors/nxt_analog_sensor_defs.c", - "source_line": 117, - "url_name": "hitechnic-nxt-eopd", - "vendor_name": "HiTechnic", - "vendor_part_name": "NXT EOPD", - "vendor_part_number": "NEO1048", - "vendor_website": "http://www.hitechnic.com/cgi-bin/commerce.cgi?preadd=action&key=NEO1048" - }, - { - "id": "HT_FORCE_SENSOR", - "mode_info": [ - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S32", - "description": "Raw value (non-linear)", - "id": "0", - "name": "FORCE", - "pct_max": "100", - "raw_max": "5000", - "si_max": "1023", - "value0": "(0-1023)" - } - ], - "name": "ht-nxt-force", - "num_modes": "1", - "sensor_type": "nxt-analog-sensor", - "source_file": "drivers/lego/sensors/nxt_analog_sensor_defs.c", - "source_line": 117, - "url_name": "hitechnic-nxt-force-sensor", - "vendor_name": "HiTechnic", - "vendor_part_name": "NXT Force Sensor", - "vendor_part_number": "NFS1074", - "vendor_website": "http://www.hitechnic.com/cgi-bin/commerce.cgi?preadd=action&key=NFS1074" - }, - { - "id": "HT_GYRO_SENSOR", - "mode_info": [ - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S32", - "description": "Angular speed", - "id": "0", - "name": "GYRO", - "pct_max": "100", - "raw_max": "4880", - "si_max": "400", - "si_min": "-540", - "units": "d/s", - "units_description": "degrees per second", - "value0": "Angular speed (-540 to 400)" - } - ], - "name": "ht-nxt-gyro", - "num_modes": "1", - "sensor_type": "nxt-analog-sensor", - "source_file": "drivers/lego/sensors/nxt_analog_sensor_defs.c", - "source_line": 117, - "url_name": "hitechnic-nxt-gyro-sensor", - "vendor_name": "HiTechnic", - "vendor_part_name": "NXT Gyro Sensor", - "vendor_part_number": "NGY1044", - "vendor_website": "http://www.hitechnic.com/cgi-bin/commerce.cgi?preadd=action&key=NGY1044" - }, - { - "default_address": "0x01", - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0" - } - ], - "id": "HT_NXT_IR_LINK_SENSOR", - "mode_info": [ - { - "description": "???", - "id": "0", - "name": "IRLINK", - "value0": "???" - } - ], - "name": "ht-nxt-ir-link", - "num_modes": "1", - "product_id": "IRLink", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "hitechnic-nxt-irlink-sensor", - "vendor_id": "HiTechnc", - "vendor_name": "HiTechnic", - "vendor_part_name": "NXT IRLink Sensor", - "vendor_part_number": "NIL1046", - "vendor_website": "http://www.hitechnic.com/cgi-bin/commerce.cgi?preadd=action&key=NIL1046" - }, - { - "default_address": "0x01", - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0" - }, - { - "id": "1", - "read_data_reg": "0" - } - ], - "id": "HT_NXT_IR_RECEIVER_SENSOR", - "mode_info": [ - { - "data_type": "LEGO_SENSOR_DATA_S8", - "description": "Single Motor Control", - "id": "0", - "name": "1-MOTOR", - "notes": "\n[^values]: Value of -128 is brake. Speed values only occur in\n discrete steps (-100, -86, -72, -58, -44, -30, -16, 0, 16, 30,\n 44, 58, 72, 86 and 100).\n \n ", - "units": "pct", - "units_description": "percent", - "value0": "Motor 1A Speed (-128 and -100 to 100)", - "value0_footnote": "[^values],[^value-map]" - }, - { - "data_sets": "8", - "data_type": "LEGO_SENSOR_DATA_S8", - "description": "Eight Motor Controls", - "id": "1", - "name": "8-MOTOR", - "notes": "\n[^value-map]: In \"Motor NX\", the number is the channel,\n A is the red/left control and B is the blue/right control.\n \n ", - "units": "pct", - "units_description": "percent", - "value0": "Motor 1A Speed (-128 and -100 to 100)", - "value0_footnote": "[^values],[^value-map]", - "value1": "Motor 1B Speed (-128 and -100 to 100)", - "value1_footnote": "[^values],[^value-map]", - "value2": "Motor 2A Speed (-128 and -100 to 100)", - "value2_footnote": "[^values],[^value-map]", - "value3": "Motor 2B Speed (-128 and -100 to 100)", - "value3_footnote": "[^values],[^value-map]", - "value4": "Motor 3A Speed (-128 and -100 to 100)", - "value4_footnote": "[^values],[^value-map]", - "value5": "Motor 3B Speed (-128 and -100 to 100)", - "value5_footnote": "[^values],[^value-map]", - "value6": "Motor 4A Speed (-128 and -100 to 100)", - "value6_footnote": "[^values],[^value-map]", - "value7": "Motor 4B Speed (-128 and -100 to 100)", - "value7_footnote": "[^values],[^value-map]" - } - ], - "name": "ht-nxt-ir-receiver", - "num_modes": "2", - "product_id": "IRRecv", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "hitechnic-nxt-irreceiver-sensor", - "vendor_id": "HiTechnc", - "vendor_name": "HiTechnic", - "vendor_part_name": "NXT IRReceiver Sensor", - "vendor_part_number": "NIR1032", - "vendor_website": "http://www.hitechnic.com/cgi-bin/commerce.cgi?preadd=action&key=NIR1032" - }, - { - "default_address": "0x01", - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0" - } - ], - "id": "HT_NXT_PIR_SENSOR", - "mode_info": [ - { - "description": "IR Proximity", - "id": "0", - "name": "PROX", - "pct_min": "-100", - "si_max": "100", - "si_min": "-100", - "units": "pct", - "units_description": "percent", - "value0": "Proximity (-100 to 100)" - } - ], - "name": "ht-nxt-pir", - "num_modes": "1", - "product_id": "PIR", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "hitechnic-nxt-pir-sensor", - "vendor_id": "HITECHNC", - "vendor_name": "HiTechnic", - "vendor_part_name": "NXT PIR Sensor", - "vendor_part_number": "NIS1070", - "vendor_website": "http://www.hitechnic.com/cgi-bin/commerce.cgi?preadd=action&key=NIS1070" - }, - { - "default_address": "0x01", - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0" - } - ], - "id": "HT_NXT_COMPASS_SENSOR", - "mode_info": [ - { - "data_type": "LEGO_SENSOR_DATA_S8", - "description": "Compass Direction", - "id": "0", - "name": "COMPASS", - "raw_max": "180", - "si_max": "180", - "units": "deg", - "units_description": "degrees", - "value0": "Direction (-180 to 180)" - } - ], - "name": "ht-nxt-compass", - "num_modes": "1", - "product_id": "Compass", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "hitechnic-nxt-compass-sensor", - "vendor_id": "HITECHNC", - "vendor_name": "HiTechnic", - "vendor_part_name": "NXT Compass Sensor", - "vendor_part_number": "NMC1034", - "vendor_website": "http://www.hitechnic.com/cgi-bin/commerce.cgi?preadd=action&key=NMC1034" - }, - { - "id": "HT_MAGNETIC_SENSOR", - "mode_info": [ - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S32", - "description": "Magnetic field???", - "id": "0", - "name": "MAG", - "pct_max": "100", - "raw_max": "5000", - "si_max": "1023", - "value0": "???" - } - ], - "name": "ht-nxt-mag", - "num_modes": "1", - "sensor_type": "nxt-analog-sensor", - "source_file": "drivers/lego/sensors/nxt_analog_sensor_defs.c", - "source_line": 117, - "url_name": "hitechnic-nxt-magnetic-sensor", - "vendor_name": "HiTechnic", - "vendor_part_name": "NXT Magnetic Sensor", - "vendor_part_number": "NMS1035", - "vendor_website": "http://www.hitechnic.com/cgi-bin/commerce.cgi?preadd=action&key=NMS1035" - }, - { - "default_address": "0x08", - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0" - }, - { - "id": "1", - "read_data_reg": "0" - }, - { - "id": "2", - "read_data_reg": "0" - }, - { - "id": "3", - "read_data_reg": "0" - } - ], - "id": "HT_NXT_IR_SEEKER_SENSOR_V2", - "mode_info": [ - { - "description": "Direction (unmodulated)", - "id": "0", - "name": "DC", - "notes": "\n[^values]: Direction values:\n \n | Value | Description |\n |-------|-------------|\n | 0 | No signal |\n | 1 | Far left |\n | ... | |\n | 5 | Center |\n | ... | |\n | 9 | Far right |\n \n ", - "raw_max": "9", - "si_max": "9", - "value0": "Direction (0 to 9)", - "value0_footnote": "[^values]" - }, - { - "description": "Direction (modulated)", - "id": "1", - "name": "AC", - "raw_max": "9", - "si_max": "9", - "value0": "Direction (0 to 9)", - "value0_footnote": "[^values]" - }, - { - "data_sets": "7", - "description": "All values (unmodulated)", - "id": "2", - "name": "DC-ALL", - "value0": "Direction (0 to 9)", - "value0_footnote": "[^values]", - "value1": "Sensor 1 signal strength (0 to 9)", - "value1_footnote": "[^values]", - "value2": "Sensor 2 signal strength (0 to 9)", - "value2_footnote": "[^values]", - "value3": "Sensor 3 signal strength (0 to 9)", - "value3_footnote": "[^values]", - "value4": "Sensor 4 signal strength (0 to 9)", - "value4_footnote": "[^values]", - "value5": "Sensor 5 signal strength (0 to 9)", - "value5_footnote": "[^values]", - "value6": "Sensor mean (0 to 9)", - "value6_footnote": "[^values]" - }, - { - "data_sets": "6", - "description": "All values (modulated)", - "id": "3", - "name": "AC-ALL", - "value0": "Direction (0 to 9)", - "value0_footnote": "[^values]", - "value1": "Sensor 1 signal strength (0 to 9)", - "value1_footnote": "[^values]", - "value2": "Sensor 2 signal strength (0 to 9)", - "value2_footnote": "[^values]", - "value3": "Sensor 3 signal strength (0 to 9)", - "value3_footnote": "[^values]", - "value4": "Sensor 4 signal strength (0 to 9)", - "value4_footnote": "[^values]", - "value5": "Sensor 5 signal strength (0 to 9)", - "value5_footnote": "[^values]" - } - ], - "name": "ht-nxt-ir-seek-v2", - "num_modes": "4", - "product_id": "NewIRDir", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "hitechnic-nxt-irseeker-v2", - "vendor_id": "HiTechnc", - "vendor_name": "HiTechnic", - "vendor_part_name": "NXT IRSeeker V2", - "vendor_part_number": "NSK1042", - "vendor_website": "http://www.hitechnic.com/cgi-bin/commerce.cgi?preadd=action&key=NSK1042" - }, - { - "cmd_info": [ - { - "description": "Halt", - "id": "0", - "name": "HALT" - }, - { - "description": "Start auto-detection", - "id": "1", - "name": "DETECT", - "name_footnote": "[^auto-detect],[^auto-detect-sensors]", - "notes": "\n[^auto-detect]: The sensor mux must be halted before\n sending the detect command, otherwise it will result\n an error (-EPERM).\n \n \n[^auto-detect-sensors]: Only these sensors can be\n automatically detected:\n \n - LEGO NXT Ultrasonic\n - HiTechnic NXT Compass\n - HiTechnic NXT Color\n - HiTechnic NXT Acceleration / Tilt\n - HiTechnic NXT IR Seeker\n - HiTechnic Super Pro\n - HiTechnic NXT Color V2\n - HiTechnic NXT IR Seeker V2\n \n " - }, - { - "description": "Run", - "id": "2", - "name": "RUN" - } - ], - "default_address": "0x08", - "device_class_footnote": "[^more-devices]", - "i2c_cmd_info": [ - { - "cmd_data": "HT_NXT_SMUX_COMMAND_HALT", - "cmd_reg": "HT_NXT_SMUX_COMMAND_REG", - "id": "0" - }, - { - "cmd_data": "HT_NXT_SMUX_COMMAND_DETECT", - "cmd_reg": "HT_NXT_SMUX_COMMAND_REG", - "id": "1" - }, - { - "cmd_data": "HT_NXT_SMUX_COMMAND_RUN", - "cmd_reg": "HT_NXT_SMUX_COMMAND_REG", - "id": "2" - } - ], - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0", - "set_mode_data": "2", - "set_mode_reg": "0" - }, - { - "id": "1", - "read_data_reg": "0", - "set_mode_data": "1", - "set_mode_reg": "0" - }, - { - "id": "2", - "read_data_reg": "0", - "set_mode_data": "0", - "set_mode_reg": "0" - } - ], - "id": "HT_NXT_SENSOR_MUX", - "mode_info": [ - { - "data_sets": "2", - "description": "Status", - "id": "0", - "name": "MUX", - "notes": "\n[^state]: Run state:\n \n | Value | Description |\n |-------|-------------|\n | 0 | Halt |\n | 1 | Detect |\n | 2 | Run |\n \n \n[^status-bits]: Status bits:\n \n | Bit | Description |\n |-----|----------------|\n | 0 | Low/no battery |\n | 1 | Running |\n | 2 | Halted |\n | 3 | Error |\n \n ", - "value0": "Run state", - "value0_footnote": "[^state]", - "value1": "Status", - "value1_footnote": "[^status-bits]" - } - ], - "name": "ht-nxt-smux", - "notes": "\n[^more-devices]: The `ht-nxt-smux` driver loads more devices\n in addition to the [lego-sensor] class device. See\n [ht-nxt-smux-port] for more information.\n ^\n [ht-nxt-smux-port]: /docs/ports/ht-nxt-smux-port\n \n ", - "num_commands": "3", - "num_modes": "1", - "ops": [], - "product_id": "SensrMUX", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "hitechnic-nxt-sensor-multiplexer", - "vendor_id": "HiTechnc", - "vendor_name": "HiTechnic", - "vendor_part_name": "NXT Sensor Multiplexer", - "vendor_part_number": "NSX2020", - "vendor_website": "http://www.hitechnic.com/cgi-bin/commerce.cgi?preadd=action&key=NSX2020" - }, - { - "default_address": "0x08", - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0" - }, - { - "id": "1", - "read_data_reg": "0" - }, - { - "id": "2", - "read_data_reg": "0" - }, - { - "id": "3", - "read_data_reg": "0" - }, - { - "id": "4", - "read_data_reg": "0" - }, - { - "id": "5", - "read_data_reg": "0" - }, - { - "id": "6", - "read_data_reg": "0" - }, - { - "id": "7", - "read_data_reg": "0" - } - ], - "id": "HT_NXT_SUPER_PRO_SENSOR", - "mode_info": [ - { - "data_sets": "4", - "data_type": "LEGO_SENSOR_DATA_U16", - "description": "Analog inputs", - "id": "0", - "name": "AIN", - "value0": "Analog input A0 (0 to 1023)", - "value1": "Analog input A1 (0 to 1023)", - "value2": "Analog input A2 (0 to 1023)", - "value3": "Analog input A3 (0 to 1023)" - }, - { - "description": "Digital inputs", - "id": "1", - "name": "DIN", - "value0": "Bits B0-B7 (0 to 255)" - }, - { - "description": "Digital outputs", - "id": "2", - "name": "DOUT", - "value0": "Bits B0-B7 (0 to 255)" - }, - { - "description": "Digital input/output controls", - "id": "3", - "name": "DCTRL", - "value0": "Bits B0-B7 (0 to 255)" - }, - { - "description": "Strobe output", - "id": "4", - "name": "STROBE", - "value0": "Bits S0-S3 (0 to 15)" - }, - { - "description": "LED control", - "id": "5", - "name": "LED", - "notes": "\n[^led-states]: LED states:\n \n | Value | Description |\n |-------|--------------|\n | 0 | None |\n | 1 | Red |\n | 2 | Blue |\n | 3 | Red and blue |\n \n ", - "value0": "LED state", - "value0_footnote": "[^led-states]" - }, - { - "data_sets": "5", - "description": "Analog output O0", - "id": "6", - "name": "AOUT-0", - "value0": "Mode", - "value1": "Frequency, most significant byte", - "value2": "Frequency, least significant byte", - "value3": "Voltage, most significant byte", - "value4": "Voltage, least significant byte" - }, - { - "data_sets": "5", - "description": "Analog output O1", - "id": "7", - "name": "AOUT-1", - "value0": "Mode", - "value1": "Frequency, most significant byte", - "value2": "Frequency, least significant byte", - "value3": "Voltage, most significant byte", - "value4": "Voltage, least significant byte" - } - ], - "name": "ht-super-pro", - "num_modes": "5", - "pin1_state": "LEGO_PORT_GPIO_HIGH", - "product_id": "SuperPro", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "hitechnic-nxt-superpro-prototype-board", - "vendor_id": "HiTechnc", - "vendor_name": "HiTechnic", - "vendor_part_name": "NXT SuperPro Prototype Board", - "vendor_part_number": "SPR2010", - "vendor_website": "http://www.hitechnic.com/cgi-bin/commerce.cgi?preadd=action&key=SPR2010" - }, - { - "id": "LEGO_EV3_ULTRASONIC", - "mode_info": [ - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S16", - "decimals": "1", - "description": "Continuous measurement
LEDs: On, steady", - "id": "0", - "name": "US-DIST-CM", - "units": "cm", - "units_description": "centimeters", - "value0": "Distance (0-2550)" - }, - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S16", - "decimals": "1", - "description": "Continuous measurement
LEDs: On, steady", - "id": "1", - "name": "US-DIST-IN", - "units": "in", - "units_description": "inches", - "value0": "Distance (0-1003)" - }, - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S8", - "description": "Listen
LEDs: On, blinking", - "id": "2", - "name": "US-LISTEN", - "notes": "\n[^listen-value]: A value of `1` indicates that another ultrasonic\n sensor has been detected. A `1` can also be triggered by a loud\n noise such as clapping.\n \n ", - "value0": "Presence (0-1)", - "value0_footnote": "[^listen-value]" - }, - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S16", - "decimals": "1", - "description": "Single measurement
LEDs: On momentarily when mode is set, then off", - "id": "3", - "name": "US-SI-CM", - "notes": "\n[^single-measurement]: A measurement is taken when the mode is set\n and `value0` will not change after this. To take another measurement\n set the mode again. **NOTE:** If you write the mode too frequently\n (e.g. every 100msec), the sensor will sometimes lock up and writing\n to the `mode` attribute will return an error. A delay of 250msec\n between each write to the mode attribute seems sufficient to keep\n the sensor from locking up.\n \n ", - "units": "cm", - "units_description": "centimeters", - "value0": "Distance (0-2550)", - "value0_footnote": "[^single-measurement]" - }, - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S16", - "decimals": "1", - "description": "Single measurement
LEDs: On momentarily when mode is set, then off", - "id": "4", - "name": "US-SI-IN", - "units": "in", - "units_description": "inches", - "value0": "Distance (0-1003)", - "value0_footnote": "[^single-measurement]" - }, - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S16", - "decimals": "1", - "description": "???
LEDs: On, steady", - "id": "5", - "name": "US-DC-CM", - "name_footnote": "[^dc-mode]", - "notes": "\n[^dc-mode]: Not sure what DC mode stands for.\n Seems to work like the continuous measurement modes.\n \n ", - "units": "cm", - "units_description": "centimeters", - "value0": "Distance (0-2550)" - }, - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S16", - "decimals": "1", - "description": "???
LEDs: On, steady", - "id": "6", - "name": "US-DC-IN", - "name_footnote": "[^dc-mode]", - "units": "in", - "units_description": "inches", - "value0": "Distance (0-1003)" - } - ], - "name": "lego-ev3-us", - "num_modes": "7", - "num_view_modes": "3", - "sensor_type": "ev3-uart-sensor", - "source_file": "drivers/lego/sensors/ev3_uart_sensor_defs.c", - "source_line": 25, - "type_id": "LEGO_EV3_ULTRASONIC_TYPE_ID", - "url_name": "lego-ev3-ultrasonic-sensor", - "vendor_name": "LEGO", - "vendor_part_name": "EV3 Ultrasonic Sensor", - "vendor_part_number": "45504" - }, - { - "id": "LEGO_EV3_GYRO", - "mode_info": [ - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S16", - "description": "Angle", - "id": "0", - "name": "GYRO-ANG", - "name_footnote": "[^angle-reset]", - "notes": "\n[^angle-reset]: The angle in GYRO-ANG or GYRO-G&A modes can\n be reset by changing to a different mode and changing back.\n \n \n[^angle-overflow]: If you spin around too many times\n in GYRO-ANG or GYRO-G&A mode, it will get stuck at 32767.\n \n \n[^direction]: Clockwise is positive when looking at the side\n of the sensor with the arrows.\n \n ", - "units": "deg", - "units_description": "degrees", - "value0": "Angle (-32768 to 32767)", - "value0_footnote": "[^angle-overflow],[^direction]" - }, - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S16", - "description": "Rotational Speed", - "id": "1", - "name": "GYRO-RATE", - "name_footnote": "[^calibration]", - "notes": "\n[^calibration]: The sensor is calibrated when the\n GYRO-RATE or the GYRO-G&A mode is set. If the sensor is\n moving when setting the mode, the calibration will be off.\n \n ", - "units": "d/s", - "units_description": "degrees per second", - "value0": "Rotational Speed (-440 to 440)", - "value0_footnote": "[^direction]" - }, - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S16", - "description": "Raw sensor value ???", - "id": "2", - "name": "GYRO-FAS", - "value0": "??? (-1464 to 1535)", - "value0_footnote": "[^direction]" - }, - { - "data_sets": "2", - "data_type": "LEGO_SENSOR_DATA_S16", - "description": "Angle and Rotational Speed", - "id": "3", - "name": "GYRO-G&A", - "name_footnote": "[^angle-reset],[^calibration]", - "value0": "Angle (-32768 to 32767)", - "value0_footnote": "[^angle-overflow],[^direction]", - "value1": "Rotational Speed (-440 to 440)", - "value1_footnote": "[^direction]" - }, - { - "data_sets": "4", - "data_type": "LEGO_SENSOR_DATA_S16", - "description": "Calibration ???", - "id": "4", - "name": "GYRO-CAL", - "value0": "???", - "value1": "???", - "value2": "???", - "value3": "???" - } - ], - "name": "lego-ev3-gyro", - "num_modes": "5", - "num_view_modes": "3", - "sensor_type": "ev3-uart-sensor", - "source_file": "drivers/lego/sensors/ev3_uart_sensor_defs.c", - "source_line": 25, - "type_id": "LEGO_EV3_GYRO_TYPE_ID", - "url_name": "lego-ev3-gyro-sensor", - "vendor_name": "LEGO", - "vendor_part_name": "EV3 Gyro Sensor", - "vendor_part_number": "45505" - }, - { - "id": "LEGO_EV3_COLOR", - "mode_info": [ - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S8", - "description": "Reflected light
LED color: red", - "id": "0", - "name": "COL-REFLECT", - "units": "pct", - "units_description": "percent", - "value0": "Reflected light intensity (0 to 100)" - }, - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S8", - "description": "Ambient light
LED color: blue (dimly lit)", - "id": "1", - "name": "COL-AMBIENT", - "units": "pct", - "units_description": "percent", - "value0": "Ambient light intensity (0 to 100)" - }, - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S8", - "description": "Color
LED color: white (all LEDs rapidly cycling)", - "id": "2", - "name": "COL-COLOR", - "notes": "\n[^color-values]: Color values:\n \n | Value | Color |\n |-------|--------|\n | 0 | none |\n | 1 | black |\n | 2 | blue |\n | 3 | green |\n | 4 | yellow |\n | 5 | red |\n | 6 | white |\n | 7 | brown |\n \n ", - "units": "col", - "units_description": "color", - "value0": "Detected color (0 to 7)", - "value0_footnote": "[^color-values]" - }, - { - "data_sets": "2", - "data_type": "LEGO_SENSOR_DATA_S16", - "description": "Raw Reflected
LED color: red", - "id": "3", - "name": "REF-RAW", - "value0": "??? (0 to 1020???)", - "value1": "??? (0 to 1020???)" - }, - { - "data_sets": "3", - "data_type": "LEGO_SENSOR_DATA_S16", - "description": "Raw Color Components
LED color: white (all LEDs rapidly cycling)", - "id": "4", - "name": "RGB-RAW", - "units_description": "color", - "value0": "Red??? (0 to 1020???)", - "value1": "Green??? (0 to 1020???)", - "value2": "Blue??? (0 to 1020???)" - }, - { - "data_sets": "4", - "data_type": "LEGO_SENSOR_DATA_S32", - "description": "Calibration ???
LED color: red, flashing every 4 seconds, then goes continous", - "id": "5", - "name": "COL-CAL", - "name_footnote": "[^cal-mode]", - "notes": "\n[^cal-mode]: This mode is not usable. When in COL-CAL mode,\n the color sensor does not respond to the keep-alive sent from\n the EV3 brick. As a result, the sensor will time out and reset.\n \n ", - "value0": "???", - "value1": "???", - "value2": "???", - "value3": "???" - } - ], - "name": "lego-ev3-color", - "num_modes": "6", - "num_view_modes": "3", - "sensor_type": "ev3-uart-sensor", - "source_file": "drivers/lego/sensors/ev3_uart_sensor_defs.c", - "source_line": 25, - "type_id": "LEGO_EV3_COLOR_TYPE_ID", - "url_name": "lego-ev3-color-sensor", - "vendor_name": "LEGO", - "vendor_part_name": "EV3 Color Sensor", - "vendor_part_number": "45506" - }, - { - "id": "LEGO_EV3_TOUCH_SENSOR", - "mode_info": [ - { - "data_sets": "1", - "description": "Button state", - "id": "0", - "name": "TOUCH", - "notes": "\n[^mode0-value]: Values:\n \n | Value | Description |\n |:-----:|:-----------:|\n | `0` | Released |\n | `1` | Pressed |\n \n ", - "scale": "lego_ev3_touch_sensor_scale", - "value0": "State (0 or 1)", - "value0_footnote": "[^mode0-value]" - } - ], - "name": "lego-ev3-touch", - "num_modes": "1", - "sensor_type": "ev3-analog-sensor", - "source_file": "drivers/lego/sensors/ev3_analog_sensor_defs.c", - "source_line": 46, - "url_name": "lego-ev3-touch-sensor", - "vendor_name": "LEGO", - "vendor_part_name": "EV3 Touch Sensor", - "vendor_part_number": "45507" - }, - { - "id": "LEGO_EV3_INFRARED", - "mode_info": [ - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S8", - "description": "Proximity", - "id": "0", - "name": "IR-PROX", - "notes": "\n[^distance-value]: 100% is approximately 70cm/27in.\n \n ", - "units": "pct", - "units_description": "percent", - "value0": "Distance (0 to 100)", - "value0_footnote": "[^distance-value]" - }, - { - "data_sets": "8", - "data_type": "LEGO_SENSOR_DATA_S8", - "description": "IR Seeker", - "id": "1", - "name": "IR-SEEK", - "notes": "\n[^heading-value]: When looking in the same direction as the\n sensor, -25 is far left and +25 is far right.\n \n \n[^no-beacon]: The absence of a beacon on a channel can be\n detected when distance == -128 (and heading == 0).\n \n ", - "units": "pct", - "units_description": "percent", - "value0": "Channel 1 Heading (-25 to 25)", - "value0_footnote": "[^heading-value]", - "value1": "Channel 1 Distance (-128 and 0 to 100)", - "value1_footnote": "[^distance-value],[^no-beacon]", - "value2": "Channel 2 Heading (-25 to 25)", - "value2_footnote": "[^heading-value]", - "value3": "Channel 2 Distance (-128 and 0 to 100)", - "value3_footnote": "[^distance-value],[^no-beacon]", - "value4": "Channel 3 Heading (-25 to 25)", - "value4_footnote": "[^heading-value]", - "value5": "Channel 3 Distance (-128 and 0 to 100)", - "value5_footnote": "[^distance-value],[^no-beacon]", - "value6": "Channel 4 Heading (-25 to 25)", - "value6_footnote": "[^heading-value]", - "value7": "Channel 4 Distance (-128 and 0 to 100)", - "value7_footnote": "[^distance-value],[^no-beacon]" - }, - { - "data_sets": "4", - "data_type": "LEGO_SENSOR_DATA_S8", - "description": "IR Remote Control", - "id": "2", - "name": "IR-REMOTE", - "notes": "\n[^remote-mode-values]: Button values:\n \n | Value | Description |\n |-------|------------------------|\n | 0 | none |\n | 1 | red up |\n | 2 | red down |\n | 3 | blue up |\n | 4 | blue down |\n | 5 | red up and blue up |\n | 6 | red up and blue down |\n | 7 | red down and blue up |\n | 8 | red down and blue down |\n | 9 | beacon mode on |\n | 10 | red up and red down |\n | 11 | blue up and blue down |\n \n red == left and blue == right\n \n Pressing more that 2 buttons at one time is not supported.\n It will usually read 0. Pressing an up/down button while\n beacon mode is activated with turn off beacon mode.\n \n ", - "units": "btn", - "units_description": "button", - "value0": "Channel 1 (0 to 11)", - "value0_footnote": "[^remote-mode-values]", - "value1": "Channel 2 (0 to 11)", - "value1_footnote": "[^remote-mode-values]", - "value2": "Channel 3 (0 to 11)", - "value2_footnote": "[^remote-mode-values]", - "value3": "Channel 4 (0 to 11)", - "value3_footnote": "[^remote-mode-values]" - }, - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S16", - "description": "IR Remote Control", - "id": "3", - "name": "IR-REM-A", - "notes": "\n[^alt-remote-mode-values]: Button values:\n \n | Value | Blue Down | Blue Up | Red Down | Red Up |\n |:-------:|:---------:|:-------:|:--------:|:------:|\n | 262/384 | | | | |\n | 287 | | | | X |\n | 300 | | | X | |\n | 309 | | | X | X |\n | 330 | | X | | |\n | 339 | | X | | X |\n | 352 | | X | X | |\n | 377 | | X | X | X |\n | 390 | X | | | |\n | 415 | X | | | X |\n | 428 | X | | X | |\n | 437 | X | | X | X |\n | 458 | X | X | | |\n | 467 | X | X | | X |\n | 480 | X | X | X | |\n | 505 | X | X | X | X |\n \n X = button pressed\n \n The most significant byte is always 0x01. In the least\n significant byte, the 4 most significant bits represent\n each button. Bit 7 is the blue down button, bit 6 is the\n blue up button, bit 5 is the red down button, bit 4 is the\n red up button. Beware that when no buttons are pressed,\n bit 7 is set (value == 384). You can test that bits 0-3\n are all 0 to check this.\n \n
if ((value & 0x0F) == 0) {\n        // no buttons are pressed\n    } else {\n        if (value & 0x80)\n            // blue down button is pressed\n        if (value & 0x40)\n            // blue up button is pressed\n        if (value & 0x20)\n            // red down button is pressed\n        if (value & 0x10)\n            // red up button is pressed\n    }\n    
\n \n Bits 0-3 seem to be some sort of checksum or parity check.\n Bit 0 = bit 4, bit 1 = ~(bit 5), bit 2 = ~(bit 6),\n bit 3 = 0 if bits 0-2 are even or 1 if bits 0-2 are odd.\n \n Also, when the beacon mode is active or for about 1 second\n after any button is released the value is 262.\n \n This mode only works with the remote on channel 1.\n \n ", - "value0": "Channel 1", - "value0_footnote": "[^alt-remote-mode-values]" - }, - { - "data_sets": "4", - "data_type": "LEGO_SENSOR_DATA_S8", - "description": "Alternate IR Seeker ???", - "id": "4", - "name": "IR-S-ALT", - "name_footnote": "[^alt-seeker-mode]", - "notes": "\n[^alt-seeker-mode]: `IR-S-ALT` mode is not usable.\n When switching to this mode, the sensor quits responding\n to the keep-alive messages and the sensor resets.\n \n ", - "units": "pct", - "units_description": "percent", - "value0": "??? (0 to 100)", - "value1": "??? (0 to 100)", - "value2": "??? (0 to 100)", - "value3": "??? (0 to 100)" - }, - { - "data_sets": "2", - "data_type": "LEGO_SENSOR_DATA_S32", - "description": "Calibration ???", - "id": "5", - "name": "IR-CAL", - "value0": "??? (0 to 1023)", - "value1": "??? (0 to 1023)" - } - ], - "name": "lego-ev3-ir", - "num_modes": "6", - "num_view_modes": "3", - "sensor_type": "ev3-uart-sensor", - "source_file": "drivers/lego/sensors/ev3_uart_sensor_defs.c", - "source_line": 25, - "type_id": "LEGO_EV3_INFRARED_TYPE_ID", - "url_name": "lego-ev3-infrared-sensor", - "vendor_name": "LEGO", - "vendor_part_name": "EV3 Infrared Sensor", - "vendor_part_number": "45509" - }, - { - "cmd_info": [ - { - "description": "Turns off the outputs of the ports.", - "id": "WEDO_HUB_CMD_OUTPUT_OFF", - "name": "OUT-OFF" - }, - { - "description": "Turns on the outputs of the ports.", - "id": "WEDO_HUB_CMD_OUTPUT_ON", - "name": "OUT-ON" - }, - { - "description": "Clears error.", - "id": "WEDO_HUB_CMD_CLEAR_ERROR", - "name": "CLEAR-ERR" - } - ], - "id": "0", - "mode_info": [ - { - "data_sets": "2", - "data_type": "LEGO_SENSOR_DATA_U16", - "description": "Hub status", - "id": "WEDO_HUB_MODE_HUB", - "name": "HUB", - "notes": "\n[^status-bits]: Status Bits:\n \n | Bit | Description |\n |:---:|:-----------:|\n | 0 | Echo |\n | 1 | |\n | 2 | |\n | 3 | |\n | 4 | |\n | 5 | |\n | 6 | High Power |\n | 7 | Outputs Off |\n \n ", - "value0": "Status bits", - "value0_footnote": "[^status-bits]", - "value1": "Voltage (millivolts)" - } - ], - "module": "wedo", - "name": "wedo-hub", - "num_commands": "3", - "num_modes": "1", - "sensor_type": "wedo-hub-sensor", - "source_file": "drivers/lego/wedo/wedo_hub.c", - "source_line": 74, - "url_name": "lego-wedo-usb-hub", - "vendor_name": "LEGO", - "vendor_part_name": "WeDo USB Hub", - "vendor_part_number": "9581", - "vendor_website": "https://education.lego.com/en-us/lego-education-product-database/wedo/9581-lego-usb-hub" - }, - { - "id": "WEDO_MOTION_SENSOR", - "mode_info": [ - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_U8", - "description": "Proximity", - "id": "0", - "name": "PROX", - "raw_max": "219", - "raw_min": "71", - "si_max": "100", - "units": "pct", - "units_description": "percent", - "value0": "Proximity (0 - 100)" - }, - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_U8", - "description": "Raw analog value", - "id": "1", - "name": "RAW", - "value0": "Proximity (0 - 255)" - } - ], - "module": "wedo", - "name": "wedo-motion", - "num_modes": "2", - "sensor_type": "wedo-sensor", - "source_file": "drivers/lego/wedo/wedo_sensor.c", - "source_line": 122, - "url_name": "lego-wedo-motion-sensor", - "vendor_name": "LEGO", - "vendor_part_name": "WeDo Motion Sensor", - "vendor_part_number": "9583", - "vendor_website": "http://education.lego.com/en-us/lego-education-product-database/wedo/9583-motion-sensor" - }, - { - "id": "WEDO_TILT_SENSOR", - "mode_info": [ - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_U8", - "description": "Tilt status", - "id": "0", - "name": "TILT", - "notes": "\n[^tilt-values]: Tilt values:\n \n | Value | Description |\n |-------|-------------|\n | 0 | Level |\n | 1 | Front |\n | 2 | Back |\n | 3 | Left |\n | 4 | Right |\n | 5 | Unknown |\n \n ", - "scale": "wedo_tilt_scale", - "value0": "Tilt (0 to 5)", - "value0_footnote": "[^tilt-values]" - }, - { - "data_sets": "3", - "data_type": "LEGO_SENSOR_DATA_S8", - "description": "Tilt around 2 separate axes", - "id": "1", - "name": "TILT-AXIS", - "notes": "\n[^axis-values]: Axis values:\n \n | Value0 | Value1 | Value2 | Description |\n |--------|--------|--------|-------------|\n | 0 | 0 | 1 | Level |\n | 0 | 1 | 1 | Front |\n | 0 | -1 | 1 | Back |\n | -1 | 0 | 1 | Left |\n | 1 | 0 | 1 | Right |\n | 0 | 0 | 0 | Unknown |\n \n ", - "scale": "wedo_tilt_axis_scale", - "value0": "Tilt Left/Right (-1/0/1)", - "value0_footnote": "[^axis-values]", - "value1": "Tilt Back/Front (-1/0/1)", - "value1_footnote": "[^axis-values]", - "value2": "Tilt value valid (0/1)", - "value2_footnote": "[^axis-values]" - }, - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_U8", - "description": "Raw analog value", - "id": "2", - "name": "RAW", - "notes": "\n[^raw-values]: Raw values:\n \n | Value | Description |\n |-------|-------------|\n | 0 | Unknown |\n | < 48 | Back |\n | < 99 | Right |\n | < 153 | Level |\n | < 204 | Front |\n | < 255 | Left |\n \n ", - "value0": "Tilt (0 - 255)", - "value0_footnote": "[^raw-values]" - } - ], - "module": "wedo", - "name": "wedo-tilt", - "num_modes": "3", - "sensor_type": "wedo-sensor", - "source_file": "drivers/lego/wedo/wedo_sensor.c", - "source_line": 122, - "url_name": "lego-wedo-tilt-sensor", - "vendor_name": "LEGO", - "vendor_part_name": "WeDo Tilt Sensor", - "vendor_part_number": "9584", - "vendor_website": "http://education.lego.com/en-us/lego-education-product-database/wedo/9584-tilt-sensor" - }, - { - "default_address": "0x02", - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0" - }, - { - "id": "1", - "read_data_reg": "0" - }, - { - "id": "2", - "read_data_reg": "0" - }, - { - "id": "3", - "read_data_reg": "0" - }, - { - "id": "4", - "read_data_reg": "0" - }, - { - "id": "5", - "read_data_reg": "0" - }, - { - "id": "6", - "read_data_reg": "0" - }, - { - "id": "7", - "read_data_reg": "0" - } - ], - "id": "LEGO_POWER_STORAGE_SENSOR", - "mode_info": [ - { - "data_type": "LEGO_SENSOR_DATA_S16_BE", - "decimals": "3", - "description": "Input Voltage", - "id": "0", - "name": "IN-VOLT", - "raw_max": "10000", - "si_max": "10000", - "units": "V", - "units_description": "volts", - "value0": "Voltage (0 to 10000)" - }, - { - "data_type": "LEGO_SENSOR_DATA_S16_BE", - "decimals": "3", - "description": "Input Current", - "id": "1", - "name": "IN-AMP", - "raw_max": "10000", - "si_max": "10000", - "units": "A", - "units_description": "amps", - "value0": "Current (0 to 10000)" - }, - { - "data_type": "LEGO_SENSOR_DATA_S16_BE", - "decimals": "3", - "description": "Output Voltage", - "id": "2", - "name": "OUT-VOLT", - "raw_max": "10000", - "si_max": "10000", - "units": "V", - "units_description": "volts", - "value0": "Voltage (0 to 10000)" - }, - { - "data_type": "LEGO_SENSOR_DATA_S16_BE", - "decimals": "3", - "description": "Output Current", - "id": "3", - "name": "OUT-AMP", - "raw_max": "10000", - "si_max": "10000", - "units": "A", - "units_description": "amps", - "value0": "Current (0 to 10000)" - }, - { - "data_type": "LEGO_SENSOR_DATA_S16_BE", - "description": "Energy", - "id": "4", - "name": "JOULE", - "raw_max": "100", - "si_max": "100", - "units": "J", - "units_description": "Joules", - "value0": "Energy (0 to 100)" - }, - { - "data_type": "LEGO_SENSOR_DATA_S16_BE", - "decimals": "3", - "description": "Input Power", - "id": "5", - "name": "IN-WATT", - "raw_max": "10000", - "si_max": "10000", - "units": "W", - "units_description": "Watts", - "value0": "Power (0 to 10000)" - }, - { - "data_type": "LEGO_SENSOR_DATA_S16_BE", - "decimals": "3", - "description": "Output Power", - "id": "6", - "name": "OUT-WATT", - "raw_max": "10000", - "si_max": "10000", - "units": "W", - "units_description": "Watts", - "value0": "Power (0 to 10000)" - }, - { - "data_sets": "7", - "data_type": "LEGO_SENSOR_DATA_S16_BE", - "decimals": "3", - "description": "All", - "id": "7", - "name": "ALL", - "raw_max": "10000", - "si_max": "10000", - "value0": "Input Voltage (0 to 10000)", - "value1": "Input Current (0 to 10000)", - "value2": "Output Voltage (0 to 10000)", - "value3": "Output Current (0 to 10000)", - "value4": "Energy (0 to 100)", - "value5": "Input Power (0 to 10000)", - "value6": "Output Power (0 to 10000)" - } - ], - "name": "lego-power-storage", - "num_modes": "8", - "product_id": "", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "lego-energy-display", - "vendor_id": "LEGO", - "vendor_name": "LEGO", - "vendor_part_name": "Energy Display", - "vendor_part_number": "9668", - "vendor_website": "http://education.lego.com/en-us/lego-education-product-database/machines-and-mechanisms/9668-energy-display" - }, - { - "default_address": "0x4C", - "default_address_footnote": "[^addresses]", - "device_class": "[hwmon](http://www.lm-sensors.org/) [^usage]", - "id": "LEGO_NXT_TEMPERATURE_SENSOR", - "name": "tmp275", - "notes": "\n[^addresses]: Valid addresses are 0x48..0x4F (configurable via input pins)\n \n[^usage]: Sample usage:\n \n Register I2C device:\n \n
echo tmp275 0x4C > /sys/bus/i2c/devices/i2c-/new_device\n    
\n \n Finding device class node:\n \n
for chip in $(find /sys/class/hwmon -name hwmon*)\n    do\n        if [[ \"$(cat $chip/device/name)\" == \"tmp275\" ]]\n        then\n            # do whatever\n        fi\n    done\n    
\n \n ", - "sensor_type": "lm75", - "source_file": "drivers/lego/sensors/other_sensor_defs.c", - "source_line": 28, - "url_name": "lego-nxt-temperature-sensor", - "vendor_name": "LEGO", - "vendor_part_name": "NXT Temperature Sensor", - "vendor_part_number": "9749", - "vendor_website": "http://education.lego.com/en-us/lego-education-product-database/mindstorms/9749-nxt-temperature-sensor/" - }, - { - "id": "LEGO_NXT_TOUCH_SENSOR", - "mode_info": [ - { - "data_sets": "1", - "description": "Button state", - "id": "0", - "name": "TOUCH", - "notes": "\n[^mode0-value]: Values:\n \n | Value | Description |\n |:-----:|:-----------:|\n | `0` | Released |\n | `1` | Pressed |\n \n ", - "scale": "nxt_touch_sensor_scale", - "value0": "State (0 or 1)", - "value0_footnote": "[^mode0-value]" - } - ], - "name": "lego-nxt-touch", - "num_modes": "1", - "sensor_type": "nxt-analog-sensor", - "source_file": "drivers/lego/sensors/nxt_analog_sensor_defs.c", - "source_line": 117, - "url_name": "lego-nxt-touch-sensor", - "vendor_name": "LEGO", - "vendor_part_name": "NXT Touch Sensor", - "vendor_part_number": "9843", - "vendor_website": "http://www.lego.com/en-us/mindstorms/downloads/software/nxt-hdk/" - }, - { - "analog_mode_info": [ - { - "id": "0", - "pin5_state": "LEGO_PORT_GPIO_HIGH" - }, - { - "id": "1", - "pin5_state": "LEGO_PORT_GPIO_LOW" - } - ], - "id": "LEGO_NXT_LIGHT_SENSOR", - "mode_info": [ - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S32", - "decimals": "1", - "description": "Reflected light
LED on", - "id": "0", - "name": "REFLECT", - "pct_max": "100", - "raw_max": "543", - "raw_min": "4116", - "si_max": "1000", - "units": "pct", - "units_description": "percent", - "value0": "Reflected light intensity (0 to 1000)" - }, - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S32", - "decimals": "1", - "description": "Ambient light
LED off", - "id": "1", - "name": "AMBIENT", - "pct_max": "100", - "raw_max": "773", - "raw_min": "4164", - "si_max": "1000", - "units": "pct", - "units_description": "percent", - "value0": "Ambient light intensity (0 to 1000)" - } - ], - "name": "lego-nxt-light", - "num_modes": "2", - "sensor_type": "nxt-analog-sensor", - "source_file": "drivers/lego/sensors/nxt_analog_sensor_defs.c", - "source_line": 117, - "url_name": "lego-nxt-light-sensor", - "vendor_name": "LEGO", - "vendor_part_name": "NXT Light Sensor", - "vendor_part_number": "9844", - "vendor_website": "http://www.lego.com/en-us/mindstorms/downloads/software/nxt-hdk/" - }, - { - "analog_mode_info": [ - { - "id": "0", - "pin5_state": "LEGO_PORT_GPIO_LOW" - }, - { - "id": "1", - "pin5_state": "LEGO_PORT_GPIO_HIGH" - } - ], - "id": "LEGO_NXT_SOUND_SENSOR", - "mode_info": [ - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S32", - "decimals": "1", - "description": "Sound pressure level
Flat weighting", - "id": "0", - "name": "DB", - "pct_max": "100", - "raw_max": "5000", - "si_max": "1000", - "units": "pct", - "units_description": "percent", - "value0": "Sound pressure level (0 to 1000)" - }, - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S32", - "decimals": "1", - "description": "Sound pressure level
A weighting", - "id": "1", - "name": "DBA", - "pct_max": "100", - "raw_max": "5000", - "si_max": "1000", - "units": "pct", - "units_description": "percent", - "value0": "Sound pressure level (0 to 1000)" - } - ], - "name": "lego-nxt-sound", - "num_modes": "2", - "sensor_type": "nxt-analog-sensor", - "source_file": "drivers/lego/sensors/nxt_analog_sensor_defs.c", - "source_line": 117, - "url_name": "lego-nxt-sound-sensor", - "vendor_name": "LEGO", - "vendor_part_name": "NXT Sound Sensor", - "vendor_part_number": "9845", - "vendor_website": "http://www.lego.com/en-us/mindstorms/downloads/software/nxt-hdk/" - }, - { - "default_address": "0x01", - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0", - "set_mode_data": "0", - "set_mode_reg": "0" - }, - { - "id": "1", - "read_data_reg": "0", - "set_mode_data": "0", - "set_mode_reg": "0" - }, - { - "id": "2", - "read_data_reg": "0", - "set_mode_data": "0", - "set_mode_reg": "0" - }, - { - "id": "3", - "read_data_reg": "0", - "set_mode_data": "0", - "set_mode_reg": "0" - }, - { - "id": "4", - "read_data_reg": "0", - "set_mode_data": "0", - "set_mode_reg": "0" - } - ], - "id": "LEGO_NXT_ULTRASONIC_SENSOR", - "mode_info": [ - { - "description": "Continuous measurement", - "id": "0", - "name": "US-DIST-CM", - "units": "cm", - "units_description": "centimeters", - "value0": "Distance (0 to 255)" - }, - { - "decimals": "1", - "description": "Continuous measurement", - "id": "1", - "name": "US-DIST-IN", - "si_max": "1000", - "units": "in", - "units_description": "inches", - "value0": "Distance (0 to 1000)" - }, - { - "description": "Single measurement", - "id": "2", - "name": "US-SI-CM", - "notes": "\n[^single-measurement]: The value is read when the mode is set\n and does not change - even when polling is enabled. To read a\n new value, set the mode again (e.g. `echo US-SI-CM > mode`).\n \n ", - "units": "cm", - "units_description": "centimeters", - "value0": "Distance (0 to 255)", - "value0_footnote": "[^single-measurement]" - }, - { - "decimals": "1", - "description": "Single measurement", - "id": "3", - "name": "US-SI-IN", - "si_max": "1000", - "units": "in", - "units_description": "inches", - "value0": "Distance (0 to 1000)", - "value0_footnote": "[^single-measurement]" - }, - { - "description": "Listen", - "id": "4", - "name": "US-LISTEN", - "notes": "\n[^listen-value]: A value of `1` indicates that another ultrasonic\n sensor has been detected. A `1` can also be triggered by a loud\n noise such as clapping.\n \n ", - "raw_max": "1", - "si_max": "1", - "value0": "Presence (0 or 1)", - "value0_footnote": "[^listen-value]" - } - ], - "name": "lego-nxt-us", - "num_modes": "5", - "num_read_only_modes": "2", - "pin1_state": "LEGO_PORT_GPIO_HIGH", - "product_id": "Sonar", - "sensor_type": "nxt-i2c-sensor", - "slow": "true", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "lego-nxt-ultrasonic-sensor", - "vendor_id": "LEGO", - "vendor_name": "LEGO", - "vendor_part_name": "NXT Ultrasonic Sensor", - "vendor_part_number": "9846", - "vendor_website": "http://www.lego.com/en-us/mindstorms/downloads/software/nxt-hdk/" - }, - { - "cmd_info": [ - { - "description": "Reset device", - "id": "0", - "name": "RESET", - "name_footnote": "[^reset-description]", - "notes": "\n[^reset-description]: Recalculate bias drift, reset accumulated angle,\n set accelerometer scaling factor to 2G,\n this has to be done with sensor not moving\n and is strongly recommended to be called manually before work\n \n " - }, - { - "description": "Set accelerometer scaling to 2G", - "id": "1", - "name": "ACCEL-2G" - }, - { - "description": "Set accelerometer scaling to 4G", - "id": "2", - "name": "ACCEL-4G" - }, - { - "description": "Set accelerometer scaling to 8G", - "id": "3", - "name": "ACCEL-8G" - } - ], - "default_address": "0x01", - "i2c_cmd_info": [ - { - "cmd_reg": "0", - "id": "0" - }, - { - "cmd_reg": "0", - "id": "1" - }, - { - "cmd_reg": "0", - "id": "2" - }, - { - "cmd_reg": "0", - "id": "3" - } - ], - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0" - }, - { - "id": "1", - "read_data_reg": "0" - }, - { - "id": "2", - "read_data_reg": "0" - }, - { - "id": "3", - "read_data_reg": "0" - } - ], - "id": "MI_CRUIZCORE_XG1300L", - "mode_info": [ - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S16", - "decimals": "2", - "description": "Angle", - "id": "0", - "name": "ANGLE", - "units": "deg", - "units_description": "degrees", - "value0": "Z-axis angle (-18000 to 18000)" - }, - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S16", - "decimals": "2", - "description": "Rotational speed", - "id": "1", - "name": "SPEED", - "units": "d/s", - "units_description": "degrees per second", - "value0": "Z-axis rotational speed" - }, - { - "data_sets": "3", - "data_type": "LEGO_SENSOR_DATA_S16", - "decimals": "3", - "description": "Acceleration in X, Y, Z axis", - "id": "2", - "name": "ACCEL", - "notes": "\n[^gravity-units]: 1 g ~ 9.81\u00a0m/s2\n \n ", - "scale": "mi_xg1300l_scale", - "units": "g", - "units_description": "Standard gravity", - "units_footnote": "[^gravity-units]", - "value0": "Acceleration in X axis", - "value1": "Acceleration in Y axis", - "value2": "Acceleration in Z axis" - }, - { - "data_sets": "5", - "data_type": "LEGO_SENSOR_DATA_S16", - "description": "All values", - "id": "3", - "name": "ALL", - "notes": "\n[^mode3-angle]: Two decimal places\n \n[^mode3-speed]: Two decimal places\n \n[^mode3-accel]: Three decimal places,\n range as was set by last command\n \n ", - "scale": "mi_xg1300l_scale", - "value0": "Z-axis angle (-18000 to 18000)", - "value0_footnote": "[^mode3-angle]", - "value1": "Z-axis rotational speed", - "value1_footnote": "[^mode3-speed]", - "value2": "X-axis acceleration", - "value2_footnote": "[^mode3-accel]", - "value3": "Y-axis acceleration", - "value3_footnote": "[^mode3-accel]", - "value4": "Z-axis acceleration", - "value4_footnote": "[^mode3-accel]" - } - ], - "name": "mi-xg1300l", - "notes": "\n[^ids]: CruizCore XG1300L doesn't follow LEGO guidelines by\n returning vendor, product and firmware version values. As a\n result, this sensor can't be automatically detected. Until\n we find another way to identify the sensor, the driver has to\n be loaded manually.\n \n Register I2C device:\n
\n    echo mi-xg1300l 0x01 > /sys/bus/i2c/devices/i2c-/new_device\n    
\n \n ", - "num_commands": "4", - "num_modes": "4", - "num_read_only_modes": "4", - "ops": [], - "product_id": "XG1300L", - "product_id_footnote": "[^ids]", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "microinfinity-digital-gyroscope-and-accelerometer", - "vendor_id": "mnfinity", - "vendor_id_footnote": "[^ids]", - "vendor_name": "Microinfinity", - "vendor_part_name": "Digital Gyroscope And Accelerometer", - "vendor_part_number": "CruizCore XG 1300L", - "vendor_website": "http://www.minfinity.com/eng/page.php?Main=1&sub=1&tab=5" - }, - { - "cmd_info": [ - { - "description": "Begin compass calibration", - "id": "0", - "name": "BEGIN-COMP-CAL" - }, - { - "description": "End compass calibration", - "id": "1", - "name": "END-COMP-CAL" - }, - { - "description": "Change accelerometer sensitivity to 2G and gyro sensitivity to 250 deg/sec", - "id": "2", - "name": "ACCEL-2G", - "name_footnote": "[^accel-commands]", - "notes": "\n[^accel-commands]: Wait 50 msec after sending command for sensor to reconfigure itself.\n \n " - }, - { - "description": "Change accelerometer sensitivity to 4G and gyro sensitivity to 500 deg/sec", - "id": "3", - "name": "ACCEL-4G", - "name_footnote": "[^accel-commands]" - }, - { - "description": "Change accelerometer sensitivity to 8G and gyro sensitivity to 2000 deg/sec", - "id": "4", - "name": "ACCEL-8G", - "name_footnote": "[^accel-commands]" - }, - { - "description": "Change accelerometer sensitivity to 16G and gyro sensitivity to 2000 deg/sec", - "id": "5", - "name": "ACCEL-16G", - "name_footnote": "[^accel-commands]" - } - ], - "default_address": "0x11", - "default_address_footnote": "[^address]", - "i2c_cmd_info": [ - { - "cmd_data": "'C'", - "cmd_reg": "0", - "id": "0" - }, - { - "cmd_data": "'c'", - "cmd_reg": "0", - "id": "1" - }, - { - "cmd_data": "'1'", - "cmd_reg": "0", - "id": "2" - }, - { - "cmd_data": "'2'", - "cmd_reg": "0", - "id": "3" - }, - { - "cmd_data": "'3'", - "cmd_reg": "0", - "id": "4" - }, - { - "cmd_data": "'4'", - "cmd_reg": "0", - "id": "5" - } - ], - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0" - }, - { - "id": "1", - "read_data_reg": "0" - }, - { - "id": "2", - "read_data_reg": "0" - }, - { - "id": "3", - "read_data_reg": "0" - }, - { - "id": "4", - "read_data_reg": "0" - }, - { - "id": "5", - "read_data_reg": "0" - } - ], - "id": "MS_ABSOLUTE_IMU", - "mode_info": [ - { - "data_sets": "3", - "data_type": "LEGO_SENSOR_DATA_U8", - "description": "Tilt", - "id": "0", - "name": "TILT", - "scale": "ms_imu_scale", - "units": "deg", - "units_description": "degrees", - "value0": "X-axis angle (0 to 180)", - "value1": "Y-axis angle (0 to 180)", - "value2": "Z-axis angle (0 to 180)" - }, - { - "data_sets": "3", - "data_type": "LEGO_SENSOR_DATA_S16", - "decimals": "3", - "description": "Acceleration", - "id": "1", - "name": "ACCEL", - "name_footnote": "[^accel]", - "notes": "\n[^accel]: Only returns data from models with an accelerometer\n (AbsoluteIMU-AC/AbsoluteIMU-A).\n \n[^gravity-units]: 1 g = 9.81 m/s2\n \n ", - "units": "g", - "units_description": "Standard gravity", - "value0": "X-axis acceleration", - "value1": "Y-axis acceleration", - "value2": "Z-axis acceleration" - }, - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_U16", - "description": "Compass", - "id": "2", - "name": "COMPASS", - "name_footnote": "[^compass]", - "notes": "\n[^compass]: Only returns data from models with a compass\n (AbsoluteIMU-C/AbsoluteIMU-AC/AbsoluteIMU-ACG).\n \n ", - "units": "deg", - "units_description": "degrees", - "value0": "Heading (0 to 360)" - }, - { - "data_sets": "3", - "data_type": "LEGO_SENSOR_DATA_S16", - "description": "Magnetic field", - "id": "3", - "name": "MAG", - "name_footnote": "[^compass]", - "value0": "X-axis magnetic field", - "value1": "Y-axis magnetic field", - "value2": "Z-axis magnetic field" - }, - { - "data_sets": "3", - "data_type": "LEGO_SENSOR_DATA_S16", - "decimals": "1", - "description": "Gyro", - "id": "4", - "name": "GYRO", - "name_footnote": "[^gyro]", - "notes": "\n[^gyro]: Only returns data from models with a gyro\n (AbsoluteIMU-ACG).\n \n ", - "raw_max": "10000", - "si_max": "875", - "units": "d/s", - "units_description": "degrees per second", - "value0": "X-axis rotational speed", - "value1": "Y-axis rotational speed", - "value2": "Z-axis rotational speed" - }, - { - "data_sets": "23", - "description": "All data", - "id": "5", - "name": "ALL", - "name_footnote": "[^all]", - "notes": "\n[^all]: Reads all data from the sensor. Use `bin_data`\n attribute to read values. Some values will not be scaled.\n See manufacturer docs for more info.\n \n " - } - ], - "name": "ms-absolute-imu", - "notes": "\n[^address]: The address is programmable. See manufacturer\n documentation for more information.\n \n ", - "num_commands": "6", - "num_modes": "6", - "ops": [], - "product_id": "AbsIMU", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "mindsensors.com-gyro-multisensitivity-accelerometer-and-compass", - "vendor_id": "mndsnsrs", - "vendor_name": "mindsensors.com", - "vendor_part_name": "Gyro, MultiSensitivity Accelerometer and Compass", - "vendor_part_number": "AbsoluteIMU(-A/C/G)", - "vendor_website": "http://www.mindsensors.com/ev3-and-nxt/15-gyro-multisensitivity-accelerometer-and-compass-for-nxt-or-ev3" - }, - { - "cmd_info": [ - { - "description": "Reset angle values", - "id": "0", - "name": "RESET" - } - ], - "default_address": "0x18", - "i2c_cmd_info": [ - { - "cmd_data": "'r'", - "cmd_reg": "0", - "id": "0" - } - ], - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0" - }, - { - "id": "1", - "read_data_reg": "0" - }, - { - "id": "2", - "read_data_reg": "0" - }, - { - "id": "3", - "read_data_reg": "0" - } - ], - "id": "MS_ANGLE_SENSOR", - "mode_info": [ - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S32", - "description": "Angle", - "id": "0", - "name": "ANGLE", - "units": "deg", - "units_description": "degrees", - "value0": "Angle" - }, - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S32", - "decimals": "1", - "description": "High-precision angle", - "id": "1", - "name": "ANGLE2", - "raw_max": "360", - "si_max": "1800", - "units": "deg", - "units_description": "degrees", - "value0": "Angle" - }, - { - "data_sets": "1", - "data_type": "LEGO_SENSOR_DATA_S16", - "description": "Rotational Speed", - "id": "2", - "name": "SPEED", - "raw_max": "100", - "si_max": "100", - "units": "rpm", - "units_description": "revolutions per minute", - "value0": "Rotational Speed (-4000 to 4000)" - }, - { - "data_sets": "3", - "data_type": "LEGO_SENSOR_DATA_S32", - "description": "All values", - "id": "3", - "name": "ALL", - "notes": "\n[^mode3-value1]: Angle value times 2\n (i.e. value of 10 = angle of 5 degrees).\n Allows for 0.5 degree precision.\n \n[^mode3-value2]: Value needs to be converted to\n 16-bit signed integer. Example:\n `if (value2 > 32767) value2 = value2 - 65536`\n \n ", - "raw_max": "100", - "si_max": "100", - "value0": "Angle", - "value1": "Angle x2", - "value1_footnote": "[^mode3-value1]", - "value2": "Rotational Speed", - "value2_footnote": "[^mode3-value2]" - } - ], - "name": "ms-angle", - "num_commands": "1", - "num_modes": "4", - "product_id": "AngSens", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "mindsensors.com-glidewheel-as", - "vendor_id": "mndsnsrs", - "vendor_name": "mindsensors.com", - "vendor_part_name": "GlideWheel-AS", - "vendor_part_number": "AngleSensor", - "vendor_website": "http://www.mindsensors.com/ev3-and-nxt/17-glidewheel-as-angle-sensor-for-nxt-or-ev3" - }, - { - "default_address": "0x50, 0x51, 0x52", - "default_address_footnote": "[^addresses]", - "device_class_footnote": "[^port-and-sensor-devices]", - "i2c_mode_info": [ - { - "id": "0" - } - ], - "id": "MS_EV3_SENSOR_MUX", - "mode_info": [ - { - "data_sets": "0", - "description": "EV3 Sensor Multiplexer", - "id": "0", - "name": "MUX", - "name_footnote": "[^mode]", - "notes": "\n[^mode]: This mode does not do anything useful.\n \n " - } - ], - "name": "ms-ev3-smux", - "notes": "\n[^addresses]: This sensor appears as three separate sensors,\n one for each channel on the sensor mux.\n \n[^port-and-sensor-devices]: In addition to loading three\n [lego-sensor] devices for the sensor mux itself, three\n [lego-port] devices are added as well. These [ms-ev3-smux-port]\n devices must be used to manually specify the type of sensor\n that is attached to each port.\n ^\n [lego-port]: /docs/drivers/lego-port-class\n [ms-ev3-smux-port]: /docs/ports/ms-ev3-smux-port\n \n ", - "num_modes": "2", - "num_read_only_modes": "1", - "ops": [], - "product_id": "Ev3SMux", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "mindsensors.com-ev3-sensor-multiplexer", - "vendor_id": "mndsnsrs", - "vendor_name": "mindsensors.com", - "vendor_part_name": "EV3 Sensor Multiplexer", - "vendor_part_number": "EV3SensorMUX", - "vendor_website": "http://www.mindsensors.com/ev3-and-nxt/23-ev3-sensor-multiplexer-for-ev3-or-nxt" - }, - { - "cmd_info": [ - { - "description": "Calibrate white", - "id": "0", - "name": "CAL-WHITE" - }, - { - "description": "Calibrate black", - "id": "1", - "name": "CAL-BLACK" - }, - { - "description": "Put sensor to sleep", - "id": "2", - "name": "SLEEP", - "name_footnote": "[^sleep]", - "notes": "\n[^sleep]: `poll_ms` must be set to `0` in order for sensor to sleep.\n \n " - }, - { - "description": "Wake up the sensor", - "id": "3", - "name": "WAKE", - "name_footnote": "[^wake]", - "notes": "\n[^wake]: Will return an error (-ENXIO) if sensor is actually asleep.\n Completes successfully if sensor is already awake.\n \n " - }, - { - "description": "Configures sensor for 60Hz electrical mains", - "id": "4", - "name": "60HZ" - }, - { - "description": "Configures sensor for 50Hz electrical mains", - "id": "5", - "name": "50HZ" - }, - { - "description": "Configures sensor for any (50/60Hz) electrical mains", - "id": "6", - "name": "UNIVERSAL" - } - ], - "default_address": "0x0A", - "default_address_footnote": "[^address]", - "i2c_cmd_info": [ - { - "cmd_data": "'W'", - "cmd_reg": "0", - "id": "0" - }, - { - "cmd_data": "'B'", - "cmd_reg": "0", - "id": "1" - }, - { - "cmd_data": "'D'", - "cmd_reg": "0", - "id": "2" - }, - { - "cmd_data": "'P'", - "cmd_reg": "0", - "id": "3" - }, - { - "cmd_data": "'A'", - "cmd_reg": "0", - "id": "4" - }, - { - "cmd_data": "'E'", - "cmd_reg": "0", - "id": "5" - }, - { - "cmd_data": "'U'", - "cmd_reg": "0", - "id": "6" - } - ], - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0" - }, - { - "id": "1", - "read_data_reg": "0" - } - ], - "id": "MS_LIGHT_SENSOR_ARRAY", - "mode_info": [ - { - "data_sets": "8", - "description": "Calibrated values", - "id": "0", - "name": "CAL", - "raw_max": "100", - "si_max": "100", - "units": "pct", - "units_description": "percent", - "value0": "LED 0 (0 to 100)", - "value1": "LED 1 (0 to 100)", - "value2": "LED 2 (0 to 100)", - "value3": "LED 3 (0 to 100)", - "value4": "LED 4 (0 to 100)", - "value5": "LED 5 (0 to 100)", - "value6": "LED 6 (0 to 100)", - "value7": "LED 7 (0 to 100)" - }, - { - "data_sets": "8", - "data_type": "LEGO_SENSOR_DATA_S16", - "description": "Uncalibrated values", - "id": "1", - "name": "RAW", - "raw_max": "USHRT_MAX", - "si_max": "USHRT_MAX", - "value0": "LED 0 (0 to ???)", - "value1": "LED 1 (0 to ???)", - "value2": "LED 2 (0 to ???)", - "value3": "LED 3 (0 to ???)", - "value4": "LED 4 (0 to ???)", - "value5": "LED 5 (0 to ???)", - "value6": "LED 6 (0 to ???)", - "value7": "LED 7 (0 to ???)" - } - ], - "name": "ms-light-array", - "notes": "\n[^address]: The address is programmable. See manufacturer\n documentation for more information.\n \n ", - "num_commands": "7", - "num_modes": "2", - "product_id": "LSArray", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "mindsensors.com-light-sensor-array", - "vendor_id": "mndsnsrs", - "vendor_name": "mindsensors.com", - "vendor_part_name": "Light Sensor Array", - "vendor_part_number": "LightSensorArray", - "vendor_website": "http://www.mindsensors.com/ev3-and-nxt/47-light-sensor-array-for-nxt-or-ev3" - }, - { - "cmd_info": [ - { - "description": "Calibrate white", - "id": "0", - "name": "CAL-WHITE" - }, - { - "description": "Calibrate black", - "id": "1", - "name": "CAL-BLACK" - }, - { - "description": "Put sensor to sleep", - "id": "2", - "name": "SLEEP", - "name_footnote": "[^sleep]", - "notes": "\n[^sleep]: `poll_ms` must be set to `0` in order for sensor to sleep.\n \n " - }, - { - "description": "Wake up the sensor", - "id": "3", - "name": "WAKE", - "name_footnote": "[^wake]", - "notes": "\n[^wake]: Will return an error (-ENXIO) if sensor is actually asleep.\n Completes successfully if sensor is already awake.\n \n " - }, - { - "description": "Color inversion (White line on a black background)", - "id": "4", - "name": "INV-COL" - }, - { - "description": "Reset Color inversion (black line on a white background).", - "id": "5", - "name": "RST-COL" - }, - { - "description": "Take a snapshot.", - "id": "6", - "name": "SNAP", - "name_footnote": "[^snapshot-command]", - "notes": "\n[^snapshot-command]: The \"SNAP\" command looks at the line\n under the sensor and stores the width and position of the\n line in sensor\u2019s memory. Subsequently, sensor will use\n these characteristics of line to track it. This command\n inverts the colors if it sees a white line on black background.\n (PID parameters are not affected).\n \n " - }, - { - "description": "Configures sensor for 60Hz electrical mains", - "id": "7", - "name": "60HZ" - }, - { - "description": "Configures sensor for 50Hz electrical mains", - "id": "8", - "name": "50HZ" - }, - { - "description": "Configures sensor for any (50/60Hz) electrical mains", - "id": "9", - "name": "UNIVERSAL" - } - ], - "default_address": "0x01", - "default_address_footnote": "[^address]", - "i2c_cmd_info": [ - { - "cmd_data": "'W'", - "cmd_reg": "0", - "id": "0" - }, - { - "cmd_data": "'B'", - "cmd_reg": "0", - "id": "1" - }, - { - "cmd_data": "'D'", - "cmd_reg": "0", - "id": "2" - }, - { - "cmd_data": "'P'", - "cmd_reg": "0", - "id": "3" - }, - { - "cmd_data": "'I'", - "cmd_reg": "0", - "id": "4" - }, - { - "cmd_data": "'R'", - "cmd_reg": "0", - "id": "5" - }, - { - "cmd_data": "'S'", - "cmd_reg": "0", - "id": "6" - }, - { - "cmd_data": "'A'", - "cmd_reg": "0", - "id": "7" - }, - { - "cmd_data": "'E'", - "cmd_reg": "0", - "id": "8" - }, - { - "cmd_data": "'U'", - "cmd_reg": "0", - "id": "9" - } - ], - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0" - }, - { - "id": "1", - "read_data_reg": "0" - }, - { - "id": "2", - "read_data_reg": "0" - }, - { - "id": "3", - "read_data_reg": "0" - } - ], - "id": "MS_LINE_LEADER", - "mode_info": [ - { - "data_type": "LEGO_SENSOR_DATA_S8", - "description": "Line Follower", - "id": "0", - "name": "PID", - "notes": "\n[^pid-mode-value0]: \"Steering\" is the power value\n returned by the sensor to correct your course. Add\n this value to your left motor and subtract from\n right motor.\n \n ", - "units": "pct", - "units_description": "percent", - "value0": "Steering (-100 to 100)", - "value0_footnote": "[^pid-mode-value0]" - }, - { - "data_sets": "3", - "data_type": "LEGO_SENSOR_DATA_S8", - "description": "Line Follower - all values", - "id": "1", - "name": "PID-ALL", - "notes": "\n[^pid-mode-value1]: \"Average\" is the weighted average\n of the sensor reading. The average is a weighted\n average of the bits set to 1 based on the position.\n i.e. left most bit has weight of 10, second bit has\n weight of 20.\n \n[^pid-mode-value2]: \"Result\" is a byte value of\n the sensor reading. Each bit corresponding to the\n sensor where the line is seen is set to 1, or else\n the bit is zero.\n \n ", - "value0": "Steering (-100 to 100)", - "value0_footnote": "[^pid-mode-value0]", - "value1": "Average (0 to 80)", - "value1_footnote": "[^pid-mode-value1]", - "value2": "Result (as bits)", - "value2_footnote": "[^pid-mode-value2]" - }, - { - "data_sets": "8", - "description": "Calibrated values", - "id": "2", - "name": "CAL", - "raw_max": "100", - "si_max": "100", - "units": "pct", - "units_description": "percent", - "value0": "LED 0 (0 to 100)", - "value1": "LED 1 (0 to 100)", - "value2": "LED 2 (0 to 100)", - "value3": "LED 3 (0 to 100)", - "value4": "LED 4 (0 to 100)", - "value5": "LED 5 (0 to 100)", - "value6": "LED 6 (0 to 100)", - "value7": "LED 7 (0 to 100)" - }, - { - "data_sets": "8", - "data_type": "LEGO_SENSOR_DATA_S16", - "description": "Uncalibrated values", - "id": "3", - "name": "RAW", - "raw_max": "USHRT_MAX", - "si_max": "USHRT_MAX", - "value0": "LED 0 (0 to ???)", - "value1": "LED 1 (0 to ???)", - "value2": "LED 2 (0 to ???)", - "value3": "LED 3 (0 to ???)", - "value4": "LED 4 (0 to ???)", - "value5": "LED 5 (0 to ???)", - "value6": "LED 6 (0 to ???)", - "value7": "LED 7 (0 to ???)" - } - ], - "name": "ms-line-leader", - "notes": "\n[^address]: The address is programmable. See manufacturer\n documentation for more information.\n \n ", - "num_commands": "10", - "num_modes": "4", - "product_id": "LineLdr", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "mindsensors.com-line-follower-sensor", - "vendor_id": "mndsnsrs", - "vendor_name": "mindsensors.com", - "vendor_part_name": "Line Follower Sensor", - "vendor_part_number": "LineLeader", - "vendor_website": "http://www.mindsensors.com/ev3-and-nxt/48-line-follower-sensor-for-nxt-or-ev3" - }, - { - "cmd_info": [ - { - "description": "Enable tracking", - "id": "0", - "name": "TRACK-ON" - }, - { - "description": "Disable tracking", - "id": "1", - "name": "TRACK-OFF" - }, - { - "description": "Set to object tracking mode", - "id": "2", - "name": "TRACK-OBJ" - }, - { - "description": "Set to line tracking mode", - "id": "3", - "name": "TRACK-LINE" - }, - { - "description": "Sort by size", - "id": "4", - "name": "SORT-SIZE" - }, - { - "description": "Sort by color", - "id": "5", - "name": "SORT-COL" - } - ], - "default_address": "0x01", - "default_address_footnote": "[^address]", - "i2c_cmd_info": [ - { - "cmd_data": "'E'", - "cmd_reg": "0", - "id": "0" - }, - { - "cmd_data": "'D'", - "cmd_reg": "0", - "id": "1" - }, - { - "cmd_data": "'B'", - "cmd_reg": "0", - "id": "2" - }, - { - "cmd_data": "'L'", - "cmd_reg": "0", - "id": "3" - }, - { - "cmd_data": "'A'", - "cmd_reg": "0", - "id": "4" - }, - { - "cmd_data": "'U'", - "cmd_reg": "0", - "id": "5" - } - ], - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0" - } - ], - "id": "MS_NXTCAM", - "mode_info": [ - { - "data_sets": "6", - "description": "Tracking", - "id": "0", - "name": "TRACK", - "name_footnote": "[^advanced]", - "notes": "\n[^advanced]: This driver only allows for tracking a single\n object. To track more than one object and for other more\n advanced uses, you can disable this driver by setting `poll_ms`\n to `0` and using the `direct` attribute to directly read and\n write I2C messages. See the [Using I2C Sensors] page and the\n manufacturers documentation for more information.\n ^\n [Using I2C Sensors]: /docs/sensors/using-i2c-sensors\n \n ", - "value0": "Object count", - "value1": "Color index", - "value2": "X upper left", - "value3": "Y upper left", - "value4": "X lower right", - "value5": "Y lower right" - } - ], - "name": "ms-nxtcam", - "notes": "\n[^address]: The address is programmable. See manufacturer\n documentation for more information.\n \n ", - "num_commands": "6", - "num_modes": "1", - "product_id": "NXTCAM", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "mindsensors.com-vision-subsystem-v4-for-nxt-or-ev3", - "vendor_id": "mndsnsrs", - "vendor_name": "mindsensors.com", - "vendor_part_name": "Vision Subsystem v4 for NXT or EV3", - "vendor_part_number": "NXTCam-v4", - "vendor_website": "http://www.mindsensors.com/ev3-and-nxt/14-vision-subsystem-v4-for-nxt-or-ev3-nxtcam-v4" - }, - { - "default_address": "0x03", - "default_address_footnote": "[^address]", - "device_class_footnote": "[^tacho-motor-devices]", - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0" - }, - { - "id": "1", - "read_data_reg": "0" - } - ], - "id": "MS_NXTMMX", - "mode_info": [ - { - "data_sets": "1", - "decimals": "3", - "description": "Status", - "id": "0", - "name": "STATUS", - "raw_max": "255", - "si_max": "255", - "units": "V", - "units_description": "volts", - "value0": "Battery voltage" - }, - { - "data_sets": "1", - "decimals": "3", - "description": "Status (for older firmware versions)", - "id": "1", - "name": "STATUS-OLD", - "name_footnote": "[^status-old]", - "notes": "\n[^status-old]: The I2C register for battery voltage\n was changed for EV3 compatibility. If `STATUS` does\n not seem to work, try this mode instead.\n ", - "raw_max": "255", - "si_max": "255", - "units": "V", - "units_description": "volts", - "value0": "Battery voltage" - } - ], - "name": "ms-nxtmmx", - "notes": "\n[^address]: The address is programmable. See manufacturer\n documentation for more information.\n \n[^tacho-motor-devices]: The NxtMMX driver also loads two\n [tacho-motor] class devices. Use the tacho-motor class devices\n to actually control the motors. You can identify the motors\n by the `address` attribute. It will be `in:i2c:mux`\n where `` is 1-4, `` is 3 (unless you changed the address)\n and `` is 1 or 2 (matches M1 or M2 printed on the NxtMMX).\n ^\n [tacho-motor]: /docs/drivers/tacho-motor-class\n \n ", - "num_modes": "2", - "ops": [], - "product_id": "NxTMMX", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "mindsensors.com-multiplexer-for-nxt-ev3-motors", - "vendor_id": "mndsnsrs", - "vendor_name": "mindsensors.com", - "vendor_part_name": "Multiplexer for NXT/EV3 Motors", - "vendor_part_number": "NXTMMX-v2", - "vendor_website": "http://www.mindsensors.com/ev3-and-nxt/21-multiplexer-for-nxtev3-motors" - }, - { - "default_address": "0x58", - "default_address_footnote": "[^address]", - "device_class_footnote": "[^servo-motor-devices]", - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0" - }, - { - "id": "1", - "read_data_reg": "0" - } - ], - "id": "MS_8CH_SERVO", - "mode_info": [ - { - "decimals": "3", - "description": "EV3 Compatible", - "id": "0", - "name": "V3", - "notes": "\n \n[^battery-voltage]: The current voltage scaling is based on\n the manufacturers documentation, however it seems to be low.\n If you are seeing this too, please open an issue on GitHub\n and we will change the scaling.\n \n ", - "raw_max": "255", - "raw_min": "127", - "si_max": "9400", - "si_min": "4700", - "units": "V", - "units_description": "volts", - "value0": "Battery voltage (0 to 9400)", - "value0_footnote": "[^battery-voltage]" - }, - { - "decimals": "3", - "description": "Older versions", - "id": "1", - "name": "OLD", - "name_footnote": "[^old-mode]", - "notes": "\n[^old-mode]: Older versions of this sensor have the battery\n voltage at a different address. If the default mode does not\n return a value, try this mode.\n \n ", - "raw_max": "255", - "raw_min": "127", - "si_max": "9400", - "si_min": "4700", - "units": "V", - "units_description": "volts", - "value0": "Battery voltage (0 to 9400)", - "value0_footnote": "[^battery-voltage]" - } - ], - "name": "ms-8ch-servo", - "notes": "\n[^address]: The address is programmable. See manufacturer\n documentation for more information.\n \n[^servo-motor-devices]: The `ms-8ch-servo` driver loads separate\n servo motor devices (one for each of the 8 channels) in addition\n to the [lego-sensor class] device. See the [servo-motor class]\n for more information. The `servo-motor` class `address` attribute\n will return `in:i2c:sv` where `` is the input port\n the servo controller is connected to, `` is the address and\n `` is the channel as indicated on the servo controller itself.\n ^\n [lego-sensor class]: /docs/drivers/lego-sensor-class\n [servo-motor class]: /docs/drivers/servo-motor-class\n \n ", - "num_modes": "2", - "ops": [], - "product_id": "NXTServo", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "mindsensors.com-8-channel-servo-controller", - "vendor_id": "mndsnsrs", - "vendor_name": "mindsensors.com", - "vendor_part_name": "8-channel Servo Controller", - "vendor_part_number": "NxtServo", - "vendor_website": "http://www.mindsensors.com/ev3-and-nxt/25-8-channel-servo-controller-for-nxt-or-ev3" - }, - { - "default_address": "0x38", - "default_address_footnote": "[^addresses]", - "device_class": "[gpio](https://www.kernel.org/doc/Documentation/gpio/) [^usage]", - "id": "MS_SENSOR_KIT_PFC8574", - "name": "pcf8574", - "notes": "\n[^addresses]: Valid addresses are 0x38..0x3F (configurable via input pins)\n \n[^usage]: Sample usage:\n \n Register I2C device:\n \n
echo pcf8574 0x38 > /sys/bus/i2c/devices/i2c-/new_device\n    
\n \n Finding device class node and initializing:\n \n
for chip in $(find /sys/class/gpio -name gpiochip*)\n    do\n        if [[ \"$(cat $chip/label)\" == \"pcf8547\" ]]\n        then\n            base=$(cat $chip/base)\n            # Pins are active low\n            for i in {0..7}\n            do\n                gpio=$(($base + $i))\n                echo $gpio > /sys/class/gpio/export\n                # gpios on this chip are active low\n                echo 1 > /sys/class/gpio/gpio$gpio/active_low\n                # initialize direction here\n            done\n            # do whatever with the gpios\n        fi\n    done\n    
\n \n ", - "sensor_type": "gpio-pcf857xr", - "source_file": "drivers/lego/sensors/other_sensor_defs.c", - "source_line": 62, - "url_name": "mindsensors.com-sensor-building-kit-for-nxt-with-pcf8574-ic", - "vendor_name": "mindsensors.com", - "vendor_part_name": "Sensor building kit for NXT with PCF8574 IC", - "vendor_part_number": "PCF8574-Nx", - "vendor_website": "http://mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=71" - }, - { - "default_address": "0x48", - "default_address_footnote": "[^addresses]", - "device_class": "[hwmon](http://www.lm-sensors.org/) [^usage]", - "id": "MS_SENSOR_KIT_PCF8591", - "name": "pcf8591", - "notes": "\n[^addresses]: Valid addresses are 0x48..0x4F (configurable via input pins)\n \n[^usage]: Sample usage:\n \n Register I2C device:\n \n
echo pcf8591 0x48 > /sys/bus/i2c/devices/i2c-/new_device\n    
\n \n Finding device class node:\n \n
for chip in $(find /sys/class/hwmon -name hwmon*)\n    do\n        if [[ \"$(cat $chip/device/name)\" == \"pcf8591\" ]]\n        then\n            # do whatever\n        fi\n    done\n    
\n \n ", - "sensor_type": "pcf8591", - "source_file": "drivers/lego/sensors/other_sensor_defs.c", - "source_line": 106, - "url_name": "mindsensors.com-sensor-building-kit-for-nxt-with-pcf8591-ic", - "vendor_name": "mindsensors.com", - "vendor_part_name": "Sensor building kit for NXT with PCF8591 IC", - "vendor_part_number": "PCF8591-Nx", - "vendor_website": "http://mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=92" - }, - { - "cmd_info": [ - { - "description": "Sort by size", - "id": "0", - "name": "SORT-SIZE" - }, - { - "description": "Sort by color", - "id": "1", - "name": "SORT-COL" - } - ], - "default_address": "0x01", - "default_address_footnote": "[^address]", - "i2c_cmd_info": [ - { - "cmd_data": "'A'", - "cmd_reg": "0", - "id": "0" - }, - { - "cmd_data": "'U'", - "cmd_reg": "0", - "id": "1" - } - ], - "i2c_mode_info": [ - { - "id": "0", - "read_data_reg": "0" - } - ], - "id": "MS_PIXYADAPTER", - "mode_info": [ - { - "data_sets": "6", - "description": "Tracking", - "id": "0", - "name": "TRACK", - "name_footnote": "[^advanced]", - "notes": "\n[^advanced]: This driver only allows for tracking a single\n object. To track more than one object and for other more\n advanced uses, you can disable this driver by setting `poll_ms`\n to `0` and using the `direct` attribute to directly read and\n write I2C messages. See the [Using I2C Sensors] page and the\n manufacturers documentation for more information.\n ^\n [Using I2C Sensors]: /docs/sensors/using-i2c-sensors\n \n ", - "value0": "Object count", - "value1": "Color index", - "value2": "X upper left", - "value3": "Y upper left", - "value4": "X lower right", - "value5": "Y lower right" - } - ], - "name": "ms-pixy-adapter", - "notes": "\n[^address]: The address is programmable. See manufacturer\n documentation for more information.\n \n ", - "num_commands": "2", - "num_modes": "1", - "product_id": "PixyAdpt", - "sensor_type": "nxt-i2c-sensor", - "source_file": "drivers/lego/sensors/nxt_i2c_sensor_defs.c", - "source_line": 300, - "url_name": "mindsensors.com-pixy-adapter-for-mindstorms-ev3-or-nxt", - "vendor_id": "mndsnsrs", - "vendor_name": "mindsensors.com", - "vendor_part_name": "Pixy Adapter for MINDSTORMS EV3 or NXT", - "vendor_part_number": "PixyAdapter", - "vendor_website": "http://www.mindsensors.com/ev3-and-nxt/35-pixy-adapter" - }, - { - "default_address": "0x68", - "device_class": "[rtc](https://www.kernel.org/doc/Documentation/rtc.txt) [^usage]", - "id": "MS_RTC", - "name": "ds1307", - "notes": "\n[^usage]: Sample usage:\n \n Register I2C device:\n \n
echo ds1307 0x68 > /sys/bus/i2c/devices/i2c-/new_device\n    
\n \n Finding device class node:\n \n
for chip in $(find /sys/class/rtc -name rtc*)\n    do\n        if [[ \"$(cat $chip/name)\" == \"ds1307\" ]]\n        then\n            # do whatever\n        fi\n    done\n    
\n \n ", - "sensor_type": "rtc-ds1307", - "source_file": "drivers/lego/sensors/other_sensor_defs.c", - "source_line": 140, - "url_name": "mindsensors.com-realtime-clock-for-nxt", - "vendor_name": "mindsensors.com", - "vendor_part_name": "Realtime Clock for NXT", - "vendor_part_number": "RTC-Nx-v3", - "vendor_website": "http://mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=77" - }, - { - "id": "MS_TOUCH_SENSOR_MUX", - "mode_info": [ - { - "data_sets": "3", - "description": "Touch sensors", - "id": "0", - "name": "TOUCH-MUX", - "notes": "\n[^values]: Values:\n \n | Value | Description |\n |:-----:|:-----------:|\n | `0` | Released |\n | `1` | Pressed |\n \n ", - "scale": "ms_touch_mux_scale", - "value0": "Sensor T1 state", - "value0_footnote": "[^values]", - "value1": "Sensor T2 state", - "value1_footnote": "[^values]", - "value2": "Sensor T3 state", - "value2_footnote": "[^values]" - } - ], - "name": "ms-nxt-touch-mux", - "num_modes": "1", - "sensor_type": "nxt-analog-sensor", - "source_file": "drivers/lego/sensors/nxt_analog_sensor_defs.c", - "source_line": 117, - "url_name": "mindsensors.com-touch-sensor-multiplexer-for-nxt-ev3", - "vendor_name": "mindsensors.com", - "vendor_part_name": "Touch Sensor Multiplexer for NXT & EV3", - "vendor_part_number": "TouchMux", - "vendor_website": "http://mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=135" - } -] diff --git a/_data/tutorial-groups.yml b/_data/tutorial-groups.yml new file mode 100644 index 000000000..07ba55388 --- /dev/null +++ b/_data/tutorial-groups.yml @@ -0,0 +1,39 @@ +- title: "Software" + id: "software" + items: + - id: basic-networking + title: Basic Networking + description: "Connecting ev3dev to a local network or the internet, and connecting to an ev3dev device from a PC." + - id: advanced-networking + title: Advanced Networking + description: "Communicating using special protocols between multiple devices on a network." + - id: software-languages + title: Programming Languages and Tooling + description: "Configuring a development environment, installing new languages, and using advanced language tools." + - id: software-editors + title: "Text Editors" + description: "Tips on using text editors which ship with ev3dev out-of-the-box." + - id: cross-compiling + title: Cross-Compiling Code + description: "Compiling code to run on an EV3 or other ev3dev device from a host PC." +- title: "Hardware" + id: "hardware" + items: + - id: hardware-standard + title: "Standard Hardware" + description: "Configuring and using motors, sensors, buttons and other standard functionality on ev3dev." + - id: hardware-extras + title: Extra Hardware + description: "Configuration and usage of specialty and otherwise nonstandard hardware." +- title: "System administration & setup" + id: "administration-and-setup" + items: + - id: sd-card-image + title: SD Card Imaging + description: "Guides on flashing an SD card with ev3dev images." + - id: system + title: "Ev3dev System" + description: "Configuring, updating and modifying an ev3dev installation." + - id: website + title: This Website + description: "Using this website and contributing content." \ No newline at end of file diff --git a/_includes/author-card.html b/_includes/author-card.html deleted file mode 100644 index 7587f8144..000000000 --- a/_includes/author-card.html +++ /dev/null @@ -1,16 +0,0 @@ - - -{% assign authors = author_card %} -{% for author in authors %} - {% assign author_no_at_sign = author | strip_html | remove_first: "@" %} - {% assign at_sign = author | strip_html | replace: author_no_at_sign %} - - {% assign test_at_sign_is_first = author | truncate: 4 | replace: "@" | size %} - - {% if at_sign.size > 0 and test_at_sign_is_first == 3 %} -

- {% else %} -
{{ author }}
- {% endif %} -{% endfor %} diff --git a/_includes/docs/imaging-tutorial-etcher-banner.html b/_includes/docs/imaging-tutorial-etcher-banner.html new file mode 100644 index 000000000..a109ba1c1 --- /dev/null +++ b/_includes/docs/imaging-tutorial-etcher-banner.html @@ -0,0 +1,5 @@ +{% include /style/icon.html type="info" %} +There's an easier way to image your SD card! Check out +[the "Getting Started" guide](/docs/getting-started#step-2-flash-the-sd-card){: .alert-link } +for a cross-platform guide. +{: .alert .alert-info} diff --git a/_includes/head.html b/_includes/head.html deleted file mode 100644 index 2ff029a30..000000000 --- a/_includes/head.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - {{ page.title }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {% if page.extra-head-content %} - {{ page.extra-head-content }} - {% endif %} - - diff --git a/_includes/inline-screenshot.html b/_includes/inline-screenshot.html deleted file mode 100644 index b7a1c5881..000000000 --- a/_includes/inline-screenshot.html +++ /dev/null @@ -1,10 +0,0 @@ -
- - - -

- -{{ include.caption }} - -

-
\ No newline at end of file diff --git a/_includes/motor.md b/_includes/motor.md deleted file mode 100644 index 6edcc6e39..000000000 --- a/_includes/motor.md +++ /dev/null @@ -1,73 +0,0 @@ -{% assign motor=site.data.motors[page.motor_index] %} -{% assign footnotes='' %} -{% if motor.notes %} - {% assign footnotes=footnotes | append: motor.notes %} -{% endif %} - - - -### General Info - - - - - - - {%if motor.vendor_website %} - - - {% assign split_website=motor.vendor_website | split: '/' %} - - - {% endif %} - - - - - - - - - {% if motor.vendor_id %} - - - - - {% endif %} - {% if motor.product_id %} - - - - - {% endif %} -
device_name{{ motor.name }}
Website[{{ split_website[2] }}]({{ motor.vendor_website }})
Connection{{ connection }}
sysfs class - {%if motor.device_class %} - {{ motor.device_class }}{{ motor.device_class_footnote }} -
vendor_id - {{ motor.vendor_id }}{{ motor.vendor_id_footnote }} -
product_id - {{ motor.product_id }}{{ motor.product_id_footnote }} -
- -{% if footnotes != '' %} -### Notes - -{{ footnotes }} - -{% endif %} diff --git a/_includes/breadcrumbs.html b/_includes/page-core/breadcrumbs.html similarity index 69% rename from _includes/breadcrumbs.html rename to _includes/page-core/breadcrumbs.html index 0f9337aad..215312af7 100644 --- a/_includes/breadcrumbs.html +++ b/_includes/page-core/breadcrumbs.html @@ -2,19 +2,29 @@ {% assign link='/' %}