{"id":13521419,"url":"https://github.com/rwaldron/j5-rc-receiver","last_synced_at":"2025-07-03T09:33:49.727Z","repository":{"id":66854370,"uuid":"55603747","full_name":"rwaldron/j5-rc-receiver","owner":"rwaldron","description":"RC Receiver component plugin for Johnny-Five","archived":false,"fork":false,"pushed_at":"2016-04-08T23:04:09.000Z","size":1811,"stargazers_count":8,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-20T01:15:00.333Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rwaldron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-04-06T12:26:40.000Z","updated_at":"2020-07-02T05:07:58.000Z","dependencies_parsed_at":"2024-01-13T22:23:30.028Z","dependency_job_id":"bc7a604c-a4a6-4cb0-b09c-c32374af21a2","html_url":"https://github.com/rwaldron/j5-rc-receiver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rwaldron/j5-rc-receiver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwaldron%2Fj5-rc-receiver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwaldron%2Fj5-rc-receiver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwaldron%2Fj5-rc-receiver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwaldron%2Fj5-rc-receiver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rwaldron","download_url":"https://codeload.github.com/rwaldron/j5-rc-receiver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwaldron%2Fj5-rc-receiver/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263300935,"owners_count":23445325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T06:00:34.143Z","updated_at":"2025-07-03T09:33:49.697Z","avatar_url":"https://github.com/rwaldron.png","language":"JavaScript","funding_links":[],"categories":["Libraries and Plugins"],"sub_categories":["Robot Programming Plugins"],"readme":"# Receiver\n\n[![Build Status](https://travis-ci.org/rwaldron/j5-rc-receiver.svg?branch=master)](https://travis-ci.org/rwaldron/j5-rc-receiver)\n\nRC Receiver component plugin for [Johnny-Five](https://github.com/rwaldron/johnny-five).\n\n- [\"rc receiver\" @ Amazon.com](http://www.amazon.com/s/ref=nb_sb_noss_1?url=search-alias%3Daps\u0026field-keywords=rc+receiver)\n- [\"rc transmitter\" @ Amazon.com](http://www.amazon.com/s/ref=nb_sb_noss_1?url=search-alias%3Daps\u0026field-keywords=rc+transmitter)\n\n\n## API \u0026 Documentation\n\n### Receiver \n\nThe `Receiver` class constructs objects that represent a single RC Receiver component.\n\n```js\nvar receiver = new Receiver();\n\nreceiver.on(\"change\", function() {\n  console.log(this.x, this.y);\n});\n```\n\n#### Options\n\n| Property   | Type      | Value(s)/Description        | Default | Required |\n|------------|-----------|---------------------------- |---------|----------|\n| address    | number    | Address for I2C device \\*   | `0x0A`  | no       |\n| channels   | number    | Number of channels          | 6       | no       |\n| channels   | array     | Array of channel names \\*\\* | \\*\\*    | no       |\n\n\n```js\n// Example of explicitly specified address\nvar receiver = new Receiver({\n  address: 0x04\n});\n```\n\n\\* The I2C address defaults to `0x0A`, however digital pins 10 \u0026 11 can be used to configure the address, according to the following table: \n\n| D11 | D12 | Address |\n| --- | --- | ------- |\n| 0   | 0   | 0x0A    |\n| 0   | 1   | 0x0B    |\n| 1   | 0   | 0x0C    |\n| 1   | 1   | 0x0D    |\n\n\n\\*\\* The built-in channel names are derived from the most commonly used names in the most common order: \n\n1. `throttle`\n2. `aileron`\n3. `elevator`\n4. `rudder`\n5. `gear`\n6. `aux1`\n7. `aux2`\n8. `aux3`\n\nWhen `channels: [...]` are specified, the length is used to set the channel count and the names provided are used to override the above listed names.\n\n\n#### Properties\n\n| Property | Type      | Value(s)/Description      |\n|----------|-----------|---------------------------|\n| 1-n      | number    | Each channel value is accessible via numeric channel property. These are NOT zero-indexed|\n\n\n#### Iterable/Iterator Protocol\n\nFor code running in Node.js 4.2.x or newer, `Receiver` objects implement the [Iterable Protocol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#iterable).\n\n```js\nvar receiver = new Receiver();\n\n// Create a zero-indexed array of receiver's current values:\nvar array = Array.from(receiver);\n```\n\n#### Events\n\n- **change** Fired whenever any channel value changes.\n- **change:[name]** Fired whenever the channel matching `[name]` changes.\n  ```js\n  receiver.on(\"change\", function(change) {\n    console.log(\"Channel(%d): %d\", change.channel, change.value);\n  });\n  ```\n  \n  ```js\n  receiver.on(\"change:throttle\", function(change) {\n    console.log(\"Throttle: %d\", change.value);\n  });\n  ```\n\n- **data** Fired as frequently as the hardware can be read.\n\n\n## Backpack Controller\n\n### Install Firmware\n\nUsing the Arduino IDE, install the [firmware](https://github.com/rwaldron/j5-rc-receiver/blob/master/firmware/rc_receiver_slave.ino) to your AVR based microcontroller of choice. \n\n### Assembly\n\n![RC Receiver, I2C Nano Backpack](https://github.com/rwaldron/j5-rc-receiver/blob/master/assets/rc-receiver-backpack.png)\n\n\n## Connect To I2C Capable Platform\n\n### Arduino UNO\n\n[![RC Receiver, I2C Nano Backpack + Arduino Uno](https://raw.githubusercontent.com/rwaldron/j5-rc-receiver/master/assets/rc-receiver-backpack-arduino-small.png)](https://raw.githubusercontent.com/rwaldron/j5-rc-receiver/master/assets/rc-receiver-backpack-arduino.png)\n\n```js\nvar five = require(\"johnny-five\");\nvar Receiver = require(\"j5-rc-receiver\")(five);\nvar board = new five.Board();\n\nboard.on(\"ready\", function() {\n  var receiver = new Receiver();\n\n  receiver.on(\"change\", function(change) {\n    console.log(\"Channel(%d): %d\", change.channel, change.value);\n  });\n});\n```\n\n### Tessel 2\n\n[![RC Receiver, I2C Nano Backpack + Tessel 2](https://raw.githubusercontent.com/rwaldron/j5-rc-receiver/master/assets/rc-receiver-backpack-tessel-small.png)](https://raw.githubusercontent.com/rwaldron/j5-rc-receiver/master/assets/rc-receiver-backpack-tessel.png)\n\n[![RC Receiver, I2C Mini Backpack + Tessel 2](https://raw.githubusercontent.com/rwaldron/j5-rc-receiver/master/assets/rc-receiver-backpack-tessel-mini-small.png)](https://raw.githubusercontent.com/rwaldron/j5-rc-receiver/master/assets/rc-receiver-backpack-tessel-mini.png)\n\n```js\nvar five = require(\"johnny-five\");\nvar Receiver = require(\"j5-rc-receiver\")(five);\nvar Tessel = require(\"tessel-io\");\nvar board = new five.Board({\n  io: new Tessel()\n});\n\nboard.on(\"ready\", function() {\n  var receiver = new Receiver({\n    // Tessel-IO allow omitting the bus when using Port A, \n    // but for illustrative purposes, we specify it here...\n    bus: \"A\"\n  });\n\n  receiver.on(\"change\", function(change) {\n    console.log(\"Channel(%d): %d\", change.channel, change.value);\n  });\n});\n```\n\n### Intel Edison MiniBoard\n\n[![RC Receiver, I2C Mini Backpack + Intel Edison MiniBoard](https://raw.githubusercontent.com/rwaldron/j5-rc-receiver/master/assets/rc-receiver-backpack-edison-mini-small.png)](https://raw.githubusercontent.com/rwaldron/j5-rc-receiver/master/assets/rc-receiver-backpack-edison-mini.png)\n\n### Intel Edison Arduino Board\n\n[![RC Receiver, I2C Nano Backpack + Intel Edison Arduino Board](https://raw.githubusercontent.com/rwaldron/j5-rc-receiver/master/assets/rc-receiver-backpack-edison-arduino-small.png)](https://raw.githubusercontent.com/rwaldron/j5-rc-receiver/master/assets/rc-receiver-backpack-edison-arduino.png)\n\n\n```js\nvar five = require(\"johnny-five\");\nvar Receiver = require(\"j5-rc-receiver\")(five);\nvar Edison = require(\"edison-io\");\nvar board = new five.Board({\n  io: new Edison()\n});\n\nboard.on(\"ready\", function() {\n  var receiver = new Receiver();\n\n  receiver.on(\"pointermove\", function() {\n    console.log({ x: this.x, y: this.y });\n  });\n});\n```\n\n## Flight Simulator\n\nComing soon?\n\n\n## NOTE\n\nThe examples shown here are provided for illustration and do no specifically indicate platform support. This component class is expected to work with any platform that has I2C support. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwaldron%2Fj5-rc-receiver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frwaldron%2Fj5-rc-receiver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwaldron%2Fj5-rc-receiver/lists"}