avrgirl-chrome-app
avrgirl-chrome-app copied to clipboard
An example app, showing how to use avrgirl in a Chrome browser.
avrgirl-arduino chrome app
Use avrgirl-arduino in the browser! An example chrome app that you can fork and make your own.
Instructions
Install the following tools globally:
-
npm install -g browserify
-
npm install -g http-server
To run the demo:
- Fork and clone this repo
- Run
npm install
within the newly cloned local repo - Run
browserify background.js -o background.bundle.js
- In your Chrome browser, visit
chrome://extensions
- Click
Load unpacked extension
- Navigate to this cloned repo, and click
Select
- Click
Launch
when you see the extension appear at the top of the extensions list - Copy the
id
value of the extension, and updatevar extensionid = '...';
line intest.html
- Run the command
http-server -a 127.0.0.1 -p 8080
back in your terminal and visit127.0.0.1:8080/test.html
in your Chrome browser. Also open the dev tools for logs! - Plug in an Arduino Uno, and upload a compatible .hex file to it using the test.html form
- :tada:
To develop this further or make changes:
- Edit
background.js
(notbackground.bundle.js
) - Always run
browserify background.js -o background.bundle.js
each time you changebackground.js
orlib/flash.js
, and then manually reload the chrome app. - When you reload the chrome app, you'll also need to refresh
test.html
so the page can reconnect to the reloaded chrome app. - Using
watchify
instead ofbrowserify
is totes cool and will work as expected.
Please open an issue if you can't figure something out :two_hearts: