{"id":18509332,"url":"https://github.com/lgsinnovations/edison-gpio-example","last_synced_at":"2025-05-14T10:17:37.001Z","repository":{"id":35578668,"uuid":"39851071","full_name":"LGSInnovations/edison-gpio-example","owner":"LGSInnovations","description":"Control GPIO via web interfaces","archived":false,"fork":false,"pushed_at":"2015-07-31T16:12:54.000Z","size":2956,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-12-25T20:12:10.335Z","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/LGSInnovations.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}},"created_at":"2015-07-28T18:31:01.000Z","updated_at":"2022-03-01T17:10:22.000Z","dependencies_parsed_at":"2022-08-04T03:45:26.359Z","dependency_job_id":null,"html_url":"https://github.com/LGSInnovations/edison-gpio-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LGSInnovations%2Fedison-gpio-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LGSInnovations%2Fedison-gpio-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LGSInnovations%2Fedison-gpio-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LGSInnovations%2Fedison-gpio-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LGSInnovations","download_url":"https://codeload.github.com/LGSInnovations/edison-gpio-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239222318,"owners_count":19602590,"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-11-06T15:17:16.064Z","updated_at":"2025-02-17T02:25:31.355Z","avatar_url":"https://github.com/LGSInnovations.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Edison GPIO Example\n===================\n\nThis demo is to show how to control the Edison's GPIOs using a web interface with a NodeJS server running on the Edison, with the [Edison Ethernet](https://github.com/LGSInnovations/Edison-Ethernet) board.\n\n### Software Setup ###\n\n1. Clone the repo onto the Edison (or your dev environment):\n\n    ```bash\n    git clone https://github.com/LGSInnovations/edison-gpio-example.git\n    ```\n\n2. `cd` into the `edison-gpio-example` directory and install dependencies:\n\n    ```bash\n    cd edison-gpio-example/\n    npm install \u0026\u0026 bower install\n    ```\n\n    *Note: In order to do this, you must have `node` and `npm` [installed](https://github.com/creationix/nvm). Then to install `bower` run `npm install bower --global`*\n\n3. The app will look for the `PORT` environment variable to listen on a particular port. If none is found, it will default to port 8080 and the app will be accessible through your IP address and port or locally at `http://localhost:8080`. To use a different port (like the standard port 80), export the `PORT` variable before running the app:\n\n    ```bash\n    export PORT=80\n    ```\n\n4. Use `node` or `nodemon` to run the app:\n\n    ```bash\n    nodemon app.js\n    ```\n\n    *Note: `nodemon` is a utility that automatically checks for updates and restarts the node server, which is great for development. You can alternatively run `node app.js` but you will have to restart the server if you change any code. Run `npm install nodemon --global` to install `nodemon`.*\n\n### Hardware Setup ###\n\nThe following pin configuration is assumed, using the [SparkFun GPIO Block](https://www.sparkfun.com/products/13038?_ga=1.52925358.727496411.1438121254) (see image below):\n\n| GPIO Pin | Component                       | MRAA Pin (in code) |\n| -------- | ------------------------------- | ------------------ |\n| GP44     | Green LED                       | 31                 |\n| GP45     | Yellow LED                      | 45                 |\n| GP46     | Red LED                         | 32                 |\n| GP47     | Red LED                         | 46                 |\n| GP48     | Yellow LED                      | 33                 |\n| GP49     | Green LED                       | 47                 |\n| GP15     | Button tied high w/ 1K pull-down| 48                 |\n| GP14     | Unused                          | 36                 |\n\n![Edison Ethernet with populated GPIO Block](extra/edison-ethernet-gpio.jpg)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flgsinnovations%2Fedison-gpio-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flgsinnovations%2Fedison-gpio-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flgsinnovations%2Fedison-gpio-example/lists"}