├── .eslintrc.json ├── .github ├── CHANGELOG_TEMPLATE.json ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── gh-release.yml │ └── test-runner.yml ├── .gitignore ├── .jscsrc ├── BUDGET.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── avrgirl-arduino-browser.js ├── avrgirl-arduino-node.js ├── avrgirl-arduino.js ├── bin └── cli.js ├── boards.js ├── dist ├── avrgirl-arduino.global.js ├── avrgirl-arduino.global.min.js ├── avrgirl-arduino.global.min.js.LICENSE ├── avrgirl-arduino.js ├── avrgirl-arduino.min.js └── avrgirl-arduino.min.js.LICENSE ├── favicon.ico ├── gulpfile.js ├── junk └── hex │ ├── arduboy │ ├── README.md │ └── rund.cpp.leonardo.hex │ ├── blend-micro │ ├── Blink.cpp.hex │ └── StandardFirmata.cpp.hex │ ├── bqZum │ └── Blink.cpp.hex │ ├── circuit-playground-classic │ ├── Blink.cpp.hex │ └── StandardFirmata.cpp.hex │ ├── duemilanove168 │ ├── Blink.cpp.hex │ └── StandardFirmata.cpp.hex │ ├── duemilanove328 │ ├── Blink.cpp.hex │ └── StandardFirmata.cpp.hex │ ├── esplora │ ├── Blink.cpp.hex │ └── StandardFirmata.cpp.hex │ ├── feather │ └── Blink.cpp.hex │ ├── imuduino │ ├── Blink.cpp.hex │ ├── README.txt │ └── StandardFirmata.cpp.hex │ ├── leonardo │ ├── Blink.cpp.hex │ └── StandardFirmata.cpp.hex │ ├── lilypad-usb │ ├── Blink.cpp.hex │ └── StandardFirmata.cpp.hex │ ├── mega │ ├── Blink.cpp.hex │ └── StandardFirmata.cpp.hex │ ├── micro │ ├── Blink.cpp.hex │ └── StandardFirmata.cpp.hex │ ├── nano │ ├── Blink.cpp.hex │ └── StandardFirmata.cpp.hex │ ├── pinoccio │ ├── Blink.cpp.hex │ ├── Bootstrap.cpp.hex │ ├── README.md │ └── StandardFirmata.cpp.hex │ ├── pro-mini │ ├── Blink-3v.cpp.hex │ └── StandardFirmata-3v.cpp.hex │ ├── qduino │ ├── StandardFirmata.cpp.hex │ └── rainbow.cpp.hex │ ├── sf-pro-micro │ ├── Blink-5v.cpp.hex │ ├── README.txt │ └── StandardFirmata-5v.cpp.hex │ ├── tinyduino │ ├── Blink.cpp.hex │ └── StandardFirmata.cpp.hex │ ├── uno │ ├── Blink.cpp.hex │ └── StandardFirmata.cpp.hex │ └── yun │ ├── StandardFirmata.cpp.hex │ └── StandardFirmata.with_bootloader.cpp.hex ├── lib ├── avr109.js ├── browser-serialport.js ├── connection-browser.js ├── connection.js ├── protocol.js ├── protocols.js ├── stk500v1.js ├── stk500v2.js ├── test-pilot-checker.js └── tools.js ├── notes.md ├── package-lock.json ├── package.json ├── tests ├── avrgirl-arduino.spec.js ├── connection.spec.js ├── demos │ ├── arduboy.js │ ├── blend-micro.js │ ├── circuit-playground-classic.js │ ├── due168.js │ ├── feather.js │ ├── imuduino.js │ ├── leonardo.js │ ├── lilypad-usb.js │ ├── mega.js │ ├── micro.js │ ├── nano.js │ ├── pinoccio.js │ ├── pro-mini.js │ ├── qduino.js │ ├── sf-pro-micro.js │ ├── tinyduino.js │ ├── uno.js │ └── webserial │ │ ├── README.md │ │ ├── favicon.ico │ │ ├── images │ │ ├── ArduinoUno.svg │ │ ├── gear.idraw │ │ └── gear4.svg │ │ ├── index.html │ │ ├── js │ │ └── avrgirl-arduino.global.js │ │ ├── react-demo │ │ ├── .gitignore │ │ ├── README.md │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── public │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ ├── logo192.png │ │ │ ├── logo512.png │ │ │ ├── manifest.json │ │ │ └── robots.txt │ │ └── src │ │ │ ├── App.js │ │ │ ├── avrgirl-arduino.js │ │ │ ├── img │ │ │ ├── ArduinoUno.svg │ │ │ └── gear4.svg │ │ │ ├── index.js │ │ │ └── style.css │ │ └── style.css ├── helpers │ ├── mockSerial.js │ └── mockStk500.js ├── protocol.spec.js └── test-pilot.js └── webpack.config.js /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "node": true, 4 | "es2020": true, 5 | "browser": true 6 | }, 7 | "parserOptions": { 8 | "ecmaVersion": 2020, 9 | "sourceType": "module", 10 | "ecmaFeatures": { 11 | "jsx": true 12 | } 13 | }, 14 | "extends": "eslint:recommended", 15 | "rules": { 16 | // Force all variable names to use either camelCase style or UPPER_CASE 17 | // with underscores. 18 | "camelcase": ["error"], 19 | 20 | // Prohibit use of == and != in favor of === and !==. 21 | "eqeqeq": 2, 22 | 23 | // Enforce tab width of 2 spaces. 24 | "indent": ["warn", 2], 25 | 26 | // Prohibit use of a variable before it is defined. 27 | "no-use-before-define": 2, 28 | 29 | // Enforce line length to 100 characters 30 | "max-len": ["error", { "code": 300 }], 31 | 32 | // Require capitalized names for constructor functions. 33 | "new-cap": 1, 34 | 35 | // Enforce use of single quotation marks for strings. 36 | "quotes": ["error", "single"], 37 | 38 | // Enforce placing 'use strict' at the top function scope 39 | "strict": 0, 40 | 41 | // Prohibit use of explicitly undeclared variables. 42 | "no-undef": 2, 43 | 44 | // Warn when variables are defined but never used. 45 | "no-unused-vars": 1, 46 | 47 | // Suppress warnings about == null comparisons. 48 | "no-eq-null": 0, 49 | 50 | // Warn when there are dangling commas 51 | "comma-dangle": ["warn", "never"], 52 | 53 | "no-irregular-whitespace": ["warn"], 54 | 55 | "no-self-assign": ["warn"], 56 | 57 | "no-redeclare": ["warn"] 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /.github/CHANGELOG_TEMPLATE.json: -------------------------------------------------------------------------------- 1 | { 2 | "categories": [ 3 | { 4 | "title": "## 🚀 Features", 5 | "labels": ["feature"] 6 | }, 7 | { 8 | "title": "## 🐛 Fixes", 9 | "labels": ["fix"] 10 | }, 11 | { 12 | "title": "## 🧪 Tests", 13 | "labels": ["test"] 14 | } 15 | ], 16 | "sort": "ASC", 17 | "template": "${{CHANGELOG}}\n\n${{UNCATEGORIZED}}\n", 18 | "pr_template": "- ${{TITLE}}\n - PR: #${{NUMBER}}", 19 | "empty_template": "- no changes" 20 | } 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Issue Template 2 | 3 | Please review the [contribution](https://github.com/noopkat/avrgirl-arduino/blob/master/CONTRIBUTING.md) and [code of conduct](https://github.com/noopkat/avrgirl-arduino/blob/master/CODE_OF_CONDUCT.md) guidelines. 4 | 5 | ## Description 6 | 7 | _If you raise an issue on bug/issue please provide the requested information, where not possible, please provide as many details as possible and ultimately a thorough description of your issue._ 8 | 9 | ### Expected behaviour 10 | 11 | _What behaviour did you expect did occur?_ 12 | 13 | ### Actual behaviour 14 | 15 | _What unexpected behaviour occurred?_ 16 | 17 | ## Operating system and version 18 | 19 | _Please provide version on the operating system etc. used._ 20 | 21 | ### Windows (pre version 7) 22 | 23 | `C:\> ver` 24 | 25 | ### Windows (Version 7 and newer) 26 | 27 | `C:\> systeminfo | findstr /B /C:"OS Name" /C:"OS Version"` 28 | 29 | ### Linux and Unix based systems 30 | 31 | `$ uname -a` 32 | 33 | _For information on the specific distribution. Please consult your distribution documentation._ 34 | 35 | ## Avrgirl Arduino version 36 | 37 | _Please provide version on the Avrgirl Arduino version used_ 38 | 39 | _If working in a fork of the GitHub project, obtain this information post installation using:_ 40 | 41 | `$ npm list | grep avrgirl-arduino` 42 | 43 | _If you are working on code, which has diverged from the lastest release, please mention this_. 44 | 45 | ## NodeJS version 46 | 47 | _Please provide version on the Node version used._ 48 | 49 | `$ node --version` 50 | 51 | ## Arduino Board being used 52 | 53 | _Please provide version/model on the Arduino board being used._ 54 | 55 | _A full List of boards and processor names are [available on Wikipedia](https://en.wikipedia.org/wiki/List_of_Arduino_boards_and_compatible_systems)._ 56 | 57 | ## Log output, if available 58 | 59 | _Please add any log output, which can be used to describe the issue or circumstances surrounding the issues._ 60 | 61 | There is a property you can use named `megaDebug` that is passed into the instance options. This will output much more low level debugging info that could help the author debug your issue more quickly. See below for how to use it: 62 | 63 | ```javascript 64 | var avrgirl = new Avrgirl({ 65 | board: 'uno', 66 | debug: true, 67 | // turn on megaDebug mode! 68 | megaDebug: true 69 | }); 70 | ``` 71 | 72 | ## Step by step guide to reproducing the issue 73 | 74 | _If possible a code snipppet to demonstrate the issue or a throught step by step description of how to get reproduce the error._ 75 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | Please review the [contribution](https://github.com/noopkat/avrgirl-arduino/blob/master/CONTRIBUTING.md) and [code of conduct](https://github.com/noopkat/avrgirl-arduino/blob/master/CODE_OF_CONDUCT.md) guidelines. 4 | 5 | Please include a summary of the proposed improvement or addressed issue. 6 | 7 | Fixes/addresses (If applicable) # (issue) 8 | 9 | ## Type of change 10 | 11 | Please delete options that are not relevant. 12 | 13 | - [ ] Bug fix (non-breaking change which fixes an issue) 14 | - [ ] New feature (non-breaking change which adds functionality) 15 | - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) 16 | - [ ] This change requires a documentation update 17 | 18 | # Checklist: 19 | 20 | - [ ] My code follows the style guidelines of this project 21 | - [ ] I have performed a self-review of my own code 22 | - [ ] I have commented my code, particularly in hard-to-understand areas 23 | - [ ] I have made corresponding changes to the documentation 24 | - [ ] My changes generate no new warnings 25 | - [ ] I have added tests that prove my fix is effective or that my feature works 26 | - [ ] New and existing unit tests pass locally with my changes 27 | - [ ] Any dependent changes have been merged and published in downstream modules 28 | - [ ] Changes have been manually tested (please provide information on test platform using the fields below) 29 | 30 | ## Test / Development Platform Information 31 | 32 | - Operating system and version 33 | - Avrgirl Arduino version 34 | - NodeJS version 35 | - Arduino Board being used 36 | -------------------------------------------------------------------------------- /.github/workflows/gh-release.yml: -------------------------------------------------------------------------------- 1 | name: 'GitHub release' 2 | on: 3 | push: 4 | tags: 5 | - 'v*' 6 | jobs: 7 | release: 8 | if: startsWith(github.ref, 'refs/tags/') 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Check out repo code 12 | uses: actions/checkout@v2 13 | 14 | - name: Build Changelog 15 | id: github_release 16 | uses: mikepenz/release-changelog-builder-action@main 17 | with: 18 | configuration: ".github/CHANGELOG_TEMPLATE.json" 19 | env: 20 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 21 | 22 | - name: Publish Release 23 | uses: actions/create-release@v1 24 | with: 25 | tag_name: ${{ github.ref }} 26 | release_name: ${{ github.ref }} 27 | body: ${{steps.github_release.outputs.changelog}} 28 | env: 29 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 30 | -------------------------------------------------------------------------------- /.github/workflows/test-runner.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: Node.js CI 5 | 6 | on: 7 | push: 8 | branches: "*" 9 | pull_request: 10 | branches: [ master ] 11 | 12 | jobs: 13 | test: 14 | strategy: 15 | matrix: 16 | node-version: [10.x, 12.x, 14.x, 15.x] 17 | platform: [ubuntu-latest, macos-latest, windows-latest] 18 | 19 | runs-on: ${{ matrix.platform }} 20 | 21 | steps: 22 | - name: Check out code 23 | uses: actions/checkout@v2 24 | 25 | - name: Use Node.js ${{ matrix.node-version }} 26 | uses: actions/setup-node@v1 27 | with: 28 | node-version: ${{ matrix.node-version }} 29 | - run: | 30 | npm i 31 | npm test 32 | 33 | coverage: 34 | runs-on: ubuntu-latest 35 | 36 | steps: 37 | - name: Check out code 38 | uses: actions/checkout@v2 39 | 40 | - name: Coverage report 41 | uses: actions/setup-node@v1 42 | with: 43 | node-version: 14.x 44 | - run: | 45 | npm i 46 | npm run cover 47 | 48 | - name: Coveralls 49 | uses: coverallsapp/github-action@master 50 | with: 51 | github-token: ${{secrets.GITHUB_TOKEN}} 52 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Folders 2 | node_modules 3 | lib/progress.js 4 | coverage 5 | 6 | # DotFiles 7 | .DS_Store 8 | 9 | # Files 10 | *.swp 11 | *.log -------------------------------------------------------------------------------- /.jscsrc: -------------------------------------------------------------------------------- 1 | { 2 | "preset": "airbnb", 3 | "requireCurlyBraces": true, 4 | "requireTrailingComma": false 5 | } 6 | -------------------------------------------------------------------------------- /BUDGET.md: -------------------------------------------------------------------------------- 1 | # BUDGET 2 | 3 | This is just a spot to be transparent about the costs of producing AVRGirl Arduino. Keeping things informative :grin: 4 | All currency is expressed in USD as of 2015/2016 market rate. 5 | 6 | Revenue: $0 7 | 8 | Expenses: $361.96 9 | 10 | |Item|Cost|Reason| 11 | |:----------|:--------------|:--------------| 12 | |Arduino Mega|$45.95|Manual testing| 13 | |Arduino Mega (clone)|$13.59|Thought I'd busted my other Mega board, was just a temporarily corrupted bootloader lol| 14 | |SparkFun Pro Micro|$19.95|Manual testing| 15 | |QDuino Mini|$25.00|Manual testing| 16 | |RedBear Blend Micro|$39.90|Manual testing| 17 | |Arduino Nano (clone)|$13.99|Manual testing| 18 | |Arduino Pro Mini (clone)|$7.49|Manual testing| 19 | |FTDI USB to TTL Serial Adapter|$7.14|Manually testing the Pro Mini| 20 | |Adafruit Feather 32u4 Basic Proto|$19.95|Manual testing| 21 | |Dedicated Windows desktop|$169.00|Manual testing, a VM is not cutting it| 22 | 23 | I was pretty lucky with this library, because I was able to use some items I owned already (not in the list above) such as boards, cables, Linux box, etc. 24 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Code of Conduct 2 | 3 | As contributors and maintainers of this project, and in the interest of 4 | fostering an open and welcoming community, we pledge to respect all people who 5 | contribute through reporting issues, posting feature requests, updating 6 | documentation, submitting pull requests or patches, and other activities. 7 | 8 | We are committed to making participation in this project a harassment-free 9 | experience for everyone, regardless of level of experience, gender, gender 10 | identity and expression, sexual orientation, disability, personal appearance, 11 | body size, race, ethnicity, age, religion, or nationality. 12 | 13 | Examples of unacceptable behavior by participants include: 14 | 15 | * The use of sexualized language or imagery 16 | * Personal attacks 17 | * Trolling or insulting/derogatory comments 18 | * Public or private harassment 19 | * Publishing other's private information, such as physical or electronic 20 | addresses, without explicit permission 21 | * Other unethical or unprofessional conduct 22 | 23 | Project maintainers have the right and responsibility to remove, edit, or 24 | reject comments, commits, code, wiki edits, issues, and other contributions 25 | that are not aligned to this Code of Conduct, or to ban temporarily or 26 | permanently any contributor for other behaviors that they deem inappropriate, 27 | threatening, offensive, or harmful. 28 | 29 | By adopting this Code of Conduct, project maintainers commit themselves to 30 | fairly and consistently applying these principles to every aspect of managing 31 | this project. Project maintainers who do not follow or enforce the Code of 32 | Conduct may be permanently removed from the project team. 33 | 34 | This code of conduct applies both within project spaces and in public spaces 35 | when an individual is representing the project or its community. 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 38 | reported by contacting the project maintainer at noopkat@gmail.com. All 39 | complaints will be reviewed and investigated and will result in a response that 40 | is deemed necessary and appropriate to the circumstances. Maintainers are 41 | obligated to maintain confidentiality with regard to the reporter of an 42 | incident. 43 | 44 | 45 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 46 | version 1.3.0, available at 47 | [http://contributor-covenant.org/version/1/3/0/][version] 48 | 49 | [homepage]: http://contributor-covenant.org 50 | [version]: http://contributor-covenant.org/version/1/3/0/ 51 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Thank you for your interest in contributing to the avrgirl project to make it even better! 4 | 5 | Not sure where to start? Check out the currently filed issues to see if there's anything there you'd like to work on. 6 | 7 | Please ensure first that someone is not already working on an issue. If the issue seems stale or inactive and you want to take it over, get in touch with [noopkat](http://github.com/noopkat), the assigned person (check the comments on the issue for whom), or simply comment on the issue asking for status. 8 | 9 | ## Manual testing 10 | 11 | AVRGirl Arduino has a built-in manual testing tool called Test Pilot. It allows you to run a local test with an Arduino plugged in, and generates a tidy report for you to submit for feedback. No coding required, just a few button presses / keyboard taps in a browser window! I would really appreciate your help testing this software on your own unique, local computer. 12 | 13 | Once AVRGirl Arduino is globally installed on your machine using `npm install -g avrgirl-arduino@latest`, type `avrgirl-arduino test-pilot` into your terminal program and follow the prompts. Shouldn't take more than two minutes of your time, but will make a big difference to ensuring any issues are reported and fixed promptly! 14 | 15 | ## Feature requests 16 | 17 | The best thing to do here is to file an issue if there already isn't one. If it's something fairly obviously needed (in your opinion) and you are happy to code it, feel free to open a pull request without filing an issue first. 18 | 19 | ## Bugs / Issues 20 | 21 | Run a quick look through the currently open and closed issues and pull requests to make sure it hasn't already been reported or closed. If it's unique, feel free to open an issue. 22 | 23 | ## Financial contributions 24 | 25 | On average, Arduino boards cost between $15 and $50, depending on the tech included on it. This can add up really quickly, and I've invested a substantial amount of money into the avrgirl project so far to continually expand support for new hardware. If you'd like to donate funds to help me purchase more hardware for testing purposes, [please do so here](https://www.paypal.me/noopkat), and thank you ever so much! 26 | 27 | ## Code contribution workflow 28 | 29 | 1. Fork this repository and clone the new fork locally. 30 | 31 | 2. Run `npm install` to install the dev dependencies. 32 | 33 | 3. Make your changes in a new git branch: `git checkout -b my-fix-branch master` 34 | 35 | 4. Follow the coding style of this project. We base our style on the [Airbnb styleguide](https://github.com/airbnb/javascript) 36 | 37 | 5. Create your patch/feature, including appropriate tests if a test suite is present 38 | 39 | 6. Commit your changes using a descriptive commit message 40 | 41 | 7. Rebase on master if your branch falls behind on commits 42 | 43 | 8. Run the local tests via `npm test` to make sure everything is passing 44 | 45 | 9. Push up your new branch to your forked repo 46 | 47 | 10. In GitHub, send a pull request to `avrgirl-arduino:master`. Include an explanation of what you did, and reference any issues if they are related. 48 | 49 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Suz Hinton 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Build Status](https://travis-ci.org/noopkat/avrgirl-arduino.svg?branch=master)](https://travis-ci.org/noopkat/avrgirl-arduino) [![Coverage Status](https://coveralls.io/repos/noopkat/avrgirl-arduino/badge.svg?branch=master&service=github)](https://coveralls.io/github/noopkat/avrgirl-arduino?branch=master) 2 | 3 | # avrgirl-arduino 4 | 5 | A NodeJS library for flashing compiled sketch files to Arduino microcontroller boards. 6 | 7 | 🆕[Alpha release of web serial support](tests/demos/webserial) for some Arduino boards 🆕 8 | 9 | **Want to [contribute](CONTRIBUTING.md)?** 10 | 11 | **Own a supported Arduino and want to be a test pilot for this project with two minutes of your time?** 12 | 13 | 1. Run `npm install -g avrgirl-arduino@latest` in your terminal. 14 | 2. Type `avrgirl-arduino test-pilot`, hit enter / return key and follow the prompts. 15 | 3. Thank you, friend :heart: 16 | 17 | ![logo](http://i.imgur.com/AAvwp0F.png) 18 | 19 | ## What is this? 20 | 21 | avrgirl-arduino is a NodeJS library written to present a convenient way to upload precompiled sketches to an Arduino. avrgirl-arduino supports a selection of Arduino boards. 22 | 23 | The current supported list: 24 | 25 | + **Arduino Uno** 26 | + **Arduino Mega** 27 | + **Arduino ADK** 28 | + **Arduino Leonardo** 29 | + **Arduino Micro** 30 | + **Arduino Nano** 31 | + **Arduino Duemilanove (168)** 32 | + **Arduino Pro Mini** 33 | + **Arduino Lilypad USB** 34 | + **Arduino Yun** 35 | + **Arduino Esplora** 36 | + **Femtoduino IMUduino** 37 | + **RedBearLab Blend Micro** 38 | + **Tinyduino** 39 | + **Sparkfun Pro Micro** 40 | + **Qtechknow Qduino** 41 | + **Pinoccio Scout** 42 | + **Adafruit Feather 32u4 Basic Proto** 43 | + **Arduboy** 44 | + **Adafruit Circuit Playground** 45 | + **BQ Zum** 46 | + **BQ ZUM Core 2** 47 | + **BQ ZUM Core 2** 48 | 49 | 50 | This library is designed to ultimately be rolled into the avrgirl project (in development), however it still works perfectly well as a stand-alone package to be used outside of avrgirl if you wish. 51 | 52 | ## How to install 53 | 54 | 1. Install NodeJS from [nodejs.org](http://nodejs.org) 55 | 2. Run `npm install avrgirl-arduino` in your shell of choice 56 | 57 | ## For Windows users 58 | 59 | Before using your Arduino with avrgirl-arduino on Windows XP, 7, and 8, you may need to install the Arduino drivers included with the Arduino IDE. You can follow steps 1-4 on [this guide](https://www.arduino.cc/en/Guide/Windows) to install the [Arduino IDE](https://www.arduino.cc/en/Main/Software) and activate the [relevant drivers](https://www.arduino.cc/en/Guide/Windows#toc4). After step 4 of the guide (drivers) you will be ready to use your Arduino with avrgirl! 60 | 61 | ## How do I use it? 62 | 63 | Your first task is to source a pre-compiled .hex file of the sketch you're interested in uploading to your Arduino. It needs to be compiled for your specific Arduino. You'll find some example hex files for each board within the `junk/hex` folder of this repo, however if you'd like to use your own, [see this guide](#sourcing-a-compiled-arduino-hex-file) if you're unsure of how to go about this. 64 | 65 | Already have a .hex file in a Buffer object ready to go? No problem! Pass this Buffer object in instead of the file path string, and avrgirl-arduino will take care of the rest. Hooray! 66 | 67 | Don't forget to plug your supported Arduino of choice into an available USB port on your computer! 68 | 69 | Wanna use this in the CLI? See [this section](#can-i-use-avrgirl-arduino-as-a-cli-tool). 70 | 71 | The following example code should get you up and running with an Arduino Uno: 72 | 73 | ```javascript 74 | var Avrgirl = require('avrgirl-arduino'); 75 | 76 | var avrgirl = new Avrgirl({ 77 | board: 'uno' 78 | }); 79 | 80 | avrgirl.flash('Blink.cpp.hex', function (error) { 81 | if (error) { 82 | console.error(error); 83 | } else { 84 | console.info('done.'); 85 | } 86 | }); 87 | 88 | ``` 89 | 90 | When creating `new Avrgirl()`, only the `board` property is required. The board names to use are detailed in the table below: 91 | 92 | |Programmer|Board Option String| 93 | |:----------|:--------------| 94 | |Arduino Uno|`uno`| 95 | |Arduino Mega|`mega`| 96 | |Arduino ADK|`adk`| 97 | |Arduino Leonardo|`leonardo`| 98 | |Arduino Micro|`micro`| 99 | |Arduino Nano|`nano`| 100 | |Arduino Nano (with new bootloader)|`nano (new bootloader)`| 101 | |Arduino Lilypad USB|`lilypad-usb`| 102 | |Arduino Duemilanove|`duemilanove168`| 103 | |Arduino Yun|`yun`| 104 | |Arduino Esplora|`esplora`| 105 | |RedBearLab Blend Micro|`blend-micro`| 106 | |Tiny Circuits Tinyduino|`tinyduino`| 107 | |SparkFun Pro Micro|`sf-pro-micro`| 108 | |Qtechknow Qduino|`qduino`| 109 | |Pinoccio Scout|`pinoccio`| 110 | |Femtoduino IMUduino|`imuduino`| 111 | |Adafruit Feather 32u4 Basic Proto|`feather`| 112 | |Arduboy|`arduboy`| 113 | |Adafruit Circuit Playground|`circuit-playground-classic`| 114 | |BQ ZUM|`bqZum`| 115 | |BQ ZUM Core 2|`zumcore2`| 116 | |BQ ZUM Junior|`zumjunior`| 117 | 118 | You can optionally specify a port to connect to the Arduino, but if you omit this property avrgirl-arduino will do a pretty good job of finding it for you. **The exception to this is if you're using the Arduino Pro Mini - please specify your port in this case as avrgirl-arduino cannot auto detect it for you.** 119 | 120 | Specifying the port would look something like this: 121 | 122 | ```javascript 123 | var avrgirl = new Avrgirl({ 124 | board: 'uno', 125 | port: '/dev/cu.usbmodem1412' 126 | }); 127 | ``` 128 | 129 | You can list available USB ports programmatically using the the `list` method: 130 | 131 | ```javascript 132 | Avrgirl.list(function(err, ports) { 133 | console.log(ports); 134 | /* 135 | [ { comName: '/dev/cu.usbmodem1421', 136 | manufacturer: 'Arduino (www.arduino.cc)', 137 | serialNumber: '55432333038351F03170', 138 | pnpId: '', 139 | locationId: '0x14200000', 140 | vendorId: '0x2341', 141 | productId: '0x0043', 142 | _standardPid: '0x0043' } ] 143 | */ 144 | }); 145 | ``` 146 | 147 | Alternatively, you can use the CLI to list active ports: 148 | 149 | ``` 150 | $ avrgirl-arduino list 151 | [ { comName: '/dev/cu.usbmodem1421', 152 | manufacturer: 'Arduino (www.arduino.cc)', 153 | serialNumber: '55432333038351F03170', 154 | pnpId: '', 155 | locationId: '0x14200000', 156 | vendorId: '0x2341', 157 | productId: '0x0043', 158 | _standardPid: '0x0043' } ] 159 | ``` 160 | 161 | **Like logs?** Turn on debug mode to see simple flashing progress logs in the console: 162 | 163 | ```javascript 164 | var avrgirl = new Avrgirl({ 165 | board: 'uno', 166 | // turn on debug mode! 167 | debug: true 168 | }); 169 | ``` 170 | 171 | A sample: 172 | 173 | ``` 174 | found uno on port /dev/cu.usbmodem14141 175 | connected 176 | flashing, please wait... 177 | flash complete. 178 | ``` 179 | 180 | **Prefer your own custom debug behaviour?** No Problem! 181 | 182 | You can pass in your own debug function instead of a boolean, and avrgirl-arduino will run that instead. 183 | 184 | Example: 185 | 186 | ```javascript 187 | var myCustomDebug = function(debugLogString) { 188 | // do your own debug stuff in here 189 | } 190 | 191 | var avrgirl = new Avrgirl({ 192 | board: 'uno', 193 | // turn on debug with your own function 194 | debug: myCustomDebug 195 | }); 196 | ``` 197 | 198 | **Have a device that requires a manual reset?** 199 | 200 | You can pass in a `manualReset` property as a boolean, in either your custom board object _or_ in the general Avrgirl options. This will skip the reset flow when flashing the board. Please note that this is only available for use with boards that speak the AVR109 protocol (most ATMega32U4 powered boards). 201 | 202 | 203 | Example without custom board: 204 | 205 | ```javascript 206 | var avrgirl = new Avrgirl({ 207 | board: 'leonardo', 208 | // you can put it here: 209 | manualReset: true 210 | }); 211 | ``` 212 | 213 | Example with custom board: 214 | 215 | ```javascript 216 | var board = { 217 | name: 'micro', 218 | baud: 57600, 219 | signature: new Buffer([0x43, 0x41, 0x54, 0x45, 0x52, 0x49, 0x4e]), 220 | productId: ['0x0037', '0x8037', '0x0036'], 221 | protocol: 'avr109', 222 | // or you can put it here: 223 | manualReset: true 224 | }; 225 | 226 | 227 | var avrgirl = new Avrgirl({ 228 | board: board 229 | }); 230 | ``` 231 | 232 | **Want to Disable Code Verification?** 233 | 234 | You can pass in a `disableVerify` property as a boolean, in either your custom board object _or_ in the general Avrgirl options. This will skip the Verification after flashing the board. Please note that this is only available for use with boards that speak the AVR109 protocol (most ATMega32U4 powered boards). 235 | 236 | 237 | Example without custom board: 238 | 239 | ```javascript 240 | var avrgirl = new Avrgirl({ 241 | board: 'leonardo', 242 | // you can put it here: 243 | disableVerify: true 244 | }); 245 | ``` 246 | 247 | Example with custom board: 248 | 249 | ```javascript 250 | var board = { 251 | name: 'micro', 252 | baud: 57600, 253 | signature: new Buffer([0x43, 0x41, 0x54, 0x45, 0x52, 0x49, 0x4e]), 254 | productId: ['0x0037', '0x8037', '0x0036'], 255 | protocol: 'avr109', 256 | // or you can put it here: 257 | disableVerify: true 258 | }; 259 | 260 | 261 | var avrgirl = new Avrgirl({ 262 | board: board 263 | }); 264 | ``` 265 | 266 | ## Can I use avrgirl-arduino as a CLI tool? 267 | 268 | ### You sure can! 269 | 270 | Run `npm install -g avrgirl-arduino` in a shell session to install globally for easy CLI use. 271 | 272 | The same example above would look like the following as a CLI call in your shell: 273 | 274 | `avrgirl-arduino flash -f Blink.cpp.hex -a uno` 275 | 276 | Required flags: 277 | 278 | + **-f** specify the location of the hex file to flash 279 | + **-a** specify the spcification of the Arduino. It can be: 280 | + the name of the Arduino (`uno`, `mega`,`leonardo`, `micro`, `nano`, `"nano (new bootloader)"`, `pro-mini`, `duemilanove168`, `yun`, `esplora`, `blend-micro`, `tinyduino`, `sf-pro-micro`, `qduino`, `pinoccio`, `feather`, or `imuduino`) 281 | + a JavaScript file describing a custom board 282 | 283 | When using a custom board, the JavaScript file must export the board specification: 284 | 285 | ```javascript 286 | var board = { 287 | name: 'micro', 288 | baud: 57600, 289 | signature: new Buffer([0x43, 0x41, 0x54, 0x45, 0x52, 0x49, 0x4e]), 290 | productId: ['0x0037', '0x8037', '0x0036'], 291 | protocol: 'avr109', 292 | }; 293 | 294 | module.exports = board; 295 | ``` 296 | 297 | Optional flags: 298 | 299 | + **-p** will allow you to specify the port where your Arduino is plugged in. **Remember to specify your port if using an Arduino Pro Mini.** 300 | + **-v** will turn on debug/verbose mode, which will print a log of things when you run the command. 301 | 302 | You can also list the supported boards: 303 | 304 | `avrgirl-arduino boards` 305 | 306 | As well as listing all available USB devices on your computer: 307 | 308 | `avrgirl-arduino list` 309 | 310 | The output will be presented in JSON format, very similar to the output of the `Serialport.list()` method (if you've used [node-serialport](https://github.com/voodootikigod/node-serialport) before). 311 | 312 | ## Custom board specification 313 | 314 | When specifying a custom board object, a number of properties must be provided: 315 | 316 | + `name`: the name of the board, used in debug and error messages 317 | + `baud`: the data rate for data transmission 318 | + `signature`: a `Buffer` containing the device signature 319 | + `productId`: an array of valid USB product IDs for the board 320 | + `protocol`: the board communication protocol (`avr109`, `stk500v1` and `stk500v2` are currently supported) 321 | 322 | If using the `stk500v2` protocol, you also need to specify: 323 | 324 | + `pageSize`: the size of the page used to load programs 325 | 326 | The other board specification properties are optional. You may look at `boards.js` for more details. 327 | 328 | ## Sourcing a compiled Arduino hex file 329 | 330 | A .hex file is the compiled end result of an Arduino sketch file. I have provided some example hex files for each board within the `junk/hex` folder of this repo. Feel free to use these, or if you're after something specific not provided, see the directions below. 331 | 332 | The most common way to compile a sketch for your Arduino of choice is to download and install the [Arduino IDE](https://www.arduino.cc/en/Main/Software). Ensure you install version 1.6.5 or greater for the following steps. 333 | 334 | 1. Open the sketch file you'd like to export, or write a new one if you need to. 335 | 2. Choose the correct target Arduino board you want to compile the hex file for, from the Tools -> Board menu. 336 | 3. Export your hex file by navigating to Sketch -> Export compiled binary 337 | ![screenshot of the Sketch menu in Arduino IDE with Export compiled binary menu item highlighted in blue](http://f.cl.ly/items/0r1A082H3U3G0U2z1Z40/export_bin.png) 338 | 4. You can find the exported hex file in the same directory your sketch file is located in. 339 | 340 | ## Acknowledgements 341 | 342 | Credit to [Jacob Rosenthal](https://github.com/jacobrosenthal), [Ryan Day](https://github.com/soldair), and [Elijah Insua](https://github.com/tmpvar) for a lot of the heavy lifting going on underneath in this library. 343 | 344 | ## Contributors 345 | 346 | + [Arek Sredzki](https://github.com/ArekSredzki) 347 | + [Pawel Szymczykowski](https://github.com/makenai) 348 | + [Andrew 'AJ' Fisher](https://github.com/ajfisher) 349 | + [Derek Wheelden](https://github.com/frxnz) 350 | + [Byron Hulcher](https://github.com/byronhulcher) 351 | + [Luis Montes](https://github.com/monteslu) 352 | + [Ryan Braganza](https://github.com/ryanbraganza) 353 | + [Alvaro Sanchez](https://github.com/alvarosBQ) 354 | + [Francis Gulotta](https://github.com/reconbot) 355 | + [Tom Calvo](https://github.com/tocalvo) 356 | + [Kimio Kosaka](https://github.com/kimio-kosaka) 357 | + [Sandeep Mistry](https://github.com/sandeepmistry) 358 | + [Nick Hehr](https://github.com/hipsterbrown) 359 | -------------------------------------------------------------------------------- /avrgirl-arduino-browser.js: -------------------------------------------------------------------------------- 1 | var boards = require('./boards'); 2 | var Connection = require('./lib/connection-browser'); 3 | var protocols = require('./lib/protocols'); 4 | var AvrgirlArduino = require('./avrgirl-arduino'); 5 | 6 | module.exports = AvrgirlArduino(boards, Connection, protocols); 7 | 8 | -------------------------------------------------------------------------------- /avrgirl-arduino-node.js: -------------------------------------------------------------------------------- 1 | var boards = require('./boards'); 2 | var Connection = require('./lib/connection'); 3 | var protocols = require('./lib/protocols'); 4 | var AvrgirlArduino = require('./avrgirl-arduino'); 5 | 6 | module.exports = AvrgirlArduino(boards, Connection, protocols); 7 | 8 | -------------------------------------------------------------------------------- /avrgirl-arduino.js: -------------------------------------------------------------------------------- 1 | var injectDependencies = function(boards, Connection, protocols) { 2 | var EventEmitter = require('events'); 3 | var util = require('util'); 4 | var tools = require('./lib/tools'); 5 | /** 6 | * Constructor 7 | * 8 | * @param {object} opts - options for consumer to pass in 9 | */ 10 | var AvrgirlArduino = function(opts) { 11 | opts = opts || {}; 12 | 13 | this.options = { 14 | debug: opts.debug || false, 15 | megaDebug: opts.megaDebug || false, 16 | board: opts.board || 'uno', 17 | port: opts.port || '', 18 | manualReset: opts.manualReset || false, 19 | disableVerify: opts.disableVerify || false 20 | }; 21 | 22 | // this here checks for 3 conditions: 23 | // if debug option is simply true, we want to fall back to default debug function 24 | // if a custom debug function is passed in, we want to assign debug to be that 25 | // if debug option is false, then run debug as a no-op 26 | if (this.options.debug === true) { 27 | this.debug = this.options.debug = console.log.bind(console); 28 | } else if (typeof this.options.debug === 'function') { 29 | this.debug = this.options.debug = this.options.debug; 30 | } else { 31 | this.debug = this.options.debug = function debugNoop() {}; 32 | } 33 | 34 | // handle 'sparse' boards, ie. boards with only the 'name' property defined 35 | if (typeof this.options.board === 'object') { 36 | const properties = Object.getOwnPropertyNames(this.options.board); 37 | if ((properties.length === 1) && (properties[0] === 'name')) { 38 | this.options.board = this.options.board.name; 39 | } 40 | } 41 | 42 | if (typeof this.options.board === 'string') { 43 | this.options.board = boards[this.options.board]; 44 | } 45 | 46 | if (this.options.board && !this.options.board.manualReset) { 47 | this.options.board.manualReset = this.options.manualReset; 48 | } 49 | 50 | if (this.options.board && !this.options.board.disableVerify) { 51 | this.options.board.disableVerify = this.options.disableVerify; 52 | } 53 | 54 | this.connection = new Connection(this.options); 55 | 56 | if (this.options.board) { 57 | var Protocol = protocols[this.options.board.protocol] || function() {}; 58 | 59 | this.protocol = new Protocol({ 60 | board: this.options.board, 61 | connection: this.connection, 62 | debug: this.debug, 63 | megaDebug: this.options.megaDebug 64 | }); 65 | } 66 | 67 | EventEmitter.call(this); 68 | }; 69 | 70 | util.inherits(AvrgirlArduino, EventEmitter); 71 | 72 | /** 73 | * Validates the board properties 74 | * 75 | * @param {function} callback - function to run upon completion/error 76 | */ 77 | AvrgirlArduino.prototype._validateBoard = function(callback) { 78 | if (typeof this.options.board !== 'object') { 79 | // cannot find a matching board in supported list 80 | return callback(new Error('"' + this.options.board + '" is not a supported board type.')); 81 | 82 | } else if (!this.protocol.chip) { 83 | // something went wrong trying to set up the protocol 84 | var errorMsg = 'not a supported programming protocol: ' + this.options.board.protocol; 85 | return callback(new Error(errorMsg)); 86 | 87 | } else if (!this.options.port && this.options.board.name === 'pro-mini') { 88 | // when using a pro mini, a port is required in the options 89 | return callback(new Error('using a pro-mini, please specify the port in your options.')); 90 | 91 | } else { 92 | // all good 93 | return callback(null); 94 | } 95 | }; 96 | 97 | /** 98 | * Public method for flashing a hex file to the main program allocation of the Arduino 99 | * 100 | * @param {string} file - path to hex file for uploading 101 | * @param {function} callback - function to run upon completion/error 102 | */ 103 | AvrgirlArduino.prototype.flash = function(file, callback) { 104 | var _this = this; 105 | 106 | // validate board properties first 107 | _this._validateBoard(function(error) { 108 | if (error) { return callback(error); } 109 | 110 | // set up serialport connection 111 | _this.connection._init(function(error) { 112 | if (error) { return callback(error); } 113 | 114 | // upload file to board 115 | _this.protocol._upload(file, callback); 116 | }); 117 | }); 118 | }; 119 | 120 | /** 121 | * Return a list of devices on serial ports. In addition to the output provided 122 | * by SerialPort.list, it adds a platform independent PID in _pid 123 | * 124 | * @param {function} callback - function to run upon completion/error 125 | */ 126 | AvrgirlArduino.prototype.listPorts = AvrgirlArduino.listPorts = 127 | AvrgirlArduino.prototype.list = AvrgirlArduino.list = function(callback) { 128 | return Connection.prototype._listPorts(callback); 129 | }; 130 | 131 | /** 132 | * Static method to return the names of all known boards. 133 | */ 134 | AvrgirlArduino.listKnownBoards = function() { 135 | // filter the boards to find all non-aliases 136 | return Object.keys(boards).filter(function(name) { 137 | // fetch the current board aliases 138 | var aliases = boards[name].aliases; 139 | // only allow the name if it's not an alias 140 | return !aliases || !~aliases.indexOf(name); 141 | }); 142 | }; 143 | 144 | // shift public static exposure for demo purposes 145 | AvrgirlArduino.prototype.tools = tools; 146 | 147 | return AvrgirlArduino; 148 | }; 149 | 150 | module.exports = injectDependencies; 151 | 152 | -------------------------------------------------------------------------------- /bin/cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | var Avrgirl = require('../'); 3 | var boards = require('../boards'); 4 | var parseArgs = require('minimist'); 5 | var path = require('path'); 6 | var child = require('child_process'); 7 | var testPilot = require('../lib/test-pilot-checker'); 8 | var fs = require('fs'); 9 | 10 | var args = (process.argv.slice(2)); 11 | var argv = parseArgs(args, {}); 12 | var userAction = argv._[0]; 13 | var help = 'Usage:\n' + 14 | ' avrgirl-arduino flash -f -a [-p ] [-v]\n' + 15 | ' avrgirl-arduino boards\n' + 16 | ' avrgirl-arduino list\n' + 17 | ' avrgirl-arduino test-pilot'; 18 | 19 | function showHelp() { 20 | console.log(help); 21 | } 22 | 23 | function flash(file, options) { 24 | var avrgirl = new Avrgirl(options); 25 | var filepath = path.resolve(process.cwd(), file); 26 | 27 | avrgirl.flash(filepath, function(error) { 28 | if (error) { 29 | console.error(error); 30 | process.exit(1); 31 | } 32 | }); 33 | } 34 | 35 | function handlePotentialCustomBoardFile(filename) { 36 | const filepath = path.resolve(process.cwd(), filename); 37 | 38 | if (!fs.existsSync(filepath)) { 39 | // let's try to provide a more precise error if it looks like a real filename 40 | if (filename.includes('.') || filename.includes(path.sep)) { 41 | console.error(new Error('Oops! We could not read the custom board file.')); 42 | process.exit(1); 43 | } 44 | return; 45 | } 46 | 47 | const board = require(filepath); 48 | 49 | if (!board) { 50 | console.error(new Error('Oops! It seems like the custom board file does not export \'board\'.')); 51 | process.exit(1); 52 | } 53 | 54 | return board; 55 | } 56 | 57 | function handleInput(action, argz) { 58 | switch (action) { 59 | case 'flash': { 60 | if (!argz.f || !argz.a) { 61 | showHelp(); 62 | process.exit(1); 63 | } else { 64 | const arduino = argz.a; 65 | let board = boards[arduino] || handlePotentialCustomBoardFile(arduino); 66 | 67 | if (!board) { 68 | console.error(new Error('Oops! That board is not supported, sorry.')); 69 | process.exit(1); 70 | } 71 | // run flash function here if all is well 72 | var options = { 73 | board: board, 74 | port: argz.p || '', 75 | debug: argz.v || false 76 | }; 77 | 78 | flash(argz.f, options); 79 | } 80 | 81 | break; 82 | } 83 | 84 | case 'boards': { 85 | var boardNames = Object.keys(boards).sort(); 86 | console.log('Supported Boards:\n - ' + boardNames.join('\n - ')); 87 | break; 88 | } 89 | 90 | case 'list': { 91 | Avrgirl.listPorts(function(err, ports) { 92 | console.log(ports); 93 | }); 94 | 95 | break; 96 | } 97 | 98 | case 'help': { 99 | showHelp(); 100 | process.exit(); 101 | break; 102 | } 103 | 104 | case 'test-pilot': { 105 | console.log('running preflight check...'); 106 | testPilot.checkForInstall(function(err, isInstalled) { 107 | if (isInstalled) { 108 | testPilot.run(); 109 | } else { 110 | console.log('installing test pilot, won\'t be long...'); 111 | testPilot.install(function(err) { 112 | if (err) { 113 | var msg = err; 114 | if (err.code === 'EACCES' || err.code === 'EPERM') { 115 | msg = new Error('Oops! We ran into a permissions issue... you might want to check out this resource https://docs.npmjs.com/getting-started/fixing-npm-permissions'); 116 | } 117 | return console.log(msg); 118 | } else { 119 | testPilot.run(); 120 | } 121 | }); 122 | } 123 | }); 124 | break; 125 | } 126 | 127 | default: { 128 | // Invalid or no argument specified, show help and exit with an error status 129 | showHelp(); 130 | process.exit(9); 131 | break; 132 | } 133 | } 134 | } 135 | 136 | handleInput(userAction, argv); 137 | -------------------------------------------------------------------------------- /boards.js: -------------------------------------------------------------------------------- 1 | var boards = [ 2 | { 3 | name: 'uno', 4 | baud: 115200, 5 | signature: Buffer.from([0x1e, 0x95, 0x0f]), 6 | pageSize: 128, 7 | numPages: 256, 8 | timeout: 400, 9 | productId: ['0x0043', '0x7523', '0x0001', '0xea60', '0x6015'], 10 | productPage: 'https://store.arduino.cc/arduino-uno-rev3', 11 | protocol: 'stk500v1' 12 | }, 13 | { 14 | name: 'micro', 15 | baud: 57600, 16 | signature: Buffer.from([0x43, 0x41, 0x54, 0x45, 0x52, 0x49, 0x4e]), 17 | productId: ['0x0037', '0x8037', '0x0036', '0x0237'], 18 | productPage: 'https://store.arduino.cc/arduino-micro', 19 | protocol: 'avr109' 20 | }, 21 | { 22 | name: 'imuduino', 23 | baud: 57600, 24 | signature: Buffer.from([0x43, 0x41, 0x54, 0x45, 0x52, 0x49, 0x4e]), 25 | productId: ['0x0036', '0x8037', '0x8036'], 26 | productPage: 'https://www.kickstarter.com/projects/1265095814/imuduino-wireless-3d-motion-html-js-apps-arduino-p?lang=de', 27 | protocol: 'avr109' 28 | }, 29 | { 30 | name: 'leonardo', 31 | baud: 57600, 32 | signature: Buffer.from([0x43, 0x41, 0x54, 0x45, 0x52, 0x49, 0x4e]), 33 | productId: ['0x0036', '0x8036', '0x800c'], 34 | productPage: 'https://store.arduino.cc/leonardo', 35 | protocol: 'avr109' 36 | }, 37 | { 38 | name: 'arduboy', 39 | baud: 57600, 40 | signature: Buffer.from([0x43, 0x41, 0x54, 0x45, 0x52, 0x49, 0x4e]), 41 | productId: ['0x0036', '0x8036', '0x800c'], 42 | productPage: 'https://arduboy.com/', 43 | protocol: 'avr109' 44 | }, 45 | { 46 | name: 'feather', 47 | baud: 57600, 48 | signature: Buffer.from([0x43, 0x41, 0x54, 0x45, 0x52, 0x49, 0x4e]), 49 | productId: ['0x800c', '0x000c'], 50 | productPage: 'https://www.adafruit.com/feather', 51 | protocol: 'avr109' 52 | }, 53 | { 54 | name: 'little-bits', 55 | baud: 57600, 56 | signature: Buffer.from([0x43, 0x41, 0x54, 0x45, 0x52, 0x49, 0x4e]), 57 | productId: ['0x0036', '0x8036'], 58 | productPage: 'https://littlebits.com/collections/bits-and-accessories/products/arduino-bit', 59 | protocol: 'avr109' 60 | }, 61 | { 62 | name: 'blend-micro', 63 | baud: 57600, 64 | signature: Buffer.from([0x43, 0x41, 0x54, 0x45, 0x52, 0x49, 0x4e]), 65 | productId: ['0x2404'], 66 | productPage: 'https://redbear.cc/product/retired/blend-micro.html', 67 | protocol: 'avr109' 68 | }, 69 | { 70 | name: 'nano', 71 | baud: 57600, 72 | signature: Buffer.from([0x1e, 0x95, 0x0f]), 73 | pageSize: 128, 74 | numPages: 256, 75 | timeout: 400, 76 | productId: ['0x6001', '0x7523'], 77 | productPage: 'https://web.archive.org/web/20150813095112/https://www.arduino.cc/en/Main/ArduinoBoardNano', 78 | protocol: 'stk500v1' 79 | }, 80 | { 81 | name: 'nano (new bootloader)', 82 | baud: 115200, 83 | signature: Buffer.from([0x1e, 0x95, 0x0f]), 84 | pageSize: 128, 85 | numPages: 256, 86 | timeout: 400, 87 | productId: ['0x6001', '0x7523'], 88 | productPage: 'https://store.arduino.cc/arduino-nano', 89 | protocol: 'stk500v1' 90 | }, 91 | { 92 | name: 'duemilanove168', 93 | baud: 19200, 94 | signature: Buffer.from([0x1e, 0x94, 0x06]), 95 | pageSize: 128, 96 | numPages: 128, 97 | timeout: 400, 98 | productId: ['0x6001'], 99 | productPage: 'https://www.arduino.cc/en/Main/arduinoBoardDuemilanove', 100 | protocol: 'stk500v1' 101 | }, 102 | { 103 | name: 'duemilanove328', 104 | baud: 57600, 105 | signature: Buffer.from([0x1e, 0x95, 0x14]), 106 | pageSize: 128, 107 | numPages: 256, 108 | timeout: 400, 109 | productId: ['0x6001'], 110 | productPage: 'https://www.arduino.cc/en/Main/arduinoBoardDuemilanove', 111 | protocol: 'stk500v1' 112 | }, 113 | // the alias is here because of an accidental naming change of the tinyduino 114 | // keeping in for backwards compatibility (SHA 05d65842) 115 | { 116 | name: 'tinyduino', 117 | baud: 57600, 118 | signature: Buffer.from([0x1e, 0x95, 0x0f]), 119 | pageSize: 128, 120 | numPages: 256, 121 | timeout: 400, 122 | productId: ['0x6015'], 123 | productPage: 'https://tinycircuits.com/pages/tinyduino-overview', 124 | protocol: 'stk500v1', 125 | aliases: ['tinduino'] 126 | }, 127 | { 128 | name: 'mega', 129 | baud: 115200, 130 | signature: Buffer.from([0x1e, 0x98, 0x01]), // ATmega2560 131 | pageSize: 256, 132 | delay1: 10, 133 | delay2: 1, 134 | timeout:0xc8, 135 | stabDelay:0x64, 136 | cmdexeDelay:0x19, 137 | synchLoops:0x20, 138 | byteDelay:0x00, 139 | pollValue:0x53, 140 | pollIndex:0x03, 141 | productId: ['0x0042', '0x6001', '0x0010', '0x7523'], 142 | productPage: 'https://store.arduino.cc/mega-2560-r3', 143 | protocol: 'stk500v2' 144 | }, 145 | { 146 | name: 'adk', 147 | baud: 115200, 148 | signature: Buffer.from([0x1e, 0x98, 0x01]), // ATmega2560 149 | pageSize: 256, 150 | delay1: 10, 151 | delay2: 1, 152 | timeout:0xc8, 153 | stabDelay:0x64, 154 | cmdexeDelay:0x19, 155 | synchLoops:0x20, 156 | byteDelay:0x00, 157 | pollValue:0x53, 158 | pollIndex:0x03, 159 | productId: ['0x0044', '0x6001', '0x003F'], 160 | productPage: 'https://store.arduino.cc/arduino-mega-adk-rev3', 161 | protocol: 'stk500v2' 162 | }, 163 | { 164 | name: 'sf-pro-micro', 165 | baud: 57600, 166 | signature: Buffer.from([0x43, 0x41, 0x54, 0x45, 0x52, 0x49, 0x4e]), 167 | productId: ['0x9206', '0x9205', '0x0036'], 168 | productPage: 'https://www.sparkfun.com/products/12640', 169 | protocol: 'avr109' 170 | }, 171 | { 172 | name: 'pro-mini', 173 | baud: 57600, 174 | signature: Buffer.from([0x1e, 0x95, 0x0f]), 175 | pageSize: 128, 176 | numPages: 256, 177 | timeout: 400, 178 | productPage: 'https://store.arduino.cc/arduino-pro-mini', 179 | protocol: 'stk500v1' 180 | }, 181 | { 182 | name: 'qduino', 183 | baud: 57600, 184 | signature: Buffer.from([0x43, 0x41, 0x54, 0x45, 0x52, 0x49, 0x4e]), 185 | productId: ['0x516d', '0x514d'], 186 | productPage: 'https://www.sparkfun.com/products/13614', 187 | protocol: 'avr109' 188 | }, 189 | { 190 | name: 'pinoccio', 191 | baud: 115200, 192 | signature: Buffer.from([0x1e, 0xa8, 0x02]), // ATmega256RFR2 193 | pageSize: 256, 194 | delay1: 10, 195 | delay2: 1, 196 | timeout:0xc8, 197 | stabDelay:0x64, 198 | cmdexeDelay:0x19, 199 | synchLoops:0x20, 200 | byteDelay:0x00, 201 | pollValue:0x53, 202 | pollIndex:0x03, 203 | productId: ['0x6051'], 204 | productPage: 'https://www.mouser.de/new/crowd-supply/crowd-supply-pinoccio-microcontroller/', 205 | protocol: 'stk500v2' 206 | }, 207 | { 208 | name: 'lilypad-usb', 209 | baud: 57600, 210 | signature: Buffer.from([0x43, 0x41, 0x54, 0x45, 0x52, 0x49, 0x4e]), 211 | productId: ['0x9207', '0x9208', '0x1B4F'], 212 | productPage: 'https://www.sparkfun.com/products/12049', 213 | protocol: 'avr109' 214 | }, 215 | { 216 | name: 'yun', 217 | baud: 57600, 218 | signature: Buffer.from([0x43, 0x41, 0x54, 0x45, 0x52, 0x49, 0x4e]), 219 | productId: ['0x0041', '0x8041'], 220 | productPage: 'https://store.arduino.cc/arduino-yun', 221 | protocol: 'avr109' 222 | }, 223 | { 224 | name: 'esplora', 225 | baud: 57600, 226 | signature: Buffer.from([0x43, 0x41, 0x54, 0x45, 0x52, 0x49, 0x4e]), 227 | productId: ['0x003C', '0x803C'], 228 | productPage: 'https://store.arduino.cc/arduino-esplora', 229 | protocol: 'avr109' 230 | }, 231 | { 232 | name: 'circuit-playground-classic', 233 | baud: 57600, 234 | signature: Buffer.from([0x43, 0x41, 0x54, 0x45, 0x52, 0x49, 0x4e]), 235 | productId: ['0x0011', '0x8011'], 236 | productPage: 'https://www.adafruit.com/product/3000', 237 | protocol: 'avr109' 238 | }, 239 | /** BQ - Arduino Based Boards. Used in Bitbloq -> bitbloq.bq.com and Arduino IDE*/ 240 | { 241 | name: 'zumjunior', 242 | baud: 115200, 243 | signature: Buffer.from([0x1e, 0x95, 0x0f]), 244 | pageSize: 128, 245 | numPages: 256, 246 | timeout: 400, 247 | productId: ['0xEA60'], 248 | productPage: 'https://store-de.bq.com/de/zum-kit-junior', 249 | protocol: 'stk500v1' 250 | }, 251 | { 252 | name: 'zumcore2', 253 | baud: 115200, 254 | signature: Buffer.from([0x1e, 0x95, 0x0f]), 255 | pageSize: 128, 256 | numPages: 256, 257 | timeout: 400, 258 | productId: ['0xEA60'], 259 | productPage: 'https://www.bq.com/de/zum-core-2-0', 260 | protocol: 'stk500v1' 261 | }, 262 | { 263 | name: 'bqZum', 264 | baud: 19200, 265 | signature: Buffer.from([0x1e, 0x95, 0x0f]), 266 | pageSize: 128, 267 | numPages: 256, 268 | timeout: 400, 269 | productId: ['0x6001', '0x7523'], 270 | productPage: 'http://diwo.bq.com/zum-bt-328-especificaciones-tecnicas/', 271 | protocol: 'stk500v1' 272 | }, 273 | /** END OF BQ - Arduino Based Boards. Used in Bitbloq -> bitbloq.bq.com and Arduino IDE*/ 274 | 275 | /** START OF Spark Concepts Boards - Arduino Based CNC Controller but uses Atmega328pb (Note 'pb' not 'p' = different signature) https://github.com/Spark-Concepts/xPro-V4 */ 276 | { 277 | name: 'xprov4', 278 | baud: 115200, 279 | signature: Buffer.from([0x1e, 0x95, 0x16]), 280 | pageSize: 128, 281 | numPages: 256, 282 | timeout: 400, 283 | productId: ['0x0043', '0x7523', '0x0001', '0xea60'], 284 | productPage: 'http://www.spark-concepts.com/cnc-xpro-v4-controller/', 285 | protocol: 'stk500v1' 286 | }, 287 | ]; 288 | 289 | /** 290 | * Generate an object with board name keys for faster lookup 291 | * @return {object} byBoardName 292 | */ 293 | function boardLookupTable() { 294 | var byBoard = {}; 295 | for (var i = 0; i < boards.length; i++) { 296 | var currentBoard = boards[i]; 297 | byBoard[currentBoard.name] = currentBoard; 298 | 299 | var aliases = currentBoard.aliases; 300 | if (Array.isArray(aliases)) { 301 | for (var j = 0; j < aliases.length; j++) { 302 | var currentAlias = aliases[j]; 303 | byBoard[currentAlias] = currentBoard; 304 | } 305 | } 306 | } 307 | return byBoard; 308 | } 309 | 310 | module.exports = boardLookupTable(); 311 | -------------------------------------------------------------------------------- /dist/avrgirl-arduino.global.min.js.LICENSE: -------------------------------------------------------------------------------- 1 | /*! 2 | * The buffer module from node.js, for the browser. 3 | * 4 | * @author Feross Aboukhadijeh 5 | * @license MIT 6 | */ 7 | 8 | /*! 9 | * async 10 | * https://github.com/caolan/async 11 | * 12 | * Copyright 2010-2014 Caolan McMahon 13 | * Released under the MIT license 14 | */ 15 | -------------------------------------------------------------------------------- /dist/avrgirl-arduino.min.js.LICENSE: -------------------------------------------------------------------------------- 1 | /*! 2 | * The buffer module from node.js, for the browser. 3 | * 4 | * @author Feross Aboukhadijeh 5 | * @license MIT 6 | */ 7 | 8 | /*! 9 | * async 10 | * https://github.com/caolan/async 11 | * 12 | * Copyright 2010-2014 Caolan McMahon 13 | * Released under the MIT license 14 | */ 15 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var tape = require('gulp-tape'); 3 | var tapSpec = require('tap-spec'); 4 | var jscs = require('gulp-jscs'); 5 | var jshint = require('gulp-jshint'); 6 | var stylish = require('jshint-stylish'); 7 | 8 | function spec() { 9 | return gulp.src(['tests/*.spec.js']) 10 | .pipe(tape({ 11 | reporter: tapSpec() 12 | })); 13 | }; 14 | 15 | function jscs() { 16 | return gulp.src(['tests/*.spec.js', 'tests/helpers/*.js', 'avrgirl-arduino.js', 'lib/*.js'], { base: "./" }) 17 | .pipe(jscs({fix: true})) 18 | .pipe(gulp.dest('.')) 19 | .pipe(jscs.reporter()) 20 | .pipe(jscs.reporter('fail')) 21 | }; 22 | 23 | function lint() { 24 | return gulp.src(['tests/*.spec.js', 'tests/helpers/*.js', 'avrgirl-arduino.js', 'lib/*.js']) 25 | .pipe(jshint()) 26 | .pipe(jshint.reporter('jshint-stylish')) 27 | .pipe(jshint.reporter('fail')); 28 | }; 29 | 30 | exports.spec = spec; 31 | exports.jscs = jscs; 32 | exports.lint = lint; 33 | 34 | var test = gulp.series(spec); 35 | 36 | gulp.task('test', test); 37 | -------------------------------------------------------------------------------- /junk/hex/arduboy/README.md: -------------------------------------------------------------------------------- 1 | this rund game is by the awesome Flaki (@slsoftworks) 2 | https://github.com/flaki/arduboy-rund-ino 3 | -------------------------------------------------------------------------------- /junk/hex/bqZum/Blink.cpp.hex: -------------------------------------------------------------------------------- 1 | :100000000C9461000C947E000C947E000C947E0095 2 | :100010000C947E000C947E000C947E000C947E0068 3 | :100020000C947E000C947E000C947E000C947E0058 4 | :100030000C947E000C947E000C947E000C947E0048 5 | :100040000C949D000C947E000C947E000C947E0019 6 | :100050000C947E000C947E000C947E000C947E0028 7 | :100060000C947E000C947E00000000002400270009 8 | :100070002A0000000000250028002B0000000000DE 9 | :1000800023002600290004040404040404040202DA 10 | :100090000202020203030303030301020408102007 11 | :1000A0004080010204081020010204081020000012 12 | :1000B0000007000201000003040600000000000029 13 | :1000C000000011241FBECFEFD8E0DEBFCDBF11E08E 14 | :1000D000A0E0B1E0EAE3F4E002C005900D92A230A6 15 | :1000E000B107D9F711E0A2E0B1E001C01D92AB3039 16 | :1000F000B107E1F70E940C020C941B020C94000063 17 | :100100008091000161E00E94B80168EE73E080E038 18 | :1001100090E00E94E5008091000160E00E94B8013B 19 | :1001200068EE73E080E090E00E94E5000895809121 20 | :10013000000161E00E94790108951F920F920FB6AD 21 | :100140000F9211242F933F938F939F93AF93BF935D 22 | :100150008091060190910701A0910801B0910901D9 23 | :1001600030910A010196A11DB11D232F2D5F2D375E 24 | :1001700020F02D570196A11DB11D20930A018093F7 25 | :10018000060190930701A0930801B09309018091A3 26 | :10019000020190910301A0910401B0910501019623 27 | :1001A000A11DB11D8093020190930301A09304014E 28 | :1001B000B0930501BF91AF919F918F913F912F9186 29 | :1001C0000F900FBE0F901F9018959B01AC017FB749 30 | :1001D000F8948091020190910301A0910401B091E3 31 | :1001E000050166B5A89B05C06F3F19F00196A11DDA 32 | :1001F000B11D7FBFBA2FA92F982F8827860F911D79 33 | :10020000A11DB11D62E0880F991FAA1FBB1F6A952F 34 | :10021000D1F7BC012DC0FFB7F894809102019091F5 35 | :100220000301A0910401B0910501E6B5A89B05C0AA 36 | :10023000EF3F19F00196A11DB11DFFBFBA2FA92FE5 37 | :10024000982F88278E0F911DA11DB11DE2E0880F08 38 | :10025000991FAA1FBB1FEA95D1F7861B970B885ED3 39 | :100260009340C8F2215030404040504068517C4F8C 40 | :10027000211531054105510571F60895789484B52D 41 | :10028000826084BD84B5816084BD85B5826085BD92 42 | :1002900085B5816085BDEEE6F0E080818160808378 43 | :1002A000E1E8F0E01082808182608083808181605B 44 | :1002B0008083E0E8F0E0808181608083E1EBF0E022 45 | :1002C000808184608083E0EBF0E0808181608083C6 46 | :1002D000EAE7F0E0808184608083808182608083AF 47 | :1002E0008081816080838081806880831092C100DA 48 | :1002F0000895CF93DF93482F50E0CA0186569F4F51 49 | :10030000FC0134914A575F4FFA018491882369F1C7 50 | :1003100090E0880F991FFC01E859FF4FA591B49117 51 | :10032000FC01EE58FF4FC591D491662351F42FB7CD 52 | :10033000F8948C91932F909589238C9388818923AD 53 | :100340000BC0623061F42FB7F8948C91932F909585 54 | :1003500089238C938881832B88832FBF06C09FB706 55 | :10036000F8948C91832B8C939FBFDF91CF9108954C 56 | :10037000482F50E0CA0182559F4FFC012491CA01C9 57 | :1003800086569F4FFC0194914A575F4FFA01349172 58 | :10039000332309F440C0222351F1233071F024307B 59 | :1003A00028F42130A1F0223011F514C02630B1F02C 60 | :1003B0002730C1F02430D9F404C0809180008F77B9 61 | :1003C00003C0809180008F7D8093800010C084B531 62 | :1003D0008F7702C084B58F7D84BD09C08091B00045 63 | :1003E0008F7703C08091B0008F7D8093B000E32FA2 64 | :1003F000F0E0EE0FFF1FEE58FF4FA591B4912FB71D 65 | :10040000F894662321F48C919095892302C08C91F5 66 | :10041000892B8C932FBF0895CF93DF930E943E01C9 67 | :100420000E949700C0E0D0E00E9480002097E1F396 68 | :0A0430000E940000F9CFF894FFCFFE 69 | :02043A000D00B3 70 | :00000001FF 71 | -------------------------------------------------------------------------------- /junk/hex/circuit-playground-classic/Blink.cpp.hex: -------------------------------------------------------------------------------- 1 | :100000000C94E6000C940E010C940E010C940E015D 2 | :100010000C940E010C940E010C940E010C940E0124 3 | :100020000C940E010C940E010C9403040C946C04BB 4 | :100030000C940E010C940E010C940E010C940E0104 5 | :100040000C940E010C940E010C940E010C940E01F4 6 | :100050000C940E010C940E010C940E010C94BB0632 7 | :100060000C940E010C940E010C940E010C940E01D4 8 | :100070000C940E010C940E010C940E010C940E01C4 9 | :100080000C940E010C940E010C940E010C940E01B4 10 | :100090000C940E010C940E010C940E010C940E01A4 11 | :1000A0000C940E010C940E010C940E0136013901D2 12 | :1000B00028012C0130015A015A015A013D01410128 13 | :1000C00045014B014F015A01550100000000240079 14 | :1000D00027002A002D003000080B00020202010058 15 | :1000E000090400000102020000052400100105249B 16 | :1000F000010101042402060524060001070581030D 17 | :1001000010004009040100020A0000000705020275 18 | :100110004000000705830240000004030904416415 19 | :100120006166727569740043697263756974205001 20 | :100130006C617967726F756E6400120100020000D5 21 | :1001400000409A2311800001010203011201000204 22 | :10015000EF0201409A231180000101020301000017 23 | :100160000000250028002B002E00310004040404A8 24 | :10017000040304050202020204030202020206064C 25 | :100180000606060604040202020404040802011022 26 | :1001900040804010204080408008020401804020C0 27 | :1001A00010020110801020404020000000020009D1 28 | :1001B0000F0000030401000C00000000000000001C 29 | :1001C00000000000000000000000050711241FBE11 30 | :1001D000CFEFDAE0DEBFCDBF11E0A0E0B1E0E2EFAB 31 | :1001E000FFE002C005900D92A432B107D9F721E0DB 32 | :1001F000A4E2B1E001C01D92A439B207E1F710E01A 33 | :10020000C6EED0E004C02197FE010E94EC07C53E77 34 | :10021000D107C9F70E941A070C94F7070C94000045 35 | :10022000E7EBF1E04491E8E9F1E02491E9E7F1E05E 36 | :100230009491992309F451C04423E1F150E0FA016B 37 | :100240003197EF30F105B0F5EA5AFF4F0C94EC0707 38 | :10025000309180003F7707C0309180003F7D03C020 39 | :1002600030918000377F3093800024C034B53F77D1 40 | :1002700002C034B53F7D34BD1DC0309190003F7742 41 | :1002800007C0309190003F7D03C030919000377FD0 42 | :10029000309390000FC03091C0003F7703C0309181 43 | :1002A000C0003F7D3093C00005C03091C200377F51 44 | :1002B0003093C200E92FF0E0EE0FFF1FE25AFE4F2D 45 | :1002C000A591B4919FB7F894EC91811103C020954A 46 | :1002D0002E2301C02E2B2C939FBF0895FC018091EB 47 | :1002E0009301811103C08FEF9FEF08959FB7F8949A 48 | :1002F00082E08093E9002091F20030E012161306AC 49 | :1003000014F421E030E02115310551F084E68093AA 50 | :1003100092018091F10080838091F200882319F08E 51 | :100320009FBFC90108958BE68093E800F9CFCF9273 52 | :10033000DF92EF92FF920F931F93CF93DF936C01A5 53 | :100340007A018B01C0E0D0E0CE15DF0589F0D8013D 54 | :100350006D918D01D601ED91FC910190F081E02D20 55 | :10036000C6010995892B11F47E0102C02196ECCFBC 56 | :10037000C701DF91CF911F910F91FF90EF90DF9018 57 | :10038000CF90089580918A0181110DC082E0809301 58 | :10039000860184E080938701109289011092880180 59 | :1003A00081E080938A0186E891E00895CF93DF93FE 60 | :1003B0001F92CDB7DEB76983DC01ED91FC9102801D 61 | :1003C000F381E02D41E050E0BE016F5F7F4F099562 62 | :1003D0000F90DF91CF91089583E08093E9008091A1 63 | :1003E000F200882319F08AE38093E8000895CF9300 64 | :1003F000DF931F92CDB7DEB7FC018485958597FD0D 65 | :1004000005C02FEF3FEF358724870BC0CE01019643 66 | :100410000E946E01019719F4898190E002C08FEF6C 67 | :100420009FEF0F90DF91CF9108950F931F93CF937C 68 | :10043000DF931F92CDB7DEB78C01FC0184859585D3 69 | :1004400097FF0EC0CE0101960E946E01019719F42C 70 | :10045000298130E002C02FEF3FEFF8013587248774 71 | :10046000F801848595850F90DF91CF911F910F91B1 72 | :100470000895FC018485958597FD0BC09FB7F8947E 73 | :1004800082E08093E9008091F2009FBF90E00196A6 74 | :1004900008959FB7F89482E08093E9008091F2007C 75 | :1004A0009FBF90E00895409130015091310120911B 76 | :1004B0002E0130912F0142175307B4F49091E800B8 77 | :1004C0009570E1F39091E80092FD19C08093F100DE 78 | :1004D000809130019091310101968F739927892B7A 79 | :1004E00019F48EEF8093E8008091300190913101F2 80 | :1004F0000196909331018093300181E0089580E06E 81 | :100500000895CF92DF92EF92FF920F931F93CF93B4 82 | :10051000DF931F92CDB7DEB7182F062FE42E862F5C 83 | :10052000880F8E5F99830E94530283E00E945302DA 84 | :10053000F12EC12E9981D92E8C2D8F19801798F408 85 | :10054000F601E7FE02C0849101C080810E9453023F 86 | :10055000182F80E00E9453028123FFEFCF1ADF0A99 87 | :100560008111EACF01C081E00F90DF91CF911F91FF 88 | :100570000F91FF90EF90DF90CF900895DF92EF9270 89 | :10058000FF920F931F93CF93DF93D82E8A017B01A5 90 | :10059000E40EF51EEB01CE15DF0571F0D7FE03C0AA 91 | :1005A000FE01849101C088810E945302219681112D 92 | :1005B000F2CF8FEF9FEF01C0C801DF91CF911F9164 93 | :1005C0000F91FF90EF90DF9008950F931F93CF93BB 94 | :1005D000DF931F92CDB7DEB782E0898342E450E01B 95 | :1005E00068ED70E080E80E94BE020E94C201DC015A 96 | :1005F00012960D911C9113970115110569F0D80100 97 | :10060000ED91FC910280F381E02DBE016F5F7F4F81 98 | :10061000C801099597FF07C089810F90DF91CF919D 99 | :100620001F910F910895F80100851185E5CF3FB71F 100 | :10063000F8948091290190912A01A0912B01B09109 101 | :100640002C0126B5A89B05C02F3F19F00196A11DCE 102 | :10065000B11D3FBFBA2FA92F982F8827820F911D58 103 | :10066000A11DB11DBC01CD0143E0660F771F881F9E 104 | :10067000991F4A95D1F708958F929F92AF92BF929A 105 | :10068000CF92DF92EF92FF926B017C010E941703E1 106 | :100690004B015C01C114D104E104F104F1F00E94AA 107 | :1006A0001703DC01CB0188199909AA09BB09883E07 108 | :1006B0009340A105B10570F321E0C21AD108E10809 109 | :1006C000F10888EE880E83E0981EA11CB11CC114AD 110 | :1006D000D104E104F10419F7DDCFFF90EF90DF9032 111 | :1006E000CF90BF90AF909F908F9008958F929F92E0 112 | :1006F000AF92BF92CF92DF92EF92FF920F931F9330 113 | :10070000CF93DF935C016B018A0180910B018823F9 114 | :1007100009F45DC080919301882309F458C0809149 115 | :10072000350180FF05C08091E00082608093E00089 116 | :10073000E8018AEFF82E93E0E92E2FE3822E3AE3C8 117 | :10074000932E209709F43DC08FB7F894E092E9000A 118 | :100750009091E80095FF06C09091F200282D291B8A 119 | :10076000922F01C090E08FBF91110AC0FA94FF2030 120 | :1007700071F161E070E080E090E00E943C03E1CF25 121 | :10078000292F30E0C217D3070CF49C2F8FB7F894B1 122 | :10079000E092E9002091E80025FF11C0292F30E008 123 | :1007A000C21BD30BF601915020F041914093F10010 124 | :1007B000FACFC20ED31E9091E80095FF12C08FBFF2 125 | :1007C000C0CF84E6809334011016110644F081E016 126 | :1007D00090E0F5019383828380E090E005C0C8013A 127 | :1007E00003C09092E800EBCFDF91CF911F910F9162 128 | :1007F000FF90EF90DF90CF90BF90AF909F908F9041 129 | :1008000008950E94F2071F920F920FB60F921124C3 130 | :100810008F939F938091E1009091E100937F90935B 131 | :10082000E10083FF0FC01092E90091E09093EB008C 132 | :100830001092EC0092E39093ED001092930198E0F7 133 | :100840009093F00082FF1CC093E09093E900909198 134 | :10085000F200992319F09AE39093E8009091340103 135 | :10086000992329F090913401915090933401909103 136 | :100870009201992329F090919201915090939201C5 137 | :1008800084FF10C08091E2008E7E81608093E20040 138 | :100890008091E1008F7E8093E100809135018E7E12 139 | :1008A000806111C080FF11C08091E2008E7E806166 140 | :1008B0008093E2008091E1008E7E8093E100809140 141 | :1008C00035018E7E8160809335019F918F910F90CD 142 | :1008D0000FBE0F901F9018951F920F920FB60F9298 143 | :1008E0001124CF92DF92EF92FF920F931F932F93D9 144 | :1008F0003F934F935F936F937F938F939F93AF93A8 145 | :10090000BF93EF93FF93CF93DF93CDB7DEB76C9791 146 | :10091000DEBFCDBF1092E9008091E80083FF0CC2DA 147 | :10092000FE017596DE2ECF2E88E08E0F8E1729F0F1 148 | :100930009091F10090833196F9CF84E680939201F3 149 | :1009400082EF8093E8008D8987FF05C09091E800D1 150 | :1009500090FFFCCF03C09EEF9093E800982F907615 151 | :1009600009F0C5C09E892F89188D91110CC080385F 152 | :1009700029F4809133018093F10002C01092F100BC 153 | :100980001092F1004EC1422F50E0512B913051F4A2 154 | :10099000811147C14130510509F043C180913301B4 155 | :1009A0008D7F0BC0933061F481113BC14130510503 156 | :1009B00009F037C18091330182608093330131C1E6 157 | :1009C000953041F48091E80080FFFCCF20682093AF 158 | :1009D000E30027C1963009F05EC0EB8CFC8C1092CE 159 | :1009E000E9001092310110923001123091F510920D 160 | :1009F0002F0110922E010E94E50299E0BE016F5F67 161 | :100A00007F4FDB01E92F1D92EA95E9F799831A835D 162 | :100A100091E09E8390EA98879AEF99872091300120 163 | :100A200030913101275F3F4F3C832B838D831092A0 164 | :100A3000E9001092310110923001F0922F01E09202 165 | :100A40002E0149E050E080E00E94BE020E94E502D3 166 | :100A5000E8C0F0922F01E0922E010E94C201DC0159 167 | :100A60001296ED90FC901397E114F10409F4C7C0BD 168 | :100A7000D701ED91FC910480F581E02D6D2D7C2D49 169 | :100A8000C7010995009719F00CF0CBC0CEC0F70153 170 | :100A9000E084F184E9CF973009F4C7C0983021F49D 171 | :100AA00081E08093F100BDC0993009F0BAC0837035 172 | :100AB00009F0BBC0EDE0F1E081E021E036E3908198 173 | :100AC000992361F08093E9002093EB00919190933A 174 | :100AD000EC003093ED008F5F873089F78EE78093CD 175 | :100AE000EA001092EA008F89809393019AC08B8D5F 176 | :100AF0009C8D1092E9001092310110923001909378 177 | :100B00002F0180932E01898D81115FC08E899D896F 178 | :100B1000913A59F4813209F088C047E050E064E02E 179 | :100B200071E080E00E94BE027CC0913209F07DC07D 180 | :100B3000833289F4888D90E0982F88272F89822B23 181 | :100B4000A0E0B0E08093000190930101A093020126 182 | :100B5000B093030166C08032B1F48091E80082FF57 183 | :100B6000FCCFE4E0F1E087E08E0F8E1729F0909142 184 | :100B7000F10090833196F9CF84E6809392018BEF58 185 | :100B80008093E80006C0823209F04BC08F898093C1 186 | :100B90000B0180913201882319F0EEEFFAE002C0D8 187 | :100BA000E0E0F8E08091040190910501A091060138 188 | :100BB000B0910701803B9440A105B10509F0A0C0A8 189 | :100BC00080910B0180FF83C09BC00E94C201DC01A9 190 | :100BD00012960D911C9113970115110531F1D80151 191 | :100BE000ED91FC910190F081E02D6D2D7C2DC801DF 192 | :100BF0000995811116C0F80100851185EDCF1130DE 193 | :100C0000C1F0133091F48F89882309F455C08230E4 194 | :100C1000E9F440E862E187E291E00E9481028823E2 195 | :100C200021F08EEF8093E80087C081E28093EB0093 196 | :100C300083C08B8D9C8D089711F410932D018091AA 197 | :100C40002D01811136C06AE371E038C0813029F48A 198 | :100C500040E868E08EE191E0E0CF833031F70E9418 199 | :100C6000C201DC011296ED90FC9013978E010F5F8C 200 | :100C70001F4F6801E114F10479F0D701ED91FC9167 201 | :100C80000680F781E02DB801C7010995080F111DF5 202 | :100C9000F701E084F184EECFD8011C92F6010190B7 203 | :100CA0000020E9F73197BF016C197D0940E0C601CA 204 | :100CB000B4CF6CE471E002C06AE171E061157105C6 205 | :100CC00009F4B3CFFB01449150E080E82BCFEE3F15 206 | :100CD0002AE0F20731F0808191819093FF0A80939E 207 | :100CE000FE0A87E797E7918380839BE088E10FB650 208 | :100CF000F894A895809360000FBE9093600091CF08 209 | :100D00000FB6F894A8958091600088618093600088 210 | :100D1000109260000FBEA895EE3F8AE0F80739F008 211 | :100D20008091FE0A9091FF0A918380837ACF10927E 212 | :100D3000FF0A1092FE0A75CF6C960FB6F894DEBFCC 213 | :100D40000FBECDBFDF91CF91FF91EF91BF91AF91DA 214 | :100D50009F918F917F916F915F914F913F912F91D3 215 | :100D60001F910F91FF90EF90DF90CF900F900FBEEB 216 | :100D70000F901F9018951F920F920FB60F9211248B 217 | :100D80002F933F938F939F93AF93BF9380912501B0 218 | :100D900090912601A0912701B09128013091240162 219 | :100DA00026E0230F2D3720F40296A11DB11D05C0AA 220 | :100DB00029E8230F0396A11DB11D209324018093E0 221 | :100DC000250190932601A0932701B09328018091DB 222 | :100DD000290190912A01A0912B01B0912C0101963B 223 | :100DE000A11DB11D8093290190932A01A0932B018D 224 | :100DF000B0932C01BF91AF919F918F913F912F9113 225 | :100E00000F900FBE0F901F901895E6E3F1E013824C 226 | :100E1000128288EE93E0A0E0B0E084839583A683FD 227 | :100E2000B78387E191E0918380838FEF9FEF958770 228 | :100E300084870895789484B5826084BD84B5816088 229 | :100E400084BD85B5826085BD85B5816085BD809195 230 | :100E50006E00816080936E0010928100809181000D 231 | :100E60008260809381008091810081608093810005 232 | :100E700080918000816080938000809191008260E9 233 | :100E80008093910080919100816080939100809186 234 | :100E900090008160809390008091C1008460809375 235 | :100EA000C1008091C10082608093C1008091C10027 236 | :100EB00081608093C1008091C30081608093C300F2 237 | :100EC0008091C00082608093C0008091C2008160E8 238 | :100ED0008093C20080917A00846080937A00809130 239 | :100EE0007A00826080937A0080917A008E7F80936E 240 | :100EF0007A0080917A00806880937A001092930142 241 | :100F000010923301109235018091D7008160809357 242 | :100F1000D70080EA8093D80089B58F7E89BD89B5D6 243 | :100F2000826089BD09B400FEFDCF61E070E080E021 244 | :100F300090E00E943C038091D8008F7C8061809378 245 | :100F4000D8008091E000807F8093E0008091E100F4 246 | :100F50008E7E8093E1008DE08093E200EEEFFFE76C 247 | :100F6000859194918B3F9C4D19F481E080933201DF 248 | :100F7000E8E9F1E02491E9E7F1E08491882399F030 249 | :100F800090E0880F991FFC01E653FF4FA591B491A3 250 | :100F9000FC01E25AFE4F859194918FB7F894EC9141 251 | :100FA000E22BEC938FBFC0E0D0E081E00E94100103 252 | :100FB00068EE73E080E090E00E943C0380E00E94D5 253 | :100FC000100168EE73E080E090E00E943C032097FF 254 | :100FD00061F30E940000E9CFEE0FFF1F0590F4912E 255 | :100FE000E02D099481E090E0F8940C94F707F894D0 256 | :020FF000FFCF31 257 | :100FF200FFFFFFFF00E100000000000000C1808150 258 | :1010020000000000000000D60176033902F7011546 259 | :0410120002EC0100EB 260 | :00000001FF 261 | -------------------------------------------------------------------------------- /junk/hex/duemilanove168/Blink.cpp.hex: -------------------------------------------------------------------------------- 1 | :100000000C9461000C947E000C947E000C947E0095 2 | :100010000C947E000C947E000C947E000C947E0068 3 | :100020000C947E000C947E000C947E000C947E0058 4 | :100030000C947E000C947E000C947E000C947E0048 5 | :100040000C949D000C947E000C947E000C947E0019 6 | :100050000C947E000C947E000C947E000C947E0028 7 | :100060000C947E000C947E00000000002400270009 8 | :100070002A0000000000250028002B0000000000DE 9 | :1000800023002600290004040404040404040202DA 10 | :100090000202020203030303030301020408102007 11 | :1000A0004080010204081020010204081020000012 12 | :1000B0000007000201000003040600000000000029 13 | :1000C000000011241FBECFEFD4E0DEBFCDBF11E092 14 | :1000D000A0E0B1E0EAE3F4E002C005900D92A230A6 15 | :1000E000B107D9F711E0A2E0B1E001C01D92AB3039 16 | :1000F000B107E1F70E940C020C941B020C94000063 17 | :100100008091000161E00E94B80168EE73E080E038 18 | :1001100090E00E94E5008091000160E00E94B8013B 19 | :1001200068EE73E080E090E00E94E5000895809121 20 | :10013000000161E00E94790108951F920F920FB6AD 21 | :100140000F9211242F933F938F939F93AF93BF935D 22 | :100150008091060190910701A0910801B0910901D9 23 | :1001600030910A010196A11DB11D232F2D5F2D375E 24 | :1001700020F02D570196A11DB11D20930A018093F7 25 | :10018000060190930701A0930801B09309018091A3 26 | :10019000020190910301A0910401B0910501019623 27 | :1001A000A11DB11D8093020190930301A09304014E 28 | :1001B000B0930501BF91AF919F918F913F912F9186 29 | :1001C0000F900FBE0F901F9018959B01AC017FB749 30 | :1001D000F8948091020190910301A0910401B091E3 31 | :1001E000050166B5A89B05C06F3F19F00196A11DDA 32 | :1001F000B11D7FBFBA2FA92F982F8827860F911D79 33 | :10020000A11DB11D62E0880F991FAA1FBB1F6A952F 34 | :10021000D1F7BC012DC0FFB7F894809102019091F5 35 | :100220000301A0910401B0910501E6B5A89B05C0AA 36 | :10023000EF3F19F00196A11DB11DFFBFBA2FA92FE5 37 | :10024000982F88278E0F911DA11DB11DE2E0880F08 38 | :10025000991FAA1FBB1FEA95D1F7861B970B885ED3 39 | :100260009340C8F2215030404040504068517C4F8C 40 | :10027000211531054105510571F60895789484B52D 41 | :10028000826084BD84B5816084BD85B5826085BD92 42 | :1002900085B5816085BDEEE6F0E080818160808378 43 | :1002A000E1E8F0E01082808182608083808181605B 44 | :1002B0008083E0E8F0E0808181608083E1EBF0E022 45 | :1002C000808184608083E0EBF0E0808181608083C6 46 | :1002D000EAE7F0E0808184608083808182608083AF 47 | :1002E0008081816080838081806880831092C100DA 48 | :1002F0000895CF93DF93482F50E0CA0186569F4F51 49 | :10030000FC0134914A575F4FFA018491882369F1C7 50 | :1003100090E0880F991FFC01E859FF4FA591B49117 51 | :10032000FC01EE58FF4FC591D491662351F42FB7CD 52 | :10033000F8948C91932F909589238C9388818923AD 53 | :100340000BC0623061F42FB7F8948C91932F909585 54 | :1003500089238C938881832B88832FBF06C09FB706 55 | :10036000F8948C91832B8C939FBFDF91CF9108954C 56 | :10037000482F50E0CA0182559F4FFC012491CA01C9 57 | :1003800086569F4FFC0194914A575F4FFA01349172 58 | :10039000332309F440C0222351F1233071F024307B 59 | :1003A00028F42130A1F0223011F514C02630B1F02C 60 | :1003B0002730C1F02430D9F404C0809180008F77B9 61 | :1003C00003C0809180008F7D8093800010C084B531 62 | :1003D0008F7702C084B58F7D84BD09C08091B00045 63 | :1003E0008F7703C08091B0008F7D8093B000E32FA2 64 | :1003F000F0E0EE0FFF1FEE58FF4FA591B4912FB71D 65 | :10040000F894662321F48C919095892302C08C91F5 66 | :10041000892B8C932FBF0895CF93DF930E943E01C9 67 | :100420000E949700C0E0D0E00E9480002097E1F396 68 | :0A0430000E940000F9CFF894FFCFFE 69 | :02043A000D00B3 70 | :00000001FF 71 | -------------------------------------------------------------------------------- /junk/hex/duemilanove328/Blink.cpp.hex: -------------------------------------------------------------------------------- 1 | :100000000C945C000C946E000C946E000C946E00CA 2 | :100010000C946E000C946E000C946E000C946E00A8 3 | :100020000C946E000C946E000C946E000C946E0098 4 | :100030000C946E000C946E000C946E000C946E0088 5 | :100040000C9415010C946E000C946E000C946E00D0 6 | :100050000C946E000C946E000C946E000C946E0068 7 | :100060000C946E000C946E00000000002400270029 8 | :100070002A0000000000250028002B0004040404CE 9 | :100080000404040402020202020203030303030342 10 | :10009000010204081020408001020408102001021F 11 | :1000A00004081020000000080002010000030407FB 12 | :1000B000000000000000000011241FBECFEFD8E0B8 13 | :1000C000DEBFCDBF21E0A0E0B1E001C01D92A930AC 14 | :1000D000B207E1F70E945F010C94CE010C9400007E 15 | :1000E000E1EBF0E02491EDE9F0E09491E9E8F0E053 16 | :1000F000E491EE2309F43BC0222339F1233091F03F 17 | :1001000038F42130A9F0223001F524B52F7D12C03A 18 | :10011000273091F02830A1F02430B9F420918000EC 19 | :100120002F7D03C0209180002F77209380000DC089 20 | :1001300024B52F7724BD09C02091B0002F7703C0CC 21 | :100140002091B0002F7D2093B000F0E0EE0FFF1F54 22 | :10015000EE58FF4FA591B4912FB7F894EC9181110F 23 | :1001600003C090959E2301C09E2B9C932FBF0895A2 24 | :100170003FB7F8948091050190910601A091070185 25 | :10018000B091080126B5A89B05C02F3F19F0019634 26 | :10019000A11DB11D3FBFBA2FA92F982F8827820F0D 27 | :1001A000911DA11DB11DBC01CD0142E0660F771F5D 28 | :1001B000881F991F4A95D1F708958F929F92AF9209 29 | :1001C000BF92CF92DF92EF92FF920E94B8004B0154 30 | :1001D0005C0188EEC82E83E0D82EE12CF12C0E9421 31 | :1001E000B800DC01CB0188199909AA09BB09883E2E 32 | :1001F0009340A105B10558F021E0C21AD108E108E9 33 | :10020000F10888EE880E83E0981EA11CB11CC11471 34 | :10021000D104E104F10419F7FF90EF90DF90CF9043 35 | :10022000BF90AF909F908F9008951F920F920FB63E 36 | :100230000F9211242F933F938F939F93AF93BF936C 37 | :100240008091010190910201A0910301B0910401FC 38 | :100250003091000123E0230F2D3720F40196A11DDA 39 | :10026000B11D05C026E8230F0296A11DB11D2093E4 40 | :1002700000018093010190930201A0930301B093C8 41 | :1002800004018091050190910601A0910701B091B0 42 | :1002900008010196A11DB11D8093050190930601EF 43 | :1002A000A0930701B0930801BF91AF919F918F91E7 44 | :1002B0003F912F910F900FBE0F901F90189578943B 45 | :1002C00084B5826084BD84B5816084BD85B582605B 46 | :1002D00085BD85B5816085BD80916E00816080930C 47 | :1002E0006E00109281008091810082608093810075 48 | :1002F0008091810081608093810080918000816085 49 | :10030000809380008091B10084608093B1008091DF 50 | :10031000B00081608093B00080917A008460809307 51 | :100320007A0080917A00826080937A0080917A00CE 52 | :10033000816080937A0080917A00806880937A004F 53 | :100340001092C100EDE9F0E02491E9E8F0E0849139 54 | :10035000882399F090E0880F991FFC01E859FF4F1E 55 | :10036000A591B491FC01EE58FF4F859194918FB700 56 | :10037000F894EC91E22BEC938FBFC0E0D0E081E0E9 57 | :100380000E9470000E94DD0080E00E9470000E94C8 58 | :10039000DD002097A1F30E940000F1CFF894FFCF79 59 | :00000001FF 60 | -------------------------------------------------------------------------------- /junk/hex/esplora/Blink.cpp.hex: -------------------------------------------------------------------------------- 1 | :100000000C94E6000C940E010C940E010C940E015D 2 | :100010000C940E010C940E010C940E010C940E0124 3 | :100020000C940E010C940E010C9412040C94840494 4 | :100030000C940E010C940E010C940E010C940E0104 5 | :100040000C940E010C940E010C940E010C940E01F4 6 | :100050000C940E010C940E010C940E010C94C1062C 7 | :100060000C940E010C940E010C940E010C940E01D4 8 | :100070000C940E010C940E010C940E010C940E01C4 9 | :100080000C940E010C940E010C940E010C940E01B4 10 | :100090000C940E010C940E010C940E010C940E01A4 11 | :1000A0000C940E010C940E010C940E0136013901D2 12 | :1000B00028012C0130015A015A015A013D01410128 13 | :1000C00045014B014F015A01550100000000240079 14 | :1000D00027002A002D003000080B00020202010058 15 | :1000E000090400000102020000052400100105249B 16 | :1000F000010101042402060524060001070581030D 17 | :1001000010004009040100020A0000000705020275 18 | :100110004000000705830240000004030904417207 19 | :100120006475696E6F204C4C430041726475696E52 20 | :100130006F204573706C6F72610012010002000045 21 | :10014000004041233C800001010203011201000232 22 | :10015000EF02014041233C80000101020301000045 23 | :100160000000250028002B002E00310004040404A8 24 | :10017000040304050202020204030202020206064C 25 | :100180000606060604040202020404040802011022 26 | :1001900040804010204080408008020401804020C0 27 | :1001A00010020110801020404020000000020009D1 28 | :1001B0000F0000030401000C00000000000000001C 29 | :1001C000000000000000000000000B0711241FBE0B 30 | :1001D000CFEFDAE0DEBFCDBF11E0A0E0B1E0E2E0BA 31 | :1001E000F0E102C005900D92A432B107D9F721E0E9 32 | :1001F000A4E2B1E001C01D92A439B207E1F710E01A 33 | :10020000C6EED0E004C02197FE010E94F407C53E6F 34 | :10021000D107C9F70E9420070C94FF070C94000037 35 | :10022000E7EBF1E04491E8E9F1E02491E9E7F1E05E 36 | :100230009491992309F451C04423E1F150E0FA016B 37 | :100240003197EF30F105B0F5EA5AFF4F0C94F407FF 38 | :10025000309180003F7707C0309180003F7D03C020 39 | :1002600030918000377F3093800024C034B53F77D1 40 | :1002700002C034B53F7D34BD1DC0309190003F7742 41 | :1002800007C0309190003F7D03C030919000377FD0 42 | :10029000309390000FC03091C0003F7703C0309181 43 | :1002A000C0003F7D3093C00005C03091C200377F51 44 | :1002B0003093C200E92FF0E0EE0FFF1FE25AFE4F2D 45 | :1002C000A591B4919FB7F894EC91811103C020954A 46 | :1002D0002E2301C02E2B2C939FBF0895FC018091EB 47 | :1002E0009301811103C08FEF9FEF08959FB7F8949A 48 | :1002F00082E08093E9002091F20030E012161306AC 49 | :1003000014F421E030E02115310559F0289884E6F5 50 | :10031000809392018091F10080838091F200882384 51 | :1003200019F09FBFC90108958BE68093E800F9CFCB 52 | :10033000CF92DF92EF92FF920F931F93CF93DF93B1 53 | :100340006C017A018B01C0E0D0E0CE15DF0589F0A9 54 | :10035000D8016D918D01D601ED91FC910190F08154 55 | :10036000E02DC6010995892B11F47E0102C021966A 56 | :10037000ECCFC701DF91CF911F910F91FF90EF90CC 57 | :10038000DF90CF90089580918A0181110DC082E0A5 58 | :100390008093860184E080938701109289011092F6 59 | :1003A000880181E080938A0186E891E00895CF93E7 60 | :1003B000DF931F92CDB7DEB76983DC01ED91FC912D 61 | :1003C0000280F381E02D41E050E0BE016F5F7F4F7E 62 | :1003D00009950F90DF91CF91089583E08093E90014 63 | :1003E0008091F200882319F08AE38093E800089551 64 | :1003F000CF93DF931F92CDB7DEB7FC01848595853F 65 | :1004000097FD05C02FEF3FEF358724870BC0CE0146 66 | :1004100001960E946E01019719F4898190E002C053 67 | :100420008FEF9FEF0F90DF91CF9108950F931F9360 68 | :10043000CF93DF931F92CDB7DEB78C01FC0184858B 69 | :10044000958597FF0EC0CE0101960E946E0101971F 70 | :1004500019F4298130E002C02FEF3FEFF801358712 71 | :100460002487F801848595850F90DF91CF911F91A6 72 | :100470000F910895FC018485958597FD0BC09FB76A 73 | :10048000F89482E08093E9008091F2009FBF90E0B1 74 | :10049000019608959FB7F89482E08093E9008091D7 75 | :1004A000F2009FBF90E008954091300150913101DA 76 | :1004B00020912E0130912F0142175307B4F49091EF 77 | :1004C000E8009570E1F39091E80092FD19C08093E7 78 | :1004D000F100809130019091310101968F7399273D 79 | :1004E000892B19F48EEF8093E80080913001909170 80 | :1004F00031010196909331018093300181E008959C 81 | :1005000080E00895CF92DF92EF92FF920F931F93B6 82 | :10051000CF93DF931F92CDB7DEB7182F062FE42EAF 83 | :10052000862F880F8E5F99830E94540283E00E9479 84 | :100530005402F12EC12E9981D92E8C2D8F1980173E 85 | :1005400098F4F601E7FE02C0849101C080810E9408 86 | :100550005402182F80E00E9454028123FFEFCF1A2B 87 | :10056000DF0A8111EACF01C081E00F90DF91CF91C6 88 | :100570001F910F91FF90EF90DF90CF900895DF9241 89 | :10058000EF92FF920F931F93CF93DF93D82E8A01A0 90 | :100590007B01E40EF51EEB01CE15DF0571F0D7FEF1 91 | :1005A00003C0FE01849101C088810E9454022196FB 92 | :1005B0008111F2CF8FEF9FEF01C0C801DF91CF9182 93 | :1005C0001F910F91FF90EF90DF9008950F931F936D 94 | :1005D000CF93DF931F92CDB7DEB782E0898342E4E9 95 | :1005E00050E068ED70E080E80E94BF020E94C30105 96 | :1005F000DC0112960D911C9113970115110569F0FC 97 | :10060000D801ED91FC910280F381E02DBE016F5F76 98 | :100610007F4FC801099597FF07C089810F90DF912F 99 | :10062000CF911F910F910895F80100851185E5CFB5 100 | :10063000615030F02091F100FC0120830196F8CF49 101 | :10064000289884E68093920108953FB7F8948091AA 102 | :10065000290190912A01A0912B01B0912C0126B57E 103 | :10066000A89B05C02F3F19F00196A11DB11D3FBFEA 104 | :10067000BA2FA92F982F8827820F911DA11DB11D78 105 | :10068000BC01CD0142E0660F771F881F991F4A9574 106 | :10069000D1F708958F929F92AF92BF92CF92DF923F 107 | :1006A000EF92FF926B017C010E9425034B015C01DC 108 | :1006B000C114D104E104F104F1F00E942503DC012E 109 | :1006C000CB0188199909AA09BB09883E9340A10565 110 | :1006D000B10570F321E0C21AD108E108F10888EEF3 111 | :1006E000880E83E0981EA11CB11CC114D104E10442 112 | :1006F000F10419F7DDCFFF90EF90DF90CF90BF901E 113 | :10070000AF909F908F9008958F929F92AF92BF92DB 114 | :10071000CF92DF92EF92FF920F931F93CF93DF93CD 115 | :100720005C016B018A0180910B01882309F45EC092 116 | :1007300080919301882309F459C08091350180FF8D 117 | :1007400005C08091E00082608093E000E8018AEFBC 118 | :10075000F82E93E0E92E2FE3822E3AE3932E209792 119 | :1007600009F43DC08FB7F894E092E9009091E80059 120 | :1007700095FF06C09091F200282D291B922F01C0F1 121 | :1007800090E08FBF91110AC0FA94FF2079F161E0E7 122 | :1007900070E080E090E00E944A03E1CF292F30E032 123 | :1007A000C217D3070CF49C2F8FB7F894E092E9009E 124 | :1007B0002091E80025FF11C0292F30E0C21BD30B88 125 | :1007C000F601915020F041914093F100FACFC20E12 126 | :1007D000D31E9091E80095FF13C08FBFC0CF5D98E6 127 | :1007E00084E6809334011016110644F081E090E015 128 | :1007F000F5019383828380E090E005C0C80103C0C7 129 | :100800009092E800EACFDF91CF911F910F91FF9076 130 | :10081000EF90DF90CF90BF90AF909F908F90089512 131 | :100820000E94FA071F920F920FB60F9211248F9316 132 | :100830009F938091E1009091E100937F9093E1007C 133 | :1008400083FF0FC01092E90091E09093EB001092AB 134 | :10085000EC0092E39093ED001092930198E0909356 135 | :10086000F00082FF20C093E09093E9009091F200A5 136 | :10087000992319F09AE39093E80090913401992319 137 | :1008800039F090913401915090933401992389F17A 138 | :1008900090919201992339F0909192019150909307 139 | :1008A0009201992341F184FF10C08091E2008E7E75 140 | :1008B00081608093E2008091E1008F7E8093E1006F 141 | :1008C000809135018E7E806111C080FF16C08091BD 142 | :1008D000E2008E7E80618093E2008091E1008E7E56 143 | :1008E0008093E100809135018E7E81608093350197 144 | :1008F00004C05D9ACDCF289AD6CF9F918F910F904B 145 | :100900000FBE0F901F9018951F920F920FB60F9267 146 | :100910001124CF92DF92EF92FF920F931F932F93A8 147 | :100920003F934F935F936F937F938F939F93AF9377 148 | :10093000BF93EF93FF93CF93DF93CDB7DEB76C9761 149 | :10094000DEBFCDBF1092E9008091E80083FFFAC1BD 150 | :1009500068E0CE0145960E94180382EF8093E8007C 151 | :100960008D8987FF05C09091E80090FFFCCF03C000 152 | :100970009EEF9093E800982F907609F0C6C09E896C 153 | :100980002F89188D91110CC0803829F48091330182 154 | :100990008093F10002C01092F1001092F10047C163 155 | :1009A000422F50E0512B913051F4811140C1413020 156 | :1009B000510509F03CC1809133018D7F0BC093300C 157 | :1009C00061F4811134C14130510509F030C1809189 158 | :1009D00033018260809333012AC1953041F48091C4 159 | :1009E000E80080FFFCCF20682093E30020C1963010 160 | :1009F00009F05FC0EB8CFC8C1092E9001092310181 161 | :100A000010923001123091F510922F0110922E01A8 162 | :100A10000E94E60299E0BE016F5F7F4FDB01E92F84 163 | :100A20001D92EA95E9F799831A8391E09E8390EAF3 164 | :100A300098879AEF99872091300130913101275F93 165 | :100A40003F4F3C832B838D831092E900109231013C 166 | :100A500010923001F0922F01E0922E0149E050E017 167 | :100A600080E00E94BF020E94E602E1C0F0922F01E6 168 | :100A7000E0922E010E94C301DC011296ED90FC90E1 169 | :100A80001397E114F10409F4C0C0D701ED91FC9172 170 | :100A90000480F581E02DBE016B5E7F4FC701099593 171 | :100AA000009719F00CF0C3C0C6C0F701E084F184D0 172 | :100AB000E8CF973009F4BFC0983021F481E08093EB 173 | :100AC000F100B5C0993009F0B2C0837009F0B3C02D 174 | :100AD000EDE0F1E081E021E036E39081992361F0DF 175 | :100AE0008093E9002093EB0091919093EC00309378 176 | :100AF000ED008F5F873089F78EE78093EA001092D0 177 | :100B0000EA008F898093930192C08B8D9C8D109207 178 | :100B1000E900109231011092300190932F018093DF 179 | :100B20002E01898D811156C08E899D89913A59F483 180 | :100B3000813209F080C047E050E064E071E080E07D 181 | :100B40000E94BF0274C0913209F075C0833289F4EB 182 | :100B5000888D90E0982F88272F89822BA0E0B0E025 183 | :100B60008093000190930101A0930201B0930301CF 184 | :100B70005EC0803269F48091E80082FFFCCF67E0BC 185 | :100B800084E091E00E9418038BEF8093E80006C098 186 | :100B9000823209F04CC08F8980930B018091320121 187 | :100BA000882319F0EEEFFAE002C0E0E0F8E080916F 188 | :100BB000040190910501A0910601B0910701803BCD 189 | :100BC0009440A105B10509F088C080910B0180FF18 190 | :100BD000A0C083C00E94C301DC0112960D911C913C 191 | :100BE00013970115110539F1D801ED91FC91019090 192 | :100BF000F081E02DBE016B5E7F4FC8010995811128 193 | :100C000016C0F80100851185ECCF1130C1F013300A 194 | :100C100091F48F89882309F455C08230E9F440E8C3 195 | :100C20006FE08AE291E00E948202882321F08EEF39 196 | :100C30008093E80087C081E28093EB0083C08B8DB6 197 | :100C40009C8D089711F410932D0180912D01811135 198 | :100C500036C06AE371E038C0813029F440E86BE0C7 199 | :100C60008EE191E0E0CF833031F70E94C301DC01D7 200 | :100C70001296ED90FC9013978E010F5F1F4F680145 201 | :100C8000E114F10479F0D701ED91FC910680F78130 202 | :100C9000E02DB801C7010995080F111DF701E08487 203 | :100CA000F184EECFD8011C92F60101900020E9F703 204 | :100CB0003197BF016C197D0940E0C601B4CF6CE4E7 205 | :100CC00071E002C06AE171E06115710509F4B3CF0A 206 | :100CD000FB01449150E080E833CF0FB6F894A8951B 207 | :100CE00080916000886180936000109260000FBE68 208 | :100CF000A895EE3F2AE0F20739F08091FE0A909124 209 | :100D0000FF0A9183808393CF1092FF0A1092FE0A0C 210 | :100D10008ECFEE3F8AE0F80731F080819181909389 211 | :100D2000FF0A8093FE0A87E797E7918380839BE021 212 | :100D300088E10FB6F894A895809360000FBE909359 213 | :100D4000600075CF6C960FB6F894DEBF0FBECDBFB6 214 | :100D5000DF91CF91FF91EF91BF91AF919F918F91D3 215 | :100D60007F916F915F914F913F912F911F910F91C3 216 | :100D7000FF90EF90DF90CF900F900FBE0F901F90DD 217 | :100D800018951F920F920FB60F9211242F933F9335 218 | :100D90008F939F93AF93BF938091250190912601EC 219 | :100DA000A0912701B09128013091240123E0230F65 220 | :100DB0002D3720F40196A11DB11D05C026E8230F93 221 | :100DC0000296A11DB11D20932401809325019093CB 222 | :100DD0002601A0932701B0932801809129019091C9 223 | :100DE0002A01A0912B01B0912C010196A11DB11DEA 224 | :100DF0008093290190932A01A0932B01B0932C0199 225 | :100E0000BF91AF919F918F913F912F910F900FBE06 226 | :100E10000F901F901895E6E3F1E01382128288EE9E 227 | :100E200093E0A0E0B0E084839583A683B78387E155 228 | :100E300091E0918380838FEF9FEF9587848708955A 229 | :100E4000789484B5826084BD84B5816084BD85B5A5 230 | :100E5000826085BD85B5816085BD80916E008160B1 231 | :100E600080936E0010928100809181008260809357 232 | :100E70008100809181008160809381008091800059 233 | :100E800081608093800080919100826080939100C6 234 | :100E900080919100816080939100809190008160A9 235 | :100EA000809390008091C10084608093C100809104 236 | :100EB000C10082608093C1008091C10081608093F5 237 | :100EC000C1008091C30081608093C3008091C00005 238 | :100ED00082608093C0008091C20081608093C200D4 239 | :100EE00080917A00846080937A0080917A00826099 240 | :100EF00080937A0080917A00816080937A0080915B 241 | :100F00007A00806880937A001092930110923301E6 242 | :100F1000109235018091D70081608093D70080EADC 243 | :100F20008093D80089B5806189BD89B5826089BD0B 244 | :100F300009B400FEFDCF61E070E080E090E00E9427 245 | :100F40004A038091D8008F7C80618093D800809183 246 | :100F5000E000807F8093E0008091E1008E7E8093AE 247 | :100F6000E1008DE08093E200559A209AEEEFFFE7D2 248 | :100F7000859194918B3F9C4D19F481E080933201CF 249 | :100F8000E8E9F1E02491E9E7F1E08491882399F020 250 | :100F900090E0880F991FFC01E653FF4FA591B49193 251 | :100FA000FC01E25AFE4F859194918FB7F894EC9131 252 | :100FB000E22BEC938FBFC0E0D0E081E00E941001F3 253 | :100FC00068EE73E080E090E00E944A0380E00E94B7 254 | :100FD000100168EE73E080E090E00E944A032097E1 255 | :100FE00061F30E940000E9CFEE0FFF1F0590F4911E 256 | :100FF000E02D099481E090E0F8940C94FF07F894B8 257 | :02100000FFCF20 258 | :10100200FFFFFFFF00E100000000000000C180813F 259 | :1010120000000000000000D70184033A02F8011624 260 | :0410220002ED0100DA 261 | :00000001FF 262 | -------------------------------------------------------------------------------- /junk/hex/feather/Blink.cpp.hex: -------------------------------------------------------------------------------- 1 | :100000000C945D010C9485010C9485010C94850180 2 | :100010000C9485010C9485010C9485010C94850148 3 | :100020000C9485010C9485010C9477060C9443057F 4 | :100030000C9485010C9485010C9485010C94850128 5 | :100040000C9485010C9485010C9485010C94850118 6 | :100050000C9485010C9485010C9485010C949F01EE 7 | :100060000C9485010C9485010C9485010C948501F8 8 | :100070000C9485010C9485010C9485010C948501E8 9 | :100080000C9485010C9485010C9485010C948501D8 10 | :100090000C9485010C9485010C9485010C948501C8 11 | :1000A0000C9485010C9485010C948501A202A50293 12 | :1000B000940298029E02C602C602C602A902AD02BE 13 | :1000C000B102B702BB02C602C10200000002000971 14 | :1000D0000F0000030401000C00000408020110409E 15 | :1000E00080401020408040800802040180402010A1 16 | :1000F000020110801020404004040404040304059D 17 | :1001000002020202040302020202060606060606B4 18 | :1001100004040202020400000000250028002B0055 19 | :100120002E00310000000000240027002A002D00CE 20 | :10013000300000C18081C112010002020000409C19 21 | :10014000230C8000010102000112010002000000E6 22 | :10015000409C230C80000101020001416461667231 23 | :100160007569740046656174686572203332753450 24 | :100170000004030904080B00020202010009040044 25 | :100180000001020200000524001001052401010104 26 | :10019000042402060524060001070581031000401F 27 | :1001A00009040100020A00000007050202400000E5 28 | :1001B0000705830240000000000000000000002A44 29 | :1001C0002B280000000000000000000000000000DC 30 | :1001D000000000000000002C9EB4A0A1A2A434A640 31 | :1001E000A7A5AE362D3738271E1F20212223242510 32 | :1001F00026B333B62EB7B89F8485868788898A8BC5 33 | :100200008C8D8E8F909192939495969798999A9BB6 34 | :100210009C9D2F3130A3AD350405060708090A0B54 35 | :100220000C0D0E0F101112131415161718191A1B96 36 | :100230001C1DAFB1B0B500090402000103000000AD 37 | :100240000921010100012265000705840340000126 38 | :1002500005010902A1010901A10085010509190192 39 | :100260002903150025019503750181029501750586 40 | :10027000810305010930093109381581257F750889 41 | :1002800095038106C0C005010906A1018502050785 42 | :1002900019E029E7150025017501950881029501EE 43 | :1002A0007508810395067508150025650507190071 44 | :1002B00029658100C0009F07F20811241FBECFEFFF 45 | :1002C000DAE0DEBFCDBF11E0A0E0B1E0EEE5F2E1A3 46 | :1002D00002C005900D92A832B107D9F721E0A8E23B 47 | :1002E000B1E001C01D92A739B207E1F712E0CAEBF5 48 | :1002F000D2E004C02297FE010E942909C63BD10723 49 | :10030000C9F70E9437030C942D090C94000061E09A 50 | :100310008DE00C94C70261E08DE00E94000368EE5E 51 | :1003200073E080E090E00E940C0260E08DE00E94AB 52 | :10033000000368EE73E080E090E00C940C021F92E2 53 | :100340000F920FB60F9211242F933F938F939F9389 54 | :10035000AF93BF938091290190912A01A0912B0125 55 | :10036000B0912C013091280126E0230F2D3720F485 56 | :100370000296A11DB11D05C029E8230F0396A11DFA 57 | :10038000B11D209328018093290190932A01A09305 58 | :100390002B01B0932C0180912D0190912E01A09101 59 | :1003A0002F01B09130010196A11DB11D80932D0147 60 | :1003B00090932E01A0932F01B0933001BF91AF9184 61 | :1003C0009F918F913F912F910F900FBE0F901F9093 62 | :1003D00018953FB7F89480912D0190912E01A0912E 63 | :1003E0002F01B091300126B5A89B05C02F3F19F011 64 | :1003F0000196A11DB11D3FBF6627782F892F9A2F27 65 | :10040000620F711D811D911D43E0660F771F881FCC 66 | :10041000991F4A95D1F70895CF92DF92EF92FF92FC 67 | :10042000CF93DF936B017C010E94E901EB01C114C2 68 | :10043000D104E104F10489F00E94E1060E94E9017F 69 | :100440006C1B7D0B683E734090F381E0C81AD108A5 70 | :10045000E108F108C851DC4FEACFDF91CF91FF905E 71 | :10046000EF90DF90CF900895789484B5826084BD3A 72 | :1004700084B5816084BD85B5826085BD85B58160A8 73 | :1004800085BDEEE6F0E0808181608083E1E8F0E008 74 | :100490001082808182608083808181608083E0E837 75 | :1004A000F0E0808181608083E1E9F0E0808182601A 76 | :1004B0008083808181608083E0E9F0E080818160D9 77 | :1004C0008083E1ECF0E080818460808380818260C1 78 | :1004D0008083808181608083E3ECF0E080818160B3 79 | :1004E0008083E0ECF0E0808182608083E2ECF0E0E9 80 | :1004F000808181608083EAE7F0E08081846080838E 81 | :1005000080818260808380818E7F8083808180680B 82 | :100510008083089590E0FC013197EF30F105B0F54C 83 | :10052000EA5AFF4F0C942709809180008F7703C00F 84 | :10053000809180008F7D809380000895809180005D 85 | :10054000877FF9CF84B58F7702C084B58F7D84BD56 86 | :100550000895809190008F7707C0809190008F7DE3 87 | :1005600003C080919000877F8093900008958091D0 88 | :10057000C0008F7703C08091C0008F7D8093C00042 89 | :1005800008958091C200877F8093C2000895CF9321 90 | :10059000DF9390E0FC01E652FF4F2491FC01E8500C 91 | :1005A000FF4F8491882349F190E0880F991FFC0147 92 | :1005B000EC5DFE4FA591B4918A5E9E4FFC01C59102 93 | :1005C000D4919FB7611108C0F8948C912095822333 94 | :1005D0008C93888182230AC0623051F4F8948C9104 95 | :1005E000322F309583238C938881822B888304C09B 96 | :1005F000F8948C91822B8C939FBFDF91CF910895BB 97 | :100600000F931F93CF93DF931F92CDB7DEB7282FA1 98 | :1006100030E0F901E653FF4F8491F901E652FF4FB4 99 | :100620001491F901E850FF4F04910023C9F0882389 100 | :1006300021F069830E948A026981E02FF0E0EE0FC9 101 | :10064000FF1FEA5EFE4FA591B4919FB7F8948C917D 102 | :10065000611103C01095812301C0812B8C939FBF32 103 | :100660000F90DF91CF911F910F91089508950E94EF 104 | :1006700034020E94360381E391E00E94C5060E9485 105 | :100680008701C0E0D0E00E948B012097E1F30E9437 106 | :100690000000F9CF4091350150913601209133018E 107 | :1006A0003091340142175307B4F49091E8009570EB 108 | :1006B000E1F39091E80092FD19C08093F1008091E0 109 | :1006C00035019091360101968F739927892B19F482 110 | :1006D0008EEF8093E800809135019091360101966C 111 | :1006E000909336018093350181E0089580E008956C 112 | :1006F000CF92DF92FF920F931F93CF93DF931F92BE 113 | :10070000CDB7DEB7082F162F862F880F8E5F9983FF 114 | :100710000E944A0383E00E944A03F02EC02E998172 115 | :10072000D92E8C2D8F19811778F4F60184910E94AF 116 | :100730004A03082F80E00E944A038023FFEFCF1A6C 117 | :10074000DF0A8111EECF01C081E00F90DF91CF91E0 118 | :100750001F910F91FF90DF90CF900895615030F07E 119 | :100760002091F100FC0120830196F8CF84E680936C 120 | :10077000380108952FB7FC012083F89467706093C7 121 | :10078000E9000895CF93DF931F92CDB7DEB7682FAE 122 | :10079000CE0101960E94BA038091F20099819FBF19 123 | :1007A0000F90DF91CF910895FF920F931F93CF93F6 124 | :1007B000DF9300D0CDB7DEB7F62E8A0190913701D6 125 | :1007C000992311F057FF03C08FEF9FEF2AC0682FC6 126 | :1007D000CE0101967A830E94BA038091F20090E0E4 127 | :1007E000A8017A81801791070CF4AC01EF2DF72F47 128 | :1007F000F40E84E6FE1631F0809338019091F100FA 129 | :100800009193F8CF4115510521F08091F200882392 130 | :1008100021F089818FBFCA0104C08BE68093E80074 131 | :10082000F8CF0F900F90DF91CF911F910F91FF9014 132 | :100830000895CF93DF931F92CDB7DEB741E050E02C 133 | :10084000BE016F5F7F4F0E94D403019719F4898125 134 | :1008500090E002C08FEF9FEF0F90DF91CF9108954E 135 | :10086000CF93DF931F92CDB7DEB7682FCE010196ED 136 | :100870000E94BA039091E800892F807295FF04C00E 137 | :100880009091F20080E4891B99819FBF0F90DF91C6 138 | :10089000CF9108956F927F928F929F92AF92BF9265 139 | :1008A000CF92DF92EF92FF920F931F93CF93DF933C 140 | :1008B0001F92CDB7DEB7782E7B01C42EB52E809166 141 | :1008C0003701882369F0042F152F8AEFD82E872D42 142 | :1008D0008072982E9AE3A92E872D8074882E11C0DD 143 | :1008E0008FEF9FEF56C0872D0E943004682E811134 144 | :1008F0000CC0DA94A9F361E070E080E090E00E941F 145 | :100900000C020115110579F73BC0282F30E00217C2 146 | :1009100013070CF4602E672DCE0101960E94BA03D6 147 | :100920008091E80085FF29C0262D30E0021B130BC3 148 | :10093000992039F06A948FEF6816B1F01092F100A7 149 | :10094000F9CFF701862D77FE07C0815058F09491BA 150 | :100950009093F1003196F9CF815020F091919093CE 151 | :10096000F100FACFE20EF31E8091E80085FF0EC081 152 | :100970000115110511F4811009C089818FBFC1CF04 153 | :1009800084E6809339018C2D9B2D03C0A092E80052 154 | :10099000F4CF0F90DF91CF911F910F91FF90EF90C7 155 | :1009A000DF90CF90BF90AF909F908F907F906F908F 156 | :1009B00008951092E900109236011092350190933B 157 | :1009C0003401809333010895CF92DF92FF920F9309 158 | :1009D0001F93CF93DF9300D0CDB7DEB7F82E8A01F7 159 | :1009E0006B0101151105B1F0F601F7FE02C084910B 160 | :1009F00001C0808149835A830E944A030150110932 161 | :100A0000FFEFCF1ADF0A49815A818111EACF8FEFB8 162 | :100A10009FEF01C0CA010F900F90DF91CF911F91FE 163 | :100A20000F91FF90DF90CF9008951F93CF93DF93A6 164 | :100A30001F92CDB7DEB7162F2091E80022FFFCCF22 165 | :100A4000612F79830E94AE038BEF8093E800812FA2 166 | :100A50007981972F0F90DF91CF911F910895CF93B8 167 | :100A6000DF931F92CDB7DEB71982CE0101960E94A7 168 | :100A70003F07CE0101960E94DA07898190E00F902E 169 | :100A8000DF91CF9108951F920F920FB60F9211240C 170 | :100A9000EF92FF920F931F932F933F934F935F9388 171 | :100AA0006F937F938F939F93AF93BF93EF93FF9336 172 | :100AB000CF93DF93CDB7DEB76297DEBFCDBF109285 173 | :100AC000E9008091E80083FFEBC068E0CE010A9660 174 | :100AD0000E94AE0382EF8093E8009A8597FF05C0DD 175 | :100AE0008091E80080FFFCCF03C08EEF8093E80088 176 | :100AF000892F807609F0B9C08B85811105C01092CD 177 | :100B0000F1001092F100C5C0282F2D7F213009F48B 178 | :100B1000C0C0853049F48091E80080FFFCCF8C850F 179 | :100B200080688093E300B5C0863009F076C02D85DB 180 | :100B3000E888F988223071F580E090E02A8B0E94E5 181 | :100B4000D9040E942F0599E08E010F5F1F4FF80115 182 | :100B5000392F11923A95E9F799832A892A8391E0EE 183 | :100B60009E8390E898879AEF99872091350130917C 184 | :100B70003601275F3F4F3C832B838D83C7010E9443 185 | :100B8000D90449E050E0B80180E00E94E4040E94EA 186 | :100B90002F057FC0C7012A8B0E94D9042A892232DF 187 | :100BA00041F482E290E00E94E507892B09F071C0D0 188 | :100BB00074C0213069F488899989089711F42093C9 189 | :100BC000320180913201811118C069E471E01AC0CC 190 | :100BD000233009F062C08C85882391F0823021F4A3 191 | :100BE0006CE084E691E006C0813009F056C068E010 192 | :100BF0008BE591E00E9478034AC067E371E002C090 193 | :100C000061E771E06115710509F447C0FB0144918A 194 | :100C100050E080E80E94E4043CC0873009F43DC005 195 | :100C2000883021F481E08093F10033C0893089F568 196 | :100C3000937099F5E3E3F1E081E021E096E380939E 197 | :100C4000E9002093EB0034913093EC009093ED0099 198 | :100C50008F5F3196853099F78EE78093EA00109286 199 | :100C6000EA008C858093370114C0888999890E9495 200 | :100C7000D9048E85811105C0CE010A960E944A07CB 201 | :100C800006C0823051F4CE010A960E940D088823D6 202 | :100C900021F08EEF8093E80003C081E28093EB00A7 203 | :100CA00062960FB6F894DEBF0FBECDBFDF91CF9135 204 | :100CB000FF91EF91BF91AF919F918F917F916F9134 205 | :100CC0005F914F913F912F911F910F91FF90EF9066 206 | :100CD0000F900FBE0F901F9018958093E9008091A0 207 | :100CE000F200882319F08AE38093E80008951F92A8 208 | :100CF0000F920FB60F9211242F933F934F935F9350 209 | :100D00006F937F938F939F93AF93BF93EF93FF93D3 210 | :100D10008091E1001092E10083FF0FC01092E90082 211 | :100D200091E09093EB001092EC0092E39093ED0031 212 | :100D30001092370198E09093F00082FF15C083E095 213 | :100D40000E946D0680913901882329F08091390134 214 | :100D500081508093390180913801882329F0809156 215 | :100D60003801815080933801FF91EF91BF91AF918D 216 | :100D70009F918F917F916F915F914F913F912F91B3 217 | :100D80000F900FBE0F901F9018951092370181E0C1 218 | :100D90008093D70080EA8093D80082E089BD09B4AF 219 | :100DA00000FEFDCF61E070E080E090E00E940C0268 220 | :100DB00080E98093D8008CE08093E2001092E000FC 221 | :100DC00008950895CF93DF931F92CDB7DEB769835F 222 | :100DD000DC01ED91FC910280F381E02D41E050E0D7 223 | :100DE000BE016F5F7F4F09950F90DF91CF910895FE 224 | :100DF000CF93DF93EC018C859D8597FF05C082E042 225 | :100E00000E9419049D878C878C859D85DF91CF91E9 226 | :100E1000089583E00C946D06FC018485958597FD0B 227 | :100E200006C082E00E94C20390E00196089582E02D 228 | :100E30000E94C20390E00895FC018485958597FD8A 229 | :100E400005C02FEF3FEF35872487089582E00C948B 230 | :100E50001904CF93DF93EC0180910701882331F0CF 231 | :100E600083E00E944A041816190634F081E090E0ED 232 | :100E70009B838A8380E090E0DF91CF910895FC010D 233 | :100E800020812E5F208342E450E065E771E080E836 234 | :100E90000C94E404FC0181819081913A59F48132EF 235 | :100EA00009F03CC047E050E060E071E080E00E9463 236 | :100EB000E40443C0913291F5803239F467E070E088 237 | :100EC00080E091E00E94150506C0823209F035C02D 238 | :100ED0008281809307018091000190910101A0918E 239 | :100EE0000201B0910301803B9440A105B105C1F41A 240 | :100EF0008091070180FD14C087E797E79093010870 241 | :100F0000809300082BE088E190E00FB6F894A89554 242 | :100F1000809360000FBE209360000FC080E00895B2 243 | :100F200088E10FB6F89480936000109260000FBEC5 244 | :100F3000A895109201081092000881E0089510927F 245 | :100F40003D0110923C0188EE93E0A0E0B0E0809378 246 | :100F50003E0190933F01A0934001B09341018EE088 247 | :100F600091E090933B0180933A018FEF9FEF909334 248 | :100F70004701809346010895FF920F931F93CF93EB 249 | :100F8000DF93EC01F62EE881F9810480F581E02DF4 250 | :100F900009958C01E881F9810680F781E02D6F2D9C 251 | :100FA000CE010995C8019927DF91CF911F910F912B 252 | :100FB000FF900895FC0120812F5F208349E150E0DC 253 | :100FC00067E372E080E80C94E40445E650E060E5F5 254 | :100FD00072E080E80C94E404EF92FF920F931F9369 255 | :100FE000CF93DF931F92CDB7DEB789838B017A0150 256 | :100FF00041E050E0BE016F5F7F4F84E00E944A04F1 257 | :10100000A701B80184E40E944A040F90DF91CF91B8 258 | :101010001F910F91FF90EF900895FC0191818081C5 259 | :10102000813A31F481E0913091F0933089F411C02C 260 | :10103000813271F49B3021F482818093090105C0D3 261 | :101040009A3031F482818093080181E008950895F7 262 | :1010500080E0089548E050E082E00C94EC07CF93E4 263 | :10106000DF93DC01683818F0E8E7E60F25C0E62FCB 264 | :10107000F0E067FF11C0E058F10981E090E001C0A5 265 | :10108000880FEA95EAF714969C911497982B14967A 266 | :101090009C931497E0E010C0E954FE4FE491EE23D6 267 | :1010A00009F440C0E7FF08C014968C911497826041 268 | :1010B00014968C931497EF7716968C9116978E173B 269 | :1010C00041F117968C9117978E1719F118968C91FC 270 | :1010D00018978E17F1F019968C9119978E17C9F001 271 | :1010E0001A968C911A978E17A1F01B968C911B97CC 272 | :1010F0008E1779F080E090E0ED01C80FD91F2E81A6 273 | :10110000211102C0EE8305C0019686309105A1F73A 274 | :1011100009C0BD016C5F7F4FCD010E942A0881E0AC 275 | :1011200090E008C081E090E013969C938E93129714 276 | :1011300080E090E0DF91CF910895683818F0E8E7FB 277 | :10114000E60F25C0E62FF0E067FF12C0E058F10976 278 | :1011500021E030E001C0220FEA95EAF72095DC019A 279 | :1011600014963C911497322314963C93E0E00FC000 280 | :10117000E954FE4FE491EE2329F1E7FF08C0DC01BA 281 | :1011800014962C9114972D7F14962C93EF7720E0D2 282 | :1011900030E0EE2351F0DC01A20FB31F16964C9104 283 | :1011A00016974E1302C016961C922F5F3F4F2630A3 284 | :1011B000310579F7BC016C5F7F4F0E942A0881E0FE 285 | :1011C00090E0089580E090E00895FC011682178277 286 | :1011D00010861186128613861482BC016C5F7F4FC5 287 | :1011E0000C942A081092960110928D0110928C0195 288 | :1011F0008EE191E090938B0180938A010895CF92C4 289 | :10120000DF92EF92FF920F931F93CF93DF936C01C6 290 | :101210007A01EB01E60EF71E00E010E0CE15DF05C7 291 | :1012200061F06991D601ED91FC910190F081E02D82 292 | :10123000C6010995080F191FF1CFC801DF91CF91A1 293 | :101240001F910F91FF90EF90DF90CF900895EE0FD8 294 | :0E125000FF1F0590F491E02D0994F894FFCF54 295 | :10125E0000E1000000000000010100000000E206B5 296 | :10126E0029070C071C07F806090700000000BC0739 297 | :08127E00FF082F089D08E50898 298 | :00000001FF 299 | -------------------------------------------------------------------------------- /junk/hex/imuduino/README.txt: -------------------------------------------------------------------------------- 1 | NOTE 2 | For Blink.cpp.hex, the digital pin for the LED is set to D4. 3 | This is because there is no onboard LED on the IMUduino linked to pin 13. 4 | D4 was chosen because it is conveniently close to a GND pin, for ease of plugging an LED in to test. 5 | 6 | Have fun! 7 | 8 | .--. 9 | | .-.| 10 | |T || 11 | [_|__|_] 12 | | | 13 | | | 14 | | | 15 | | 16 | -------------------------------------------------------------------------------- /junk/hex/lilypad-usb/Blink.cpp.hex: -------------------------------------------------------------------------------- 1 | :100000000C94E2000C940A010C940A010C940A016D 2 | :100010000C940A010C940A010C940A010C940A0134 3 | :100020000C940A010C940A010C9491060C9423057B 4 | :100030000C940A010C940A010C940A010C940A0114 5 | :100040000C940A010C940A010C940A010C940A0104 6 | :100050000C940A010C940A010C940A010C942401DA 7 | :100060000C940A010C940A010C940A010C940A01E4 8 | :100070000C940A010C940A010C940A010C940A01D4 9 | :100080000C940A010C940A010C940A010C940A01C4 10 | :100090000C940A010C940A010C940A010C940A01B4 11 | :1000A0000C940A010C940A010C940A0139023C02D6 12 | :1000B0002B022F0235025D025D025D024002440206 13 | :1000C00048024E0252025D0258020000000200097E 14 | :1000D0000F0000030401000C0000000000000000FD 15 | :1000E0000000000000000000000408020110408031 16 | :1000F000401020408040800802040180402010020F 17 | :10010000011080102040402004040404040304056E 18 | :1001100002020202040302020202060606060606A4 19 | :100120000404020202040400000000250028002B41 20 | :10013000002E00310000000000240027002A002DBE 21 | :1001400000300012010002EF0201404F1B08920034 22 | :10015000010102030112010002000000404F1B08D0 23 | :1001600092000101020301537061726B46756E00CB 24 | :100170004C696C79506164205553420004030904B2 25 | :10018000080B000202020100090400000102020043 26 | :1001900000052400100105240101010424020605C4 27 | :1001A0002406000107058103100040090401000234 28 | :1001B0000A00000007050202400000070583024014 29 | :1001C0000000220811241FBECFEFDAE0DEBFCDBF52 30 | :1001D00011E0A0E0B1E0E4ECF1E102C005900D9285 31 | :1001E000A432B107D9F721E0A4E2B1E001C01D9229 32 | :1001F000A539B207E1F711E0C4ECD1E004C02297C1 33 | :10020000FE010E94DC08C23CD107C9F70E94CE0261 34 | :100210000C94E0080C94000061E08DE00C945E0208 35 | :1002200061E08DE00E94970268EE73E080E090E06C 36 | :100230000E94910160E08DE00E94970268EE73E0F9 37 | :1002400080E090E00C9491011F920F920FB60F92F4 38 | :1002500011242F933F938F939F93AF93BF938091DC 39 | :10026000250190912601A0912701B091280130919C 40 | :10027000240126E0230F2D3720F40296A11DB11D85 41 | :1002800005C029E8230F0396A11DB11D2093240169 42 | :100290008093250190932601A0932701B093280114 43 | :1002A0008091290190912A01A0912B01B0912C01FC 44 | :1002B0000196A11DB11D8093290190932A01A0935D 45 | :1002C0002B01B0932C01BF91AF919F918F913F91E2 46 | :1002D0002F910F900FBE0F901F9018953FB7F89475 47 | :1002E0008091290190912A01A0912B01B0912C01BC 48 | :1002F00026B5A89B05C02F3F19F00196A11DB11D81 49 | :100300003FBF6627782F892F9A2F620F711D811D9D 50 | :10031000911D43E0660F771F881F991F4A95D1F7FB 51 | :1003200008958F929F92AF92BF92CF92DF92EF92F9 52 | :10033000FF926B017C010E946E014B015C01C114B4 53 | :10034000D104E104F104F1F00E94E1020E946E0187 54 | :10035000681979098A099B09683E734081059105EE 55 | :1003600070F321E0C21AD108E108F10888EE880E86 56 | :1003700083E0981EA11CB11CC114D104E104F10456 57 | :1003800029F7DDCFFF90EF90DF90CF90BF90AF9037 58 | :100390009F908F900895789484B5826084BD84B5D1 59 | :1003A000816084BD85B5826085BD85B5816085BD70 60 | :1003B000EEE6F0E0808181608083E1E8F0E0108289 61 | :1003C000808182608083808181608083E0E8F0E0CA 62 | :1003D000808181608083E1E9F0E0808182608083B8 63 | :1003E000808181608083E0E9F0E0808181608083AA 64 | :1003F000E1ECF0E080818460808380818260808392 65 | :10040000808181608083E3ECF0E080818160808383 66 | :10041000E0ECF0E0808182608083E2ECF0E08081BB 67 | :1004200081608083EAE7F0E080818460808380815E 68 | :100430008260808380818E7F8083808180688083DA 69 | :10044000089590E0FC013197EF30F105B0F5EA5ADC 70 | :10045000FF4F0C94DA08809180008F7703C0809161 71 | :1004600080008F7D80938000089580918000877F39 72 | :10047000F9CF84B58F7702C084B58F7D84BD089590 73 | :10048000809190008F7707C0809190008F7D03C08E 74 | :1004900080919000877F8093900008958091C000A4 75 | :1004A0008F7703C08091C0008F7D8093C000089536 76 | :1004B0008091C200877F8093C2000895CF93DF931D 77 | :1004C00090E0FC01E751FF4F2491FC01E85FFE4FF3 78 | :1004D0008491882349F190E0880F991FFC01EB5C1F 79 | :1004E000FE4FA591B491895D9E4FFC01C591D491B9 80 | :1004F0009FB7611108C0F8948C91209582238C934A 81 | :10050000888182230AC0623051F4F8948C91322F92 82 | :10051000309583238C938881822B888304C0F89440 83 | :100520008C91822B8C939FBFDF91CF9108950F9375 84 | :100530001F93CF93DF931F92CDB7DEB7282F30E004 85 | :10054000F901E653FF4F8491F901E751FF4F1491F0 86 | :10055000F901E85FFE4F04910023C9F0882321F0E0 87 | :1005600069830E9421026981E02FF0E0EE0FFF1FF6 88 | :10057000E95DFE4FA591B4919FB7F8948C916111FC 89 | :1005800003C01095812301C0812B8C939FBF0F90D6 90 | :10059000DF91CF911F910F91089508950E94CB0193 91 | :1005A0000E94CD028DE291E00E9414070E940C018E 92 | :1005B000C0E0D0E00E9410012097E1F30E9400000B 93 | :1005C000F9CF0895615030F02091F100FC012083B3 94 | :1005D0000196F8CF289884E68093360108954091DB 95 | :1005E00031015091320120912F0130913001421799 96 | :1005F0005307B4F49091E8009570E1F39091E8000E 97 | :1006000092FD19C08093F1008091310190913201E7 98 | :1006100001968F739927892B19F48EEF8093E80048 99 | :100620008091310190913201019690933201809333 100 | :10063000310181E0089580E00895CF92DF92EF923A 101 | :10064000FF920F931F93CF93DF931F92CDB7DEB727 102 | :10065000082F162FF42E862F880F8E5F99830E9405 103 | :10066000EF0283E00E94EF02E02EC02E9981D92E86 104 | :100670008C2D8E19811798F4F601F7FE02C0849133 105 | :1006800001C080810E94EF02082F80E00E94EF02EB 106 | :100690008023FFEFCF1ADF0A8111EACF01C081E08A 107 | :1006A0000F90DF91CF911F910F91FF90EF90DF900E 108 | :1006B000CF9008958091D70081608093D70080EA21 109 | :1006C0008093D80089B58F7E89BD89B5826089BD48 110 | :1006D00009B400FEFDCF61E070E080E090E00E9490 111 | :1006E00091018091D8008F7C80618093D8008091A7 112 | :1006F000E000807F8093E0000895CF93DF931F9206 113 | :10070000CDB7DEB71982CE0101960E948E070E94F6 114 | :10071000C608BE016F5F7F4F0E943F0889810F901E 115 | :10072000DF91CF9108952FB7FC012083F894677073 116 | :100730006093E9000895CF93DF931F92CDB7DEB7A2 117 | :10074000682FCE0101960E9493038091F200998157 118 | :100750009FBF0F90DF91CF910895FF920F931F934A 119 | :10076000CF93DF9300D0CDB7DEB7F62E8A019091FC 120 | :100770003501992311F057FF03C08FEF9FEF2BC076 121 | :10078000682FCE0101967A830E9493038091F20034 122 | :1007900090E0A8017A81801791070CF4AC01EF2D4D 123 | :1007A000F72FF40E84E6FE1639F028988093360170 124 | :1007B0009091F1009193F7CF4115510521F080916F 125 | :1007C000F200882321F089818FBFCA0104C08BE623 126 | :1007D0008093E800F8CF0F900F90DF91CF911F9199 127 | :1007E0000F91FF900895CF93DF931F92CDB7DEB79F 128 | :1007F00041E050E0BE016F5F7F4F0E94AD03019763 129 | :1008000019F4898190E002C08FEF9FEF0F90DF9184 130 | :10081000CF910895CF93DF931F92CDB7DEB7682FA6 131 | :10082000CE0101960E9493039091E800892F807277 132 | :1008300095FF04C09091F20080E4891B99819FBFCD 133 | :100840000F90DF91CF9108956F927F928F929F9238 134 | :10085000AF92BF92CF92DF92EF92FF920F931F93CE 135 | :10086000CF93DF931F92CDB7DEB7782E7B01C42ED6 136 | :10087000B52E80913501882369F0042F152F8AEF5A 137 | :10088000D82E872D8072982E9AE3A92E872D8074FA 138 | :10089000882E11C08FEF9FEF57C0872D0E940A044A 139 | :1008A000682E81110CC0DA94A9F361E070E080E059 140 | :1008B00090E00E9491010115110579F73BC0282FA6 141 | :1008C00030E0021713070CF4602E672DCE0101965D 142 | :1008D0000E9493038091E80085FF29C0262D30E017 143 | :1008E000021B130B992039F06A948FEF6816B1F050 144 | :1008F0001092F100F9CFF701862D77FE07C08150E5 145 | :1009000058F094919093F1003196F9CF815020F0F6 146 | :1009100091919093F100FACFE20EF31E8091E800DE 147 | :1009200085FF0FC00115110511F481100AC08981DE 148 | :100930008FBFC1CF5D9884E6809337018C2D9B2DAE 149 | :1009400003C0A092E800F3CF0F90DF91CF911F91E9 150 | :100950000F91FF90EF90DF90CF90BF90AF909F905E 151 | :100960008F907F906F9008951092E900109232015D 152 | :10097000109231019093300180932F010895CF920E 153 | :10098000DF92FF920F931F93CF93DF9300D0CDB7E9 154 | :10099000DEB7F82E8A016B0101151105B1F0F601E1 155 | :1009A000F7FE02C0849101C0808149835A830E946E 156 | :1009B000EF0201501109FFEFCF1ADF0A49815A8176 157 | :1009C0008111EACF8FEF9FEF01C0CA010F900F9006 158 | :1009D000DF91CF911F910F91FF90DF90CF900895FD 159 | :1009E000BF92CF92DF92EF92FF920F931F93CF931C 160 | :1009F000DF936C018B01EB013BEFB32E2097C1F02D 161 | :100A00007E01C134D1051CF020E4E22EF12C80914E 162 | :100A1000E80082FFFCCFC8018C1B9D0B6E2D8C0D56 163 | :100A20009D1D0E94E202B092E800CE19DF09E6CFD8 164 | :100A3000C801DF91CF911F910F91FF90EF90DF9050 165 | :100A4000CF90BF9008951F920F920FB60F9211246E 166 | :100A5000DF92EF92FF920F931F932F933F934F9349 167 | :100A60005F936F937F938F939F93AF93BF93EF9316 168 | :100A7000FF93CF93DF93CDB7DEB76C97DEBFCDBFCB 169 | :100A80001092E9008091E80083FF23C168E0CE0165 170 | :100A900045960E94E20282EF8093E8003D8937FF8D 171 | :100AA00005C08091E80080FFFCCF03C08EEF8093EB 172 | :100AB000E800832F807609F0F0C02E894F89D88C0A 173 | :100AC00021110CC0303829F4809134018093F10059 174 | :100AD00002C01092F1001092F100F4C0842F90E057 175 | :100AE0009D29213049F43111EDC0019709F0EAC088 176 | :100AF000809134018D7F0AC0233059F43111E2C056 177 | :100B0000019709F0DFC08091340182608093340145 178 | :100B1000D9C0253041F48091E80080FFFCCF4068C7 179 | :100B20004093E300CFC0263009F08DC0EB8CFC8CE5 180 | :100B300022E0D2122CC080E090E00E94B4040E9417 181 | :100B40007D0399E08E010F5F1F4FF801292F11924D 182 | :100B50002A95E9F79983DA8291E09E8390EA988753 183 | :100B60009AEF99872091310130913201275F3F4FF1 184 | :100B70003C832B838D83C7010E94B40449E050E07D 185 | :100B8000B80180E00E94BF040E947D039BC0C701A2 186 | :100B90000E94B4040E94C608BE016B5E7F4F0E9493 187 | :100BA0006808009719F00CF08DC090C081E0D81251 188 | :100BB0000EC08B8D9C8D089719F481E080932E01D7 189 | :100BC00080912E0181112FC065E571E031C0E3E015 190 | :100BD000DE127CC08F89882349F1823029F440E8F5 191 | :100BE0006BE080E791E01CC0813029F440E868E0C8 192 | :100BF00087E691E015C0833009F068C00E94C608FE 193 | :100C00008E010F5F1F4FB8010E948708F801019005 194 | :100C10000020E9F73197E01BF10B40E06E2FC8018F 195 | :100C20000E941D034DC063E471E002C06CE771E0F7 196 | :100C30006115710509F44AC0FB01449150E080E858 197 | :100C40000E94BF043FC0273009F440C0283021F47F 198 | :100C500081E08093F10036C02930A1F53370B1F501 199 | :100C6000E1E0F1E081E021E036E39081992361F059 200 | :100C70008093E9002093EB0091919093EC003093E6 201 | :100C8000ED008F5F873089F78EE78093EA0010923E 202 | :100C9000EA008F898093350115C08B8D9C8D0E9451 203 | :100CA000B404898D811105C0CE0145960E94990733 204 | :100CB00007C00E94C608BE016B5E7F4F0E94A60857 205 | :100CC000882321F08EEF8093E80003C081E28093B7 206 | :100CD000EB006C960FB6F894DEBF0FBECDBFDF9170 207 | :100CE000CF91FF91EF91BF91AF919F918F917F91A4 208 | :100CF0006F915F914F913F912F911F910F91FF90B5 209 | :100D0000EF90DF900F900FBE0F901F90189580937B 210 | :100D1000E9008091F200882319F08AE38093E800CB 211 | :100D200008951F920F920FB60F9211242F933F93A5 212 | :100D30004F935F936F937F938F939F93AF93BF93E3 213 | :100D4000CF93EF93FF93C091E1008091E100837F07 214 | :100D50008093E1008093E100C3FF0FC01092E9008F 215 | :100D600081E08093EB001092EC0082E38093ED0031 216 | :100D70001092350188E08093F000C2FF19C083E033 217 | :100D80000E94870680913701882339F080913701CE 218 | :100D9000815080933701882389F18091360188231F 219 | :100DA00039F080913601815080933601882341F1DA 220 | :100DB000C4FF10C08091E2008E7E81608093E200CB 221 | :100DC0008091E1008F7E8093E100809133018E7EDF 222 | :100DD000806111C0C0FF16C08091E2008E7E8061EC 223 | :100DE0008093E2008091E1008E7E8093E10080910B 224 | :100DF00033018E7E81608093330104C05D9ACDCF34 225 | :100E0000289AD6CFFF91EF91CF91BF91AF919F914B 226 | :100E10008F917F916F915F914F913F912F910F90A3 227 | :100E20000FBE0F901F90189510923501109234014B 228 | :100E3000109233010E945A038091E1008E7E8093CC 229 | :100E4000E1008DE08093E200559A209AEEEFFFE7F3 230 | :100E5000859194918B3F9C4D19F481E0809388019A 231 | :100E60000895CF93DF931F92CDB7DEB76983DC017E 232 | :100E7000ED91FC910280F381E02D41E050E0BE0154 233 | :100E80006F5F7F4F09950F90DF91CF910895CF93BA 234 | :100E9000DF93EC018C859D8597FF05C082E00E9461 235 | :100EA000F3039D878C878C859D85DF91CF91089575 236 | :100EB00083E00C948706FC018485958597FD06C028 237 | :100EC00082E00E949B0390E00196089582E00E94D8 238 | :100ED0009B0390E00895FC018485958597FD05C0EE 239 | :100EE0002FEF3FEF35872487089582E00C94F303BA 240 | :100EF000CF93DF93EC0180911201882331F083E0DE 241 | :100F00000E9424041816190634F081E090E09B83B7 242 | :100F10008A8380E090E0DF91CF910895FC012081E9 243 | :100F20002E5F208342E450E060E871E080E80C949A 244 | :100F3000BF04FC0121818081813A59F4213209F0FA 245 | :100F40004BC047E050E06BE071E080E00E94BF04DE 246 | :100F50005EC0813209F040C0233289F4838190E081 247 | :100F6000982F88273281832BA0E0B0E0809307017F 248 | :100F700090930801A0930901B0930A010FC0203299 249 | :100F800039F467E070E08BE091E00E94F00409C062 250 | :100F9000223221F482818093120103C02D7F2032FE 251 | :100FA000B1F580918801811103C0E0E0F8E002C052 252 | :100FB000EEEFFAE080910B0190910C01A0910D01F0 253 | :100FC000B0910E01803B9440A105B10511F58091CF 254 | :100FD000120180FF03C01DC080E00895EE3F2AE0AB 255 | :100FE000F20731F0808191819093FF0A8093FE0A8D 256 | :100FF00087E797E7918380832BE088E190E00FB645 257 | :10100000F894A895809360000FBE2093600081E063 258 | :10101000089588E10FB6F894809360001092600004 259 | :101020000FBEA895EE3F8AE0F80739F08091FE0ADE 260 | :101030009091FF0A91838083EACF1092FF0A109269 261 | :10104000FE0AE5CF10923B0110923A0188EE93E040 262 | :10105000A0E0B0E080933C0190933D01A0933E015D 263 | :10106000B0933F0187E191E090933901809338017B 264 | :101070008FEF9FEF90934501809344010895EF9285 265 | :10108000FF920F931F93CF93DF937B01FC01C281EB 266 | :10109000D38100E010E0209781F0E881F98102809F 267 | :1010A000F381E02DB701CE01099597FD08C0080F27 268 | :1010B000191F0884D985C02DEECFC80102C08FEF5B 269 | :1010C0009FEFDF91CF911F910F91FF90EF900895C7 270 | :1010D0000F931F93CF93DF938B01FC01C281D381C8 271 | :1010E000209771F0E881F9810480F581E02DB80145 272 | :1010F000CE010995009731F40884D985C02DF0CF31 273 | :1011000080E090E0DF91CF911F910F9108950F93B0 274 | :101110001F93CF93DF938B01FC01C281D381209772 275 | :1011200071F0E881F9810680F781E02DB801CE01E8 276 | :101130000995080F111D0884D985C02DF0CFF8013D 277 | :101140001082DF91CF911F910F9108950F931F93FC 278 | :10115000CF93DF938B01FC01C281D381209771F083 279 | :10116000E881F9810190F081E02DB801CE01099567 280 | :10117000811106C00884D985C02DF0CF80E001C060 281 | :1011800081E0DF91CF911F910F91089580918D01A2 282 | :1011900081110DC082E08093890184E080938A01EF 283 | :1011A00010928C0110928B0181E080938D0189E86F 284 | :1011B00091E00895EE0FFF1F0590F491E02D099442 285 | :0411C000F894FFCFD1 286 | :1011C40000C18081000000FFFFFFFF00E10000007C 287 | :1011D40000000000000000310778075B076B074739 288 | :0411E40007580700A1 289 | :00000001FF 290 | -------------------------------------------------------------------------------- /junk/hex/mega/Blink.cpp.hex: -------------------------------------------------------------------------------- 1 | :1000000001C100001FC100001DC100001BC1000094 2 | :1000100019C1000017C1000015C1000013C1000084 3 | :1000200011C100000FC100000DC100000BC1000094 4 | :1000300009C1000007C1000005C1000003C10000A4 5 | :1000400001C10000FFC00000FDC00000FBC00000B7 6 | :10005000F9C00000F7C00000F5C000000AC10000B0 7 | :10006000F1C00000EFC00000EDC00000EBC00000D8 8 | :10007000E9C00000E7C00000E5C00000E3C00000E8 9 | :10008000E1C00000DFC00000DDC00000DBC00000F8 10 | :10009000D9C00000D7C00000D5C00000D3C0000008 11 | :1000A000D1C00000CFC00000CDC00000CBC0000018 12 | :1000B000C9C00000C7C00000C5C00000C3C0000028 13 | :1000C000C1C00000BFC00000BDC00000BBC0000038 14 | :1000D000B9C00000B7C00000B5C00000B3C0000048 15 | :1000E000B1C0000000002100240027002A002D00DC 16 | :1000F0003000330001010000040107010A01000083 17 | :100100002200250028002B002E00310034000201BF 18 | :100110000000050108010B0100002000230026005B 19 | :1001200029002C002F00320000010000030106010D 20 | :10013000090105050505070508080808020202026D 21 | :100140000A0A080804040404010101010101010173 22 | :100150000303030303030303040707070C0C0C0C3E 23 | :100160000C0C0C0C02020202060606060606060627 24 | :100170000B0B0B0B0B0B0B0B0102102020080810B4 25 | :100180002040102040800201020108040201010207 26 | :1001900004081020408080402010080402018004E0 27 | :1001A000020180402010080402010804020101023B 28 | :1001B0000408102040800102040810204080000044 29 | :1001C000090A02080B0C0D070603040100000000D9 30 | :1001D000000000000000000000000000000000001F 31 | :1001E0000000000000000000000011100F000000DF 32 | :1001F00000000000000000000000000000000000FF 33 | :100200000000000011241FBECFEFD1E2DEBFCDBF42 34 | :1002100000E00CBF12E0A0E0B2E0EEE5F6E000E0A6 35 | :100220000BBF02C007900D92A230B107D9F71BBED9 36 | :1002300012E0A2E0B2E001C01D92AB30B107E1F7DD 37 | :1002400000D20BC2DDCE8091000261E0C8D168EE21 38 | :1002500073E080E090E055D08091000260E0BFD173 39 | :1002600068EE73E080E090E04CC08091000261E0B5 40 | :1002700003C11F920F920FB60F9211242F933F9339 41 | :100280008F939F93AF93BF93809106029091070243 42 | :10029000A0910802B091090230910A020196A11DB5 43 | :1002A000B11D232F2D5F2D3720F02D570196A11D55 44 | :1002B000B11D20930A028093060290930702A09337 45 | :1002C0000802B09309028091020290910302A0916A 46 | :1002D0000402B09105020196A11DB11D8093020296 47 | :1002E00090930302A0930402B0930502BF91AF91D3 48 | :1002F0009F918F913F912F910F900FBE0F901F9064 49 | :1003000018959B01AC017FB7F894809102029091FF 50 | :100310000302A0910402B091050266B5A89B05C036 51 | :100320006F3F19F00196A11DB11D7FBFBA2FA92FF4 52 | :10033000982F8827860F911DA11DB11D62E0880F9F 53 | :10034000991FAA1FBB1F6A95D1F7BC012DC0FFB72B 54 | :10035000F8948091020290910302A0910402B0915E 55 | :100360000502E6B5A89B05C0EF3F19F00196A11D57 56 | :10037000B11DFFBFBA2FA92F982F88278E0F911D6F 57 | :10038000A11DB11DE2E0880F991FAA1FBB1FEA95AE 58 | :10039000D1F7861B970B885E9340C8F221503040FE 59 | :1003A0004040504068517C4F2115310541055105B1 60 | :1003B00071F60895789484B5826084BD84B58160B7 61 | :1003C00084BD85B5826085BD85B5816085BDEEE65D 62 | :1003D000F0E0808181608083E1E8F0E0108280813C 63 | :1003E00082608083808181608083E0E8F0E08081AA 64 | :1003F00081608083E1EBF0E0808184608083E0EBCA 65 | :10040000F0E0808181608083E1E9F0E080818260BA 66 | :100410008083808181608083E0E9F0E08081816079 67 | :100420008083E1EAF0E08081826080838081816066 68 | :100430008083E0EAF0E0808181608083E1E2F1E0A6 69 | :10044000808182608083808181608083E0E2F1E04E 70 | :10045000808181608083EAE7F0E08081846080832E 71 | :1004600080818260808380818160808380818068D8 72 | :1004700080831092C1000895CF93DF93482F50E0FE 73 | :10048000CA0188589E4FFC0134914E5C5E4FFA01C0 74 | :100490008491882369F190E0880F991FFC01EC5149 75 | :1004A000FF4FA591B491FC01E250FF4FC591D4914B 76 | :1004B000662351F42FB7F8948C91932F909589234C 77 | :1004C0008C93888189230BC0623061F42FB7F89434 78 | :1004D0008C91932F909589238C938881832B88838B 79 | :1004E0002FBF06C09FB7F8948C91832B8C939FBF2E 80 | :1004F000DF91CF910895893009F449C08A30A0F482 81 | :10050000843051F1853040F4823079F1833000F548 82 | :10051000813009F063C026C0873079F1883098F5C2 83 | :10052000863009F05BC025C08D3009F442C08E30A2 84 | :1005300028F48B30B1F18C30C0F52DC0803109F436 85 | :1005400042C0813109F445C08F3009F047C037C03F 86 | :10055000809180008F7703C0809180008F7D809391 87 | :100560008000089584B58F7702C084B58F7D84BDE7 88 | :1005700008958091B0008F7703C08091B0008F7D87 89 | :100580008093B0000895809190008F7707C080918C 90 | :1005900090008F7D03C080919000877F80939000B2 91 | :1005A00008958091A0008F7707C08091A0008F7D73 92 | :1005B00003C08091A000877F8093A0000895809160 93 | :1005C00020018F7703C0809120018F7D80932001CF 94 | :1005D000089580912001877F809320010895FF92E4 95 | :1005E0000F931F93F62E482F50E0CA0182549E4F5E 96 | :1005F000FC012491CA0188589E4FFC0114914E5C65 97 | :100600005E4FFA0104910023C1F0222311F0822FE2 98 | :1006100072DFE02FF0E0EE0FFF1FE250FF4FA591D9 99 | :10062000B4919FB7F894FF2021F48C911095812309 100 | :1006300002C08C91812B8C939FBF1F910F91FF90D3 101 | :100640000895CF93DF93B6DE10DEC0E0D0E0FBDD8F 102 | :0E0650002097E9F30E940000FACFF894FFCF44 103 | :02065E000D008D 104 | :00000001FF 105 | -------------------------------------------------------------------------------- /junk/hex/nano/Blink.cpp.hex: -------------------------------------------------------------------------------- 1 | :100000000C9461000C947E000C947E000C947E0095 2 | :100010000C947E000C947E000C947E000C947E0068 3 | :100020000C947E000C947E000C947E000C947E0058 4 | :100030000C947E000C947E000C947E000C947E0048 5 | :100040000C949D000C947E000C947E000C947E0019 6 | :100050000C947E000C947E000C947E000C947E0028 7 | :100060000C947E000C947E00000000002400270009 8 | :100070002A0000000000250028002B0000000000DE 9 | :1000800023002600290004040404040404040202DA 10 | :100090000202020203030303030301020408102007 11 | :1000A0004080010204081020010204081020000012 12 | :1000B0000007000201000003040600000000000029 13 | :1000C000000011241FBECFEFD8E0DEBFCDBF11E08E 14 | :1000D000A0E0B1E0EAE3F4E002C005900D92A230A6 15 | :1000E000B107D9F711E0A2E0B1E001C01D92AB3039 16 | :1000F000B107E1F70E940C020C941B020C94000063 17 | :100100008091000161E00E94B80168EE73E080E038 18 | :1001100090E00E94E5008091000160E00E94B8013B 19 | :1001200068EE73E080E090E00E94E5000895809121 20 | :10013000000161E00E94790108951F920F920FB6AD 21 | :100140000F9211242F933F938F939F93AF93BF935D 22 | :100150008091060190910701A0910801B0910901D9 23 | :1001600030910A010196A11DB11D232F2D5F2D375E 24 | :1001700020F02D570196A11DB11D20930A018093F7 25 | :10018000060190930701A0930801B09309018091A3 26 | :10019000020190910301A0910401B0910501019623 27 | :1001A000A11DB11D8093020190930301A09304014E 28 | :1001B000B0930501BF91AF919F918F913F912F9186 29 | :1001C0000F900FBE0F901F9018959B01AC017FB749 30 | :1001D000F8948091020190910301A0910401B091E3 31 | :1001E000050166B5A89B05C06F3F19F00196A11DDA 32 | :1001F000B11D7FBFBA2FA92F982F8827860F911D79 33 | :10020000A11DB11D62E0880F991FAA1FBB1F6A952F 34 | :10021000D1F7BC012DC0FFB7F894809102019091F5 35 | :100220000301A0910401B0910501E6B5A89B05C0AA 36 | :10023000EF3F19F00196A11DB11DFFBFBA2FA92FE5 37 | :10024000982F88278E0F911DA11DB11DE2E0880F08 38 | :10025000991FAA1FBB1FEA95D1F7861B970B885ED3 39 | :100260009340C8F2215030404040504068517C4F8C 40 | :10027000211531054105510571F60895789484B52D 41 | :10028000826084BD84B5816084BD85B5826085BD92 42 | :1002900085B5816085BDEEE6F0E080818160808378 43 | :1002A000E1E8F0E01082808182608083808181605B 44 | :1002B0008083E0E8F0E0808181608083E1EBF0E022 45 | :1002C000808184608083E0EBF0E0808181608083C6 46 | :1002D000EAE7F0E0808184608083808182608083AF 47 | :1002E0008081816080838081806880831092C100DA 48 | :1002F0000895CF93DF93482F50E0CA0186569F4F51 49 | :10030000FC0134914A575F4FFA018491882369F1C7 50 | :1003100090E0880F991FFC01E859FF4FA591B49117 51 | :10032000FC01EE58FF4FC591D491662351F42FB7CD 52 | :10033000F8948C91932F909589238C9388818923AD 53 | :100340000BC0623061F42FB7F8948C91932F909585 54 | :1003500089238C938881832B88832FBF06C09FB706 55 | :10036000F8948C91832B8C939FBFDF91CF9108954C 56 | :10037000482F50E0CA0182559F4FFC012491CA01C9 57 | :1003800086569F4FFC0194914A575F4FFA01349172 58 | :10039000332309F440C0222351F1233071F024307B 59 | :1003A00028F42130A1F0223011F514C02630B1F02C 60 | :1003B0002730C1F02430D9F404C0809180008F77B9 61 | :1003C00003C0809180008F7D8093800010C084B531 62 | :1003D0008F7702C084B58F7D84BD09C08091B00045 63 | :1003E0008F7703C08091B0008F7D8093B000E32FA2 64 | :1003F000F0E0EE0FFF1FEE58FF4FA591B4912FB71D 65 | :10040000F894662321F48C919095892302C08C91F5 66 | :10041000892B8C932FBF0895CF93DF930E943E01C9 67 | :100420000E949700C0E0D0E00E9480002097E1F396 68 | :0A0430000E940000F9CFF894FFCFFE 69 | :02043A000D00B3 70 | :00000001FF 71 | -------------------------------------------------------------------------------- /junk/hex/pinoccio/Blink.cpp.hex: -------------------------------------------------------------------------------- 1 | :100000000C9418010C942C010C942C010C942C01D0 2 | :100010000C942C010C942C010C942C010C942C01AC 3 | :100020000C942C010C942C010C942C010C942C019C 4 | :100030000C942C010C942C010C942C010C942C018C 5 | :100040000C942C010C942C010C942C010C942C017C 6 | :100050000C942C010C942C010C942C010C94460152 7 | :100060000C942C010C942C010C942C010C942C015C 8 | :100070000C942C010C942C010C942C010C942C014C 9 | :100080000C942C010C942C010C942C010C942C013C 10 | :100090000C942C010C942C010C942C010C942C012C 11 | :1000A0000C942C010C942C010C942C010C942C011C 12 | :1000B0000C942C010C942C010C942C010C942C010C 13 | :1000C0000C942C010C942C010C942C010C942C01FC 14 | :1000D0000C942C010C942C010C942C010C942C01EC 15 | :1000E0000C942C010C942C010C942C010C942C01DC 16 | :1000F0000C942C010C942C010C942C010C942C01CC 17 | :100100000C942C010C942C010C942C010C942C01BB 18 | :100110000C942C010C942C010C942C010C942C01AB 19 | :100120000C942C010C942C010C942C010C942C019B 20 | :100130000C942C015602590248024C0252029002C1 21 | :100140005D02610267026B026F02750279027D0235 22 | :100150009002830287028B020C9461020C94870246 23 | :100160000C9490020C9459020C944C020C9483024F 24 | :100170000C946F020C9456020C9448020C948B025F 25 | :100180000C946B020C9467020C947D020C945D023B 26 | :100190000C9475020C9452020C947902000001092F 27 | :1001A0000A0B00000000000000000000000000003A 28 | :1001B00000070304000000000000000001028008A6 29 | :1001C00010200440200104080204080102108040AD 30 | :1001D000801020400102040810204080050502051F 31 | :1001E00005050505040202020204040404040504D2 32 | :1001F00004020202060606060606060600000000C5 33 | :10020000250000002B002E0031003400000000000B 34 | :1002100000000000000000000000240000002A0090 35 | :100220002D0030003300000000000000000000003E 36 | :1002300011241FBECFEFD1E8DEBFCDBF00E00CBF61 37 | :1002400022E0A0E0B2E001C01D92A930B207E1F7C0 38 | :100250000E9401030C9417030C94000061E087E1F5 39 | :100260000C94910261E087E10E94CA0268EE73E09B 40 | :1002700080E090E00E94B30160E087E10E94CA0242 41 | :1002800068EE73E080E090E00C94B3011F920F924F 42 | :100290000FB60F9211242F933F938F939F93AF9399 43 | :1002A000BF938091010290910202A0910302B0914C 44 | :1002B00004023091000223E0230F2D3720F4019631 45 | :1002C000A11DB11D05C026E8230F0296A11DB11D79 46 | :1002D000209300028093010290930202A0930302F4 47 | :1002E000B09304028091050290910602A09107024A 48 | :1002F000B09108020196A11DB11D80930502909353 49 | :100300000602A0930702B0930802BF91AF919F919C 50 | :100310008F913F912F910F900FBE0F901F901895C6 51 | :100320003FB7F8948091050290910602A0910702D0 52 | :10033000B091080226B5A89B05C02F3F19F0019681 53 | :10034000A11DB11D3FBF6627782F892F9A2F620FFD 54 | :10035000711D811D911D42E0660F771F881F991F37 55 | :100360004A95D1F70895CF92DF92EF92FF92CF9303 56 | :10037000DF936B017C010E949001EB01C114D10459 57 | :10038000E104F10489F00E9410030E9490016C1BAB 58 | :100390007D0B683E734090F381E0C81AD108E108F4 59 | :1003A000F108C851DC4FEACFDF91CF91FF90EF9079 60 | :1003B000DF90CF900895789484B5826084BD84B531 61 | :1003C000816084BD85B5826085BD85B5816085BD50 62 | :1003D000EEE6F0E0808181608083E1E8F0E0108269 63 | :1003E000808182608083808181608083E0E8F0E0AA 64 | :1003F000808181608083E1EBF0E080818460808394 65 | :10040000E0EBF0E0808181608083E1E9F0E08081D1 66 | :1004100082608083808181608083E0E9F0E0808178 67 | :1004200081608083E1EAF0E0808182608083808166 68 | :1004300081608083E0EAF0E0808181608083E1E296 69 | :10044000F1E0808182608083808181608083E0E24E 70 | :10045000F1E0808181608083EAE7F0E08081846060 71 | :1004600080838081826080838081816080838081BD 72 | :10047000806880831092C100089590E0FC0131975C 73 | :10048000E231F10508F04CC0E656FF4F0C94110321 74 | :10049000809180008F7703C0809180008F7D809352 75 | :1004A0008000089580918000877FF9CF84B58F7791 76 | :1004B00002C084B58F7D84BD08958091B0008F7790 77 | :1004C00003C08091B0008F7D8093B000089580912B 78 | :1004D00090008F7707C0809190008F7D03C080913E 79 | :1004E0009000877F8093900008958091A0008F777F 80 | :1004F00007C08091A0008F7D03C08091A000877FFE 81 | :100500008093A0000895809120018F7707C080918B 82 | :1005100020018F7D03C080912001877F809320017F 83 | :100520000895CF93DF9390E0FC01E454FE4F2491B3 84 | :10053000FC01E452FE4F8491882349F190E0880F3A 85 | :10054000991FFC01EA5EFD4FA591B49184509E4F26 86 | :10055000FC01C591D4919FB7611108C0F8948C91AA 87 | :10056000209582238C93888182230AC0623051F4C3 88 | :10057000F8948C91322F309583238C938881822B31 89 | :10058000888304C0F8948C91822B8C939FBFDF9159 90 | :10059000CF9108950F931F93CF93DF931F92CDB701 91 | :1005A000DEB7282F30E0F901E456FE4F8491F901BF 92 | :1005B000E454FE4F1491F901E452FE4F04910023DC 93 | :1005C000C9F0882321F069830E943D026981E02FF0 94 | :1005D000F0E0EE0FFF1FE450FE4FA591B4919FB7DE 95 | :1005E000F8948C91611103C01095812301C0812B77 96 | :1005F0008C939FBF0F90DF91CF911F910F91089522 97 | :1006000008950E94DB010E9400030E942E01C0E0B9 98 | :10061000D0E00E9432012097E1F30E940000F9CF60 99 | :100620000895EE0FFF1F0590F491E02D1994F894B2 100 | :02063000FFCFFA 101 | :00000001FF 102 | -------------------------------------------------------------------------------- /junk/hex/pinoccio/README.md: -------------------------------------------------------------------------------- 1 | Here are some hex files for the Pinoccio Scout. Detailed descriptions follow: 2 | 3 | - **Blink.cpp.hex** - This is the standard Blink example, but blinking on pin 23. This is the green component of the onboard 'torch' LED. If you you prefer Red or Blue, you can recompile with 21 or 22. 4 | 5 | - **Bootstrap.cpp.hex** - This is the firmware that the Pinoccio ships with. If you are planning on using [pinoccio-io](https://github.com/soldair/pinoccio-io), this is what you'll want on the board as that module uses ScoutScript instead of Firmata. 6 | 7 | - **StandardFirmata.cpp.hex** - This is a Firmata compiled for the Scout. With this, the Pinoccio will behave like any other Arduino without wireless capability. It may be just what you want. To compile your own, you will need will need the latest [firmata](https://github.com/firmata/arduino). -------------------------------------------------------------------------------- /junk/hex/pro-mini/Blink-3v.cpp.hex: -------------------------------------------------------------------------------- 1 | :100000000C945C000C946E000C946E000C946E00CA 2 | :100010000C946E000C946E000C946E000C946E00A8 3 | :100020000C946E000C946E000C946E000C946E0098 4 | :100030000C946E000C946E000C946E000C946E0088 5 | :100040000C9488000C946E000C946E000C946E005E 6 | :100050000C946E000C946E000C946E000C946E0068 7 | :100060000C946E000C946E00000000080002010069 8 | :100070000003040700000000000000000102040863 9 | :100080001020408001020408102001020408102002 10 | :10009000040404040404040402020202020203032E 11 | :1000A0000303030300000000250028002B000000CC 12 | :1000B0000000240027002A0011241FBECFEFD8E043 13 | :1000C000DEBFCDBF21E0A0E0B1E001C01D92A930AC 14 | :1000D000B207E1F70E94F1010C9401020C940000B8 15 | :1000E00061E08DE00C94810161E08DE00E94BA0135 16 | :1000F00068EE73E080E090E00E94F50060E08DE043 17 | :100100000E94BA0168EE73E080E090E00C94F50084 18 | :100110001F920F920FB60F9211242F933F938F933C 19 | :100120009F93AF93BF938091010190910201A091A1 20 | :100130000301B09104013091000126E0230F2D3717 21 | :1001400020F40296A11DB11D05C029E8230F0396D6 22 | :10015000A11DB11D20930001809301019093020124 23 | :10016000A0930301B09304018091050190910601D1 24 | :10017000A0910701B09108010196A11DB11D8093C6 25 | :10018000050190930601A0930701B0930801BF9168 26 | :10019000AF919F918F913F912F910F900FBE0F9034 27 | :1001A0001F9018953FB7F894809105019091060132 28 | :1001B000A0910701B091080126B5A89B05C02F3F6B 29 | :1001C00019F00196A11DB11D3FBF6627782F892F19 30 | :1001D0009A2F620F711D811D911D43E0660F771FDD 31 | :1001E000881F991F4A95D1F70895CF92DF92EF9219 32 | :1001F000FF92CF93DF936B017C010E94D200EB0151 33 | :10020000C114D104E104F10489F00E9400020E94AB 34 | :10021000D2006C1B7D0B683E734090F381E0C81ADE 35 | :10022000D108E108F108C851DC4FEACFDF91CF9146 36 | :10023000FF90EF90DF90CF900895789484B582601E 37 | :1002400084BD84B5816084BD85B5826085BD85B57A 38 | :10025000816085BDEEE6F0E0808181608083E1E829 39 | :10026000F0E0108280818260808380818160808361 40 | :10027000E0E8F0E0808181608083E1EBF0E0808164 41 | :1002800084608083E0EBF0E0808181608083EAE736 42 | :10029000F0E08081846080838081826080838081BF 43 | :1002A0008E7F80838081806880831092C100089552 44 | :1002B000833081F028F4813099F08230A1F00895E4 45 | :1002C0008730A9F08830B9F08430D1F48091800073 46 | :1002D0008F7D03C0809180008F7780938000089588 47 | :1002E00084B58F7702C084B58F7D84BD08958091D9 48 | :1002F000B0008F7703C08091B0008F7D8093B000F5 49 | :100300000895CF93DF9390E0FC01E458FF4F2491D0 50 | :10031000FC01E057FF4F8491882349F190E0880F5A 51 | :10032000991FFC01E255FF4FA591B4918C559F4F49 52 | :10033000FC01C591D4919FB7611108C0F8948C91CC 53 | :10034000209582238C93888182230AC0623051F4E5 54 | :10035000F8948C91322F309583238C938881822B53 55 | :10036000888304C0F8948C91822B8C939FBFDF917B 56 | :10037000CF9108950F931F93CF93DF931F92CDB723 57 | :10038000DEB7282F30E0F901E859FF4F8491F901D9 58 | :10039000E458FF4F1491F901E057FF4F04910023F7 59 | :1003A000C9F0882321F069830E9458016981E02FF8 60 | :1003B000F0E0EE0FFF1FEC55FF4FA591B4919FB7F2 61 | :1003C000F8948C91611103C01095812301C0812B99 62 | :1003D0008C939FBF0F90DF91CF911F910F91089544 63 | :1003E00008950E941D010E94F0010E947000C0E06B 64 | :1003F000D0E00E9474002097E1F30E940000F9CF42 65 | :060400000895F894FFCFFF 66 | :00000001FF 67 | -------------------------------------------------------------------------------- /junk/hex/sf-pro-micro/README.txt: -------------------------------------------------------------------------------- 1 | Blink.cpp.hex - LED blink connect to pin 3 2 | -------------------------------------------------------------------------------- /junk/hex/tinyduino/Blink.cpp.hex: -------------------------------------------------------------------------------- 1 | :100000000C9461000C947E000C947E000C947E0095 2 | :100010000C947E000C947E000C947E000C947E0068 3 | :100020000C947E000C947E000C947E000C947E0058 4 | :100030000C947E000C947E000C947E000C947E0048 5 | :100040000C949D000C947E000C947E000C947E0019 6 | :100050000C947E000C947E000C947E000C947E0028 7 | :100060000C947E000C947E00000000002400270009 8 | :100070002A0000000000250028002B0000000000DE 9 | :1000800023002600290004040404040404040202DA 10 | :100090000202020203030303030301020408102007 11 | :1000A0004080010204081020010204081020000012 12 | :1000B0000007000201000003040600000000000029 13 | :1000C000000011241FBECFEFD8E0DEBFCDBF11E08E 14 | :1000D000A0E0B1E0E2E5F4E002C005900D92A230AC 15 | :1000E000B107D9F711E0A2E0B1E001C01D92AB3039 16 | :1000F000B107E1F70E9418020C9427020C9400004B 17 | :100100008091000161E00E94C40168EE73E080E02C 18 | :1001100090E00E94F1008091000160E00E94C40123 19 | :1001200068EE73E080E090E00E94F1000895809115 20 | :10013000000161E00E94850108951F920F920FB6A1 21 | :100140000F9211242F933F934F935F936F937F935D 22 | :100150008F939F93AF93BF93209106013091070136 23 | :10016000409108015091090170910A01DA01C90119 24 | :100170000296A11DB11D672F6A5F6D3730F06D5774 25 | :10018000DA01C9010396A11DB11D60930A01809394 26 | :10019000060190930701A0930801B0930901809193 27 | :1001A000020190910301A0910401B0910501019613 28 | :1001B000A11DB11D8093020190930301A09304013E 29 | :1001C000B0930501BF91AF919F918F917F916F91F6 30 | :1001D0005F914F913F912F910F900FBE0F901F9005 31 | :1001E00018959B01AC017FB7F89480910201909122 32 | :1001F0000301A0910401B091050166B5A89B05C05B 33 | :100200006F3F19F00196A11DB11D7FBFBA2FA92F15 34 | :10021000982F8827860F911DA11DB11D63E0880FBF 35 | :10022000991FAA1FBB1F6A95D1F7BC012DC0FFB74C 36 | :10023000F8948091020190910301A0910401B09182 37 | :100240000501E6B5A89B05C0EF3F19F00196A11D79 38 | :10025000B11DFFBFBA2FA92F982F88278E0F911D90 39 | :10026000A11DB11DE3E0880F991FAA1FBB1FEA95CE 40 | :10027000D1F7861B970B885E9340C8F2215030401F 41 | :100280004040504068517C4F2115310541055105D2 42 | :1002900071F60895789484B5826084BD84B58160D8 43 | :1002A00084BD85B5826085BD85B5816085BDEEE67E 44 | :1002B000F0E0808181608083E1E8F0E0108280815D 45 | :1002C00082608083808181608083E0E8F0E08081CB 46 | :1002D00081608083E1EBF0E0808184608083E0EBEB 47 | :1002E000F0E0808181608083EAE7F0E080818460D3 48 | :1002F000808380818260808380818160808380812F 49 | :10030000806880831092C1000895CF93DF93482FB7 50 | :1003100050E0CA0186569F4FFC0134914A575F4F07 51 | :10032000FA018491882369F190E0880F991FFC01FC 52 | :10033000E859FF4FA591B491FC01EE58FF4FC591CC 53 | :10034000D491662351F42FB7F8948C91932F909504 54 | :1003500089238C93888189230BC0623061F42FB785 55 | :10036000F8948C91932F909589238C938881832B7B 56 | :1003700088832FBF06C09FB7F8948C91832B8C93F2 57 | :100380009FBFDF91CF910895482F50E0CA01825559 58 | :100390009F4FFC012491CA0186569F4FFC01949106 59 | :1003A0004A575F4FFA013491332309F440C02223A6 60 | :1003B00051F1233071F0243028F42130A1F02230A3 61 | :1003C00011F514C02630B1F02730C1F02430D9F433 62 | :1003D00004C0809180008F7703C0809180008F7D62 63 | :1003E0008093800010C084B58F7702C084B58F7D64 64 | :1003F00084BD09C08091B0008F7703C08091B000A8 65 | :100400008F7D8093B000E32FF0E0EE0FFF1FEE58DA 66 | :10041000FF4FA591B4912FB7F894662321F48C91E6 67 | :100420009095892302C08C91892B8C932FBF0895BE 68 | :10043000CF93DF930E944A010E949700C0E0D0E072 69 | :100440000E9480002097E1F30E940000F9CFF89409 70 | :02045000FFCFDC 71 | :020452000D009B 72 | :00000001FF 73 | -------------------------------------------------------------------------------- /junk/hex/uno/Blink.cpp.hex: -------------------------------------------------------------------------------- 1 | :100000000C945C000C946E000C946E000C946E00CA 2 | :100010000C946E000C946E000C946E000C946E00A8 3 | :100020000C946E000C946E000C946E000C946E0098 4 | :100030000C946E000C946E000C946E000C946E0088 5 | :100040000C9488000C946E000C946E000C946E005E 6 | :100050000C946E000C946E000C946E000C946E0068 7 | :100060000C946E000C946E00000000080002010069 8 | :100070000003040700000000000000000102040863 9 | :100080001020408001020408102001020408102002 10 | :10009000040404040404040402020202020203032E 11 | :1000A0000303030300000000250028002B000000CC 12 | :1000B0000000240027002A0011241FBECFEFD8E043 13 | :1000C000DEBFCDBF21E0A0E0B1E001C01D92A930AC 14 | :1000D000B207E1F70E94F1010C9401020C940000B8 15 | :1000E00061E08DE00C94810161E08DE00E94BA0135 16 | :1000F00068EE73E080E090E00E94F50060E08DE043 17 | :100100000E94BA0168EE73E080E090E00C94F50084 18 | :100110001F920F920FB60F9211242F933F938F933C 19 | :100120009F93AF93BF938091010190910201A091A1 20 | :100130000301B09104013091000123E0230F2D371A 21 | :1001400020F40196A11DB11D05C026E8230F0296DB 22 | :10015000A11DB11D20930001809301019093020124 23 | :10016000A0930301B09304018091050190910601D1 24 | :10017000A0910701B09108010196A11DB11D8093C6 25 | :10018000050190930601A0930701B0930801BF9168 26 | :10019000AF919F918F913F912F910F900FBE0F9034 27 | :1001A0001F9018953FB7F894809105019091060132 28 | :1001B000A0910701B091080126B5A89B05C02F3F6B 29 | :1001C00019F00196A11DB11D3FBF6627782F892F19 30 | :1001D0009A2F620F711D811D911D42E0660F771FDE 31 | :1001E000881F991F4A95D1F70895CF92DF92EF9219 32 | :1001F000FF92CF93DF936B017C010E94D200EB0151 33 | :10020000C114D104E104F10489F00E9400020E94AB 34 | :10021000D2006C1B7D0B683E734090F381E0C81ADE 35 | :10022000D108E108F108C851DC4FEACFDF91CF9146 36 | :10023000FF90EF90DF90CF900895789484B582601E 37 | :1002400084BD84B5816084BD85B5826085BD85B57A 38 | :10025000816085BDEEE6F0E0808181608083E1E829 39 | :10026000F0E0108280818260808380818160808361 40 | :10027000E0E8F0E0808181608083E1EBF0E0808164 41 | :1002800084608083E0EBF0E0808181608083EAE736 42 | :10029000F0E08081846080838081826080838081BF 43 | :1002A000816080838081806880831092C10008957E 44 | :1002B000833081F028F4813099F08230A1F00895E4 45 | :1002C0008730A9F08830B9F08430D1F48091800073 46 | :1002D0008F7D03C0809180008F7780938000089588 47 | :1002E00084B58F7702C084B58F7D84BD08958091D9 48 | :1002F000B0008F7703C08091B0008F7D8093B000F5 49 | :100300000895CF93DF9390E0FC01E458FF4F2491D0 50 | :10031000FC01E057FF4F8491882349F190E0880F5A 51 | :10032000991FFC01E255FF4FA591B4918C559F4F49 52 | :10033000FC01C591D4919FB7611108C0F8948C91CC 53 | :10034000209582238C93888182230AC0623051F4E5 54 | :10035000F8948C91322F309583238C938881822B53 55 | :10036000888304C0F8948C91822B8C939FBFDF917B 56 | :10037000CF9108950F931F93CF93DF931F92CDB723 57 | :10038000DEB7282F30E0F901E859FF4F8491F901D9 58 | :10039000E458FF4F1491F901E057FF4F04910023F7 59 | :1003A000C9F0882321F069830E9458016981E02FF8 60 | :1003B000F0E0EE0FFF1FEC55FF4FA591B4919FB7F2 61 | :1003C000F8948C91611103C01095812301C0812B99 62 | :1003D0008C939FBF0F90DF91CF911F910F91089544 63 | :1003E00008950E941D010E94F0010E947000C0E06B 64 | :1003F000D0E00E9474002097E1F30E940000F9CF42 65 | :060400000895F894FFCFFF 66 | :00000001FF 67 | -------------------------------------------------------------------------------- /lib/avr109.js: -------------------------------------------------------------------------------- 1 | var AVR109 = require('chip.avr.avr109'); 2 | var colors = require('colors'); 3 | var fs = require('graceful-fs'); 4 | var Serialport = require('serialport'); 5 | var async = require('async'); 6 | var Protocol = require('./protocol'); 7 | var util = require('util'); 8 | 9 | var Avr109 = function(options) { 10 | options.protocol = function() { return AVR109; }; 11 | 12 | Protocol.call(this, options); 13 | }; 14 | 15 | util.inherits(Avr109, Protocol); 16 | 17 | /** 18 | * Uploads the provided hex file to the board, via the AVR109 protocol 19 | * 20 | * @param {string, Buffer} hex - path of hex file for uploading, or Buffer of the hex data 21 | * @param {function} callback - function to run upon completion/error 22 | */ 23 | Avr109.prototype._upload = function(file, callback) { 24 | var _this = this; 25 | var data; 26 | 27 | try { 28 | if (typeof file === 'string') { 29 | data = fs.readFileSync(file, { 30 | encoding: 'utf8' 31 | }); 32 | } else { 33 | data = file; 34 | } 35 | } catch (error) { 36 | return callback(error); 37 | } 38 | 39 | _this._reset(function(error) { 40 | if (error) { return callback(error); } 41 | 42 | _this.debug('reset complete.'); 43 | 44 | _this.connection._pollForOpen(function(error) { 45 | if (error) { return callback(error); } 46 | 47 | _this.debug('connected'); 48 | 49 | _this._write(data, function(error) { 50 | var color = (error ? colors.red : colors.green); 51 | _this.debug(color('flash complete.')); 52 | // this is a workaround, please see https://github.com/noopkat/avrgirl-arduino/issues/193 53 | // _this.connection.serialPort.close(); 54 | 55 | return callback(error); 56 | }); 57 | }); 58 | }); 59 | }; 60 | 61 | /** 62 | * Performs the writing part of uploading to an AVR109 bootloaded chip 63 | * 64 | * @param {buffer} data - hex buffer to write to the chip 65 | * @param {function} callback - function to run upon completion/error 66 | */ 67 | Avr109.prototype._write = function(data, callback) { 68 | var _this = this; 69 | 70 | var options = { 71 | signature: _this.board.signature.toString(), 72 | debug: this.megaDebug 73 | }; 74 | 75 | _this.chip.init(_this.connection.serialPort, options, function(error, flasher) { 76 | if (error) { return callback(error); } 77 | 78 | _this.debug('flashing, please wait...'); 79 | 80 | async.series([ 81 | flasher.erase.bind(flasher), 82 | flasher.program.bind(flasher, data.toString()), 83 | function verify(done) { 84 | if (_this.board.disableVerify === true) { 85 | done(); 86 | } else { 87 | flasher.verify(done); 88 | } 89 | }, 90 | 91 | flasher.fuseCheck.bind(flasher) 92 | ], 93 | function(error) { 94 | return callback(error); 95 | }); 96 | }); 97 | }; 98 | 99 | /** 100 | * Software resets an Arduino AVR109 bootloaded chip into bootloader mode 101 | * 102 | * @param {function} callback - function to run upon completion/error 103 | */ 104 | Avr109.prototype._reset = function(callback) { 105 | var _this = this; 106 | var conn; 107 | 108 | if (_this.board.manualReset) { 109 | return callback(null); 110 | } 111 | 112 | // creating a temporary connection for resetting only 113 | var tempSerialPort = new Serialport(_this.connection.options.port, { 114 | baudRate: 1200, 115 | autoOpen: false 116 | }); 117 | 118 | _this.connection.serialPort = tempSerialPort; 119 | conn = _this.connection; 120 | 121 | _this.debug('resetting board...'); 122 | 123 | async.series([ 124 | tempSerialPort.open.bind(tempSerialPort), 125 | conn._setDTR.bind(conn, false, 250) 126 | ], 127 | function(error) { 128 | if (error) { 129 | return callback(error); 130 | } 131 | async.series([ 132 | conn._pollForPort.bind(conn) 133 | ], 134 | function(error) { 135 | return callback(error); 136 | }); 137 | }); 138 | }; 139 | 140 | module.exports = Avr109; 141 | -------------------------------------------------------------------------------- /lib/browser-serialport.js: -------------------------------------------------------------------------------- 1 | // TODO: switch out this browser shim for mitt: https://github.com/developit/mitt 2 | const { EventEmitter } = require('events'); 3 | 4 | class SerialPort extends EventEmitter { 5 | constructor(port, options) { 6 | super(options); 7 | this.options = options || {}; 8 | 9 | this.browser = true; 10 | this.path = this.options.path; 11 | this.isOpen = false; 12 | this.port = null; 13 | this.writer = null; 14 | this.reader = null; 15 | this.baudRate = this.options.baudRate; 16 | this.requestOptions = this.options.requestOptions || {}; 17 | 18 | if (this.options.autoOpen) this.open(); 19 | } 20 | 21 | list(callback) { 22 | return navigator.serial.getPorts() 23 | .then((list) => {if (callback) {return callback(null, list)}}) 24 | .catch((error) => {if (callback) {return callback(error)}}); 25 | } 26 | 27 | open(callback) { 28 | window.navigator.serial.requestPort(this.requestOptions) 29 | .then(serialPort => { 30 | this.port = serialPort; 31 | if (this.isOpen) return; 32 | return this.port.open({ baudRate: this.baudRate || 57600 }); 33 | }) 34 | .then(() => this.writer = this.port.writable.getWriter()) 35 | .then(() => this.reader = this.port.readable.getReader()) 36 | .then(async () => { 37 | this.emit('open'); 38 | this.isOpen = true; 39 | callback(null); 40 | while (this.port.readable.locked) { 41 | try { 42 | const { value, done } = await this.reader.read(); 43 | if (done) { 44 | break; 45 | } 46 | this.emit('data', Buffer.from(value)); 47 | } catch (e) { 48 | console.error(e); 49 | } 50 | } 51 | }) 52 | .catch(error => {callback(error)}); 53 | } 54 | 55 | async close(callback) { 56 | try { 57 | await this.reader.releaseLock(); 58 | await this.writer.releaseLock(); 59 | await this.port.close(); 60 | this.isOpen = false; 61 | } catch (error) { 62 | if (callback) return callback(error); 63 | throw error; 64 | } 65 | callback && callback(null); 66 | } 67 | 68 | async set(props = {}, callback) { 69 | try { 70 | const signals = {}; 71 | if (Object.prototype.hasOwnProperty.call(props, 'dtr')) { 72 | signals.dataTerminalReady = props.dtr; 73 | } 74 | if (Object.prototype.hasOwnProperty.call(props, 'rts')) { 75 | signals.requestToSend = props.rts; 76 | } 77 | if (Object.prototype.hasOwnProperty.call(props, 'brk')) { 78 | signals.break = props.brk; 79 | } 80 | if (Object.keys(signals).length > 0) { 81 | await this.port.setSignals(signals); 82 | } 83 | } catch (error) { 84 | if (callback) return callback(error); 85 | throw error; 86 | } 87 | if (callback) return callback(null); 88 | } 89 | 90 | write(buffer, callback) { 91 | this.writer.write(buffer); 92 | if (callback) return callback(null); 93 | } 94 | 95 | async read(callback) { 96 | let buffer; 97 | try { 98 | buffer = await this.reader.read(); 99 | } catch (error) { 100 | if (callback) return callback(error); 101 | throw error; 102 | } 103 | if (callback) callback(null, buffer); 104 | } 105 | 106 | // TODO: is this correct? 107 | flush(callback) { 108 | //this.port.flush(); // is this sync or a promise? 109 | console.warn('flush method is a NOP right now'); 110 | if (callback) return callback(null); 111 | } 112 | 113 | // TODO: is this correct? 114 | drain(callback) { 115 | // this.port.drain(); // is this sync or a promise? 116 | console.warn('drain method is a NOP right now'); 117 | if (callback) return callback(null); 118 | } 119 | } 120 | 121 | module.exports = SerialPort; 122 | -------------------------------------------------------------------------------- /lib/connection-browser.js: -------------------------------------------------------------------------------- 1 | var Serialport = require('./browser-serialport'); 2 | var async = require('async'); 3 | var awty = require('awty'); 4 | 5 | var Connection = function(options) { 6 | this.options = options; 7 | this.debug = this.options.debug ? console.log.bind(console) : function() {}; 8 | 9 | this.board = this.options.board; 10 | // TODO: support avr109 boards 11 | if (this.board.protocol === 'avr109') { 12 | throw new Error( 13 | `Sorry, we currently don't support ${this.board.name} or other avr109 boards in webserial. Please see https://github.com/noopkat/avrgirl-arduino/issues/204#issuecomment-703284131 for further details` 14 | ); 15 | } 16 | }; 17 | 18 | Connection.prototype._init = function(callback) { 19 | this._setUpSerial(function(error) { 20 | return callback(error); 21 | }); 22 | }; 23 | 24 | /** 25 | * Create new serialport instance for the Arduino board, but do not immediately connect. 26 | */ 27 | Connection.prototype._setUpSerial = function(callback) { 28 | this.serialPort = new Serialport('', { 29 | baudRate: this.board.baud, 30 | autoOpen: false 31 | }); 32 | this.serialPort.on('open', function() { 33 | // _this.emit('connection:open'); 34 | }) 35 | return callback(null); 36 | }; 37 | 38 | /** 39 | * Finds a list of available USB ports, and matches for the right pid 40 | * Auto finds the correct port for the chosen Arduino 41 | * 42 | * @param {function} callback - function to run upon completion/error 43 | */ 44 | Connection.prototype._sniffPort = function(callback) { 45 | var _this = this; 46 | var pidList = _this.board.productId.map(function(id) { 47 | return parseInt(id, 16); 48 | }); 49 | 50 | _this._listPorts(function(error, ports) { 51 | // filter for a match by product id 52 | var portMatch = ports.filter(function(p) { 53 | return pidList.indexOf(parseInt(p._standardPid, 16)) !== -1; 54 | }); 55 | 56 | return callback(null, portMatch); 57 | }); 58 | }; 59 | 60 | /** 61 | * Sets the DTR/RTS lines to either true or false 62 | * 63 | * @param {boolean} bool - value to set DTR and RTS to 64 | * @param {number} timeout - number in milliseconds to delay after 65 | * @param {function} callback - function to run upon completion/error 66 | */ 67 | Connection.prototype._setDTR = function(bool, timeout, callback) { 68 | var _this = this; 69 | var props = { 70 | rts: false, 71 | dtr: bool 72 | }; 73 | 74 | _this.serialPort.set(props, function(error) { 75 | if (error) { return callback(error); } 76 | 77 | setTimeout(function() { 78 | callback(error); 79 | }, timeout); 80 | }); 81 | }; 82 | 83 | /** 84 | * Checks the list of ports 4 times for a device to show up 85 | * 86 | * @param {function} callback - function to run upon completion/error 87 | */ 88 | Connection.prototype._pollForPort = function(callback) { 89 | var _this = this; 90 | 91 | var poll = awty(function(next) { 92 | var found = false; 93 | 94 | // try to sniff port instead (for port hopping devices) 95 | _this._sniffPort(function(error, port) { 96 | if (port.length) { 97 | // found a port, save it 98 | _this.options.port = port[0].comName; 99 | found = true; 100 | } 101 | 102 | next(found); 103 | }); 104 | }); 105 | 106 | poll.every(100).ask(15); 107 | 108 | poll(function(foundPort) { 109 | if (foundPort) { 110 | _this.debug('found port on', _this.options.port); 111 | // set up serialport for it 112 | _this._setUpSerial(function(error) { 113 | return callback(error); 114 | }); 115 | } else { 116 | // we also could not find the device on auto sniff 117 | return callback(new Error('could not reconnect after resetting board.')); 118 | } 119 | }); 120 | }; 121 | 122 | Connection.prototype._pollForOpen = function(callback) { 123 | var _this = this; 124 | 125 | var poll = awty(function(next) { 126 | _this.serialPort.open(function(error) { 127 | next(!error); 128 | }); 129 | }); 130 | 131 | poll.every(200).ask(10); 132 | 133 | poll(function(isOpen) { 134 | var error; 135 | if (!isOpen) { 136 | error = new Error('could not open board on ' + _this.serialPort.path); 137 | } 138 | 139 | callback(error); 140 | }); 141 | }; 142 | 143 | /** 144 | * Pulse the DTR/RTS lines low then high 145 | * 146 | * @param {function} callback - function to run upon completion/error 147 | */ 148 | Connection.prototype._cycleDTR = function(callback) { 149 | var _this = this; 150 | 151 | async.series([ 152 | _this._setDTR.bind(_this, true, 250), 153 | _this._setDTR.bind(_this, false, 50) 154 | ], 155 | function(error) { 156 | return callback(error); 157 | }); 158 | 159 | }; 160 | 161 | /** 162 | * Return a list of devices on serial ports. In addition to the output provided 163 | * by SerialPort.list, it adds a platform independent PID in _pid 164 | * 165 | * @param {function} callback - function to run upon completion/error 166 | */ 167 | Connection.prototype._listPorts = function(callback) { 168 | var foundPorts = []; 169 | 170 | // list all available ports 171 | Serialport.list(function(err, ports) { 172 | if (err) { return callback(err); } 173 | 174 | // iterate through ports 175 | for (var i = 0; i < ports.length; i += 1) { 176 | var pid; 177 | 178 | // are we on windows or unix? 179 | // TODO: this can be simplified as Chrome will likely give us a consistent set of props across each OS 180 | if (ports[i].productId) { 181 | pid = ports[i].productId; 182 | } else if (ports[i].pnpId) { 183 | try { 184 | pid = '0x' + /PID_\d*/.exec(ports[i].pnpId)[0].substr(4); 185 | } catch (err) { 186 | pid = ''; 187 | } 188 | } else { 189 | pid = ''; 190 | } 191 | 192 | // TODO: find out if returned ports are immutable 193 | ports[i]._standardPid = pid; 194 | foundPorts.push(ports[i]); 195 | } 196 | 197 | return callback(null, foundPorts); 198 | }); 199 | }; 200 | 201 | module.exports = Connection; 202 | -------------------------------------------------------------------------------- /lib/connection.js: -------------------------------------------------------------------------------- 1 | var Serialport = require('serialport'); 2 | var awty = require('awty'); 3 | 4 | var Connection = function(options) { 5 | this.options = options; 6 | this.debug = this.options.debug; 7 | 8 | this.board = this.options.board; 9 | }; 10 | 11 | Connection.prototype._init = function(callback) { 12 | var _this = this; 13 | 14 | // check for port 15 | if (!_this.options.port) { 16 | // no port, auto sniff for the correct one 17 | _this._sniffPort(function(error, port) { 18 | if (error) { 19 | var error = new Error('an unexpected error happened when connecting to board: ' + error.toString()); 20 | return callback(error); 21 | } 22 | if (port && port.length) { 23 | // found a port, save it 24 | _this.options.port = port[0].path; 25 | 26 | _this.debug('found ' + _this.options.board.name + ' on port ' + _this.options.port); 27 | 28 | // set up serialport for it 29 | _this._setUpSerial(function(error) { 30 | return callback(error); 31 | }); 32 | } else { 33 | // we didn't find the board 34 | return callback(new Error('no Arduino ' + '\'' + _this.options.board.name + '\'' + ' found.')); 35 | } 36 | }); 37 | } else { 38 | // when a port is manually specified 39 | _this._setUpSerial(function(error) { 40 | return callback(error); 41 | }); 42 | } 43 | }; 44 | 45 | /** 46 | * Create new serialport instance for the Arduino board, but do not immediately connect. 47 | */ 48 | Connection.prototype._setUpSerial = function(callback) { 49 | this.serialPort = new Serialport(this.options.port, { 50 | baudRate: this.board.baud, 51 | autoOpen: false 52 | }); 53 | return callback(null); 54 | }; 55 | 56 | /** 57 | * Finds a list of available USB ports, and matches for the right pid 58 | * Auto finds the correct port for the chosen Arduino 59 | * 60 | * @param {function} callback - function to run upon completion/error 61 | */ 62 | Connection.prototype._sniffPort = function(callback) { 63 | var _this = this; 64 | var pidList = _this.board.productId.map(function(id) { 65 | return parseInt(id, 16); 66 | }); 67 | 68 | _this._listPorts(function(error, ports) { 69 | if (error) return callback(error); 70 | // filter for a match by product id 71 | var portMatch = ports.filter(function(p) { 72 | return pidList.indexOf(parseInt(p._standardPid, 16)) !== -1; 73 | }); 74 | 75 | return callback(null, portMatch); 76 | }); 77 | }; 78 | 79 | /** 80 | * Sets the DTR/RTS lines to either true or false 81 | * 82 | * @param {boolean} bool - value to set DTR and RTS to 83 | * @param {number} timeout - number in milliseconds to delay after 84 | * @param {function} callback - function to run upon completion/error 85 | */ 86 | Connection.prototype._setDTR = function(bool, timeout, callback) { 87 | var _this = this; 88 | var props = { 89 | rts: bool, 90 | dtr: bool 91 | }; 92 | 93 | _this.serialPort.set(props, function(error) { 94 | if (error) { 95 | return callback(error); 96 | } 97 | 98 | setTimeout(function() { 99 | callback(error); 100 | }, timeout); 101 | }); 102 | }; 103 | 104 | /** 105 | * Checks the list of ports 4 times for a device to show up 106 | * 107 | * @param {function} callback - function to run upon completion/error 108 | */ 109 | Connection.prototype._pollForPort = function(callback) { 110 | var _this = this; 111 | 112 | var poll = awty(function(next) { 113 | var found = false; 114 | 115 | // try to sniff port instead (for port hopping devices) 116 | _this._sniffPort(function(error, port) { 117 | if (error) return callback(error); 118 | if (port.length) { 119 | // found a port, save it 120 | _this.options.port = port[0].path; 121 | found = true; 122 | } 123 | 124 | next(found); 125 | }); 126 | }); 127 | 128 | poll.every(100).ask(15); 129 | 130 | poll(function(foundPort) { 131 | if (foundPort) { 132 | _this.debug('found port on', _this.options.port); 133 | // set up serialport for it 134 | _this._setUpSerial(function(error) { 135 | return callback(error); 136 | }); 137 | } else { 138 | // we also could not find the device on auto sniff 139 | return callback(new Error('could not reconnect after resetting board.')); 140 | } 141 | }); 142 | }; 143 | 144 | Connection.prototype._pollForOpen = function(callback) { 145 | var _this = this; 146 | 147 | var poll = awty(function(next) { 148 | _this.serialPort.open(function(error) { 149 | next(!error); 150 | }); 151 | }); 152 | 153 | poll.every(200).ask(10); 154 | 155 | poll(function(isOpen) { 156 | var error; 157 | if (!isOpen) { 158 | error = new Error('could not open board on ' + _this.serialPort.path); 159 | } 160 | 161 | callback(error); 162 | }); 163 | }; 164 | 165 | /** 166 | * Return a list of devices on serial ports. In addition to the output provided 167 | * by SerialPort.list, it adds a platform independent PID in _pid 168 | * 169 | * @param {function} callback - function to run upon completion/error 170 | */ 171 | Connection.prototype._listPorts = function(callback) { 172 | var foundPorts = []; 173 | 174 | // list all available ports 175 | Serialport.list().then(function(ports) { 176 | // iterate through ports 177 | for (var i = 0; i < ports.length; i += 1) { 178 | var pid; 179 | 180 | // are we on windows or unix? 181 | if (ports[i].productId) { 182 | pid = ports[i].productId; 183 | } else if (ports[i].pnpId) { 184 | try { 185 | pid = '0x' + /PID_\d*/.exec(ports[i].pnpId)[0].substr(4); 186 | } catch (err) { 187 | pid = ''; 188 | } 189 | } else { 190 | pid = ''; 191 | } 192 | 193 | ports[i]._standardPid = pid; 194 | foundPorts.push(ports[i]); 195 | } 196 | 197 | if (callback) return callback(null, foundPorts); 198 | }).catch(function(error) { if (callback) return callback(error); }); 199 | }; 200 | 201 | module.exports = Connection; 202 | -------------------------------------------------------------------------------- /lib/protocol.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Generic Protocol for other protocols to inherit from 3 | * 4 | */ 5 | var Protocol = function(options) { 6 | this.debug = options.debug; 7 | this.megaDebug = options.megaDebug; 8 | 9 | this.board = options.board; 10 | this.connection = options.connection; 11 | // eslint-disable-next-line new-cap 12 | this.chip = new options.protocol({ quiet: !this.megaDebug }); 13 | }; 14 | 15 | /** 16 | * Resets an Arduino STK500 bootloaded chip by pulsing DTR high. 17 | * 18 | * Avoids the dreaded timeout bug if the serialport was opened since the device 19 | * was powered. 20 | * 21 | * @param {function} callback - function to run upon completion/error 22 | */ 23 | Protocol.prototype._reset = function(callback) { 24 | var _this = this; 25 | 26 | // set DTR from high to low 27 | _this.connection._setDTR(false, 250, function(error) { 28 | if (!error) { 29 | _this.debug('reset complete.'); 30 | } 31 | 32 | return callback(error); 33 | }); 34 | }; 35 | 36 | module.exports = Protocol; 37 | -------------------------------------------------------------------------------- /lib/protocols.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | stk500v1: require('./stk500v1'), 3 | stk500v2: require('./stk500v2'), 4 | avr109: require('./avr109') 5 | }; 6 | -------------------------------------------------------------------------------- /lib/stk500v1.js: -------------------------------------------------------------------------------- 1 | var STK = require('stk500'); 2 | var colors = require('colors'); 3 | var tools = require('./tools'); 4 | var Protocol = require('./protocol'); 5 | var util = require('util'); 6 | 7 | var Stk500v1 = function(options) { 8 | options.protocol = STK; 9 | Protocol.call(this, options); 10 | }; 11 | 12 | util.inherits(Stk500v1, Protocol); 13 | 14 | /** 15 | * Uploads the provided hex file to the board, via the stk500v1 protocol 16 | * 17 | * @param {string} file - path to hex file for uploading 18 | * @param {function} callback - function to run upon completion/error 19 | */ 20 | Stk500v1.prototype._upload = function(file, callback) { 21 | var _this = this; 22 | 23 | this.serialPort = this.connection.serialPort; 24 | 25 | // open/parse supplied hex file 26 | var hex = tools._parseHex(file); 27 | if (!Buffer.isBuffer(hex)) { 28 | return callback(hex); 29 | } 30 | 31 | // open connection 32 | _this.serialPort.open(function(error) { 33 | if (error) { return callback(error); } 34 | 35 | _this.debug('connected'); 36 | 37 | // reset 38 | _this._reset(function(error) { 39 | if (error) { return callback(error); } 40 | 41 | _this.debug('flashing, please wait...'); 42 | 43 | // flash 44 | _this.chip.bootload(_this.serialPort, hex, _this.board, function(error) { 45 | var color = (error ? colors.red : colors.green); 46 | 47 | _this.debug(color('flash complete.')); 48 | 49 | // Always close the serialport 50 | _this.serialPort.close(); 51 | 52 | return callback(error); 53 | }); 54 | }); 55 | }); 56 | }; 57 | 58 | Stk500v1.prototype._reset = function(callback) { 59 | var _this = this; 60 | 61 | _this.connection._setDTR(false, 250, function(error) { 62 | if (error) { return callback(error); } 63 | 64 | _this.connection._setDTR(true, 50, function(error) { 65 | _this.debug('reset complete.'); 66 | return callback(error); 67 | }); 68 | }); 69 | }; 70 | 71 | module.exports = Stk500v1; 72 | -------------------------------------------------------------------------------- /lib/stk500v2.js: -------------------------------------------------------------------------------- 1 | var STK2 = require('stk500-v2'); 2 | var async = require('async'); 3 | var colors = require('colors'); 4 | var tools = require('./tools'); 5 | var Protocol = require('./protocol'); 6 | var util = require('util'); 7 | 8 | var Stk500v2 = function(options) { 9 | options.protocol = function() { return STK2; }; 10 | 11 | Protocol.call(this, options); 12 | }; 13 | 14 | util.inherits(Stk500v2, Protocol); 15 | 16 | /** 17 | * Uploads the provided hex file to the board, via the stk500v2 protocol 18 | * 19 | * @param {buffer} hex - buffer of hex file for uploading 20 | * @param {function} callback - function to run upon completion/error 21 | */ 22 | Stk500v2.prototype._upload = function(file, callback) { 23 | var _this = this; 24 | 25 | _this.serialPort = _this.connection.serialPort; 26 | 27 | // open/parse supplied hex file 28 | var hex = tools._parseHex(file); 29 | if (!Buffer.isBuffer(hex)) { 30 | return callback(hex); 31 | } 32 | 33 | // open connection 34 | _this.serialPort.open(function(error) { 35 | if (error) { return callback(error); } 36 | 37 | _this.debug('connected'); 38 | 39 | // instantiate stk500v2 with newly open serialport 40 | var chip = _this.chip(_this.serialPort); 41 | 42 | async.series([ 43 | _this._reset.bind(_this), 44 | chip.sync.bind(chip, 5), 45 | chip.verifySignature.bind(chip, _this.board.signature), 46 | chip.enterProgrammingMode.bind(chip, _this.board), 47 | function debugLog(callback) { 48 | _this.debug('flashing, please wait...'); 49 | callback(null); 50 | }, 51 | 52 | chip.upload.bind(chip, hex, _this.board.pageSize), 53 | chip.exitProgrammingMode.bind(chip) 54 | ], 55 | function(error) { 56 | var color = (error ? colors.red : colors.green); 57 | _this.debug(color('flash complete.')); 58 | 59 | // Always close the serialport 60 | _this.serialPort.close(); 61 | 62 | return callback(error); 63 | }); 64 | }); 65 | }; 66 | 67 | module.exports = Stk500v2; 68 | -------------------------------------------------------------------------------- /lib/test-pilot-checker.js: -------------------------------------------------------------------------------- 1 | var child = require('child_process'); 2 | var path = require('path'); 3 | 4 | module.exports.checkForInstall = function(callback) { 5 | child.exec('npm ls --json', {cwd: __dirname}, function(error, stdout) { 6 | if (error) return callback(error); 7 | return callback(null, !!JSON.parse(stdout).dependencies['avrga-tester']); 8 | }); 9 | }; 10 | 11 | module.exports.install = function(callback) { 12 | child.exec('npm install avrga-tester', {cwd: __dirname}, function(error) { 13 | return callback(error); 14 | }); 15 | }; 16 | 17 | module.exports.run = function() { 18 | var tp = child.exec('node ' + path.join(__dirname, '..', 'tests', 'test-pilot.js'), function(error) { 19 | console.log(error); 20 | }); 21 | tp.stdout.pipe(process.stdout); 22 | }; 23 | -------------------------------------------------------------------------------- /lib/tools.js: -------------------------------------------------------------------------------- 1 | var fs = require('graceful-fs'); 2 | var intelhex = require('intel-hex'); 3 | 4 | var tools = {}; 5 | 6 | /** 7 | * Opens and parses a given hex file 8 | */ 9 | tools._parseHex = function(file) { 10 | try { 11 | var data; 12 | if (typeof file === 'string') { 13 | data = fs.readFileSync(file, { 14 | encoding: 'utf8' 15 | }); 16 | } else { 17 | // ensure compatibility with browser array buffers 18 | data = Buffer.from(file); 19 | } 20 | 21 | return intelhex.parse(data).data; 22 | } catch (error) { 23 | return error; 24 | } 25 | }; 26 | 27 | tools._hexStringToByte = function(str) { 28 | return Buffer.from([parseInt(str,16)]); 29 | } 30 | 31 | module.exports = tools; 32 | -------------------------------------------------------------------------------- /notes.md: -------------------------------------------------------------------------------- 1 | # Chrome Serial support for Avrgirl Arduino 2 | 3 | ## methods and properties needed for direct mappings / translation interface 4 | 5 | ### constructor / static 6 | + `new SerialPort()` -> `navigator.serial.requestPort` 7 | + `SerialPort.list` -> `navigator.serial.getPorts` 8 | 9 | ### instance 10 | + `serialPort.open` -> `serialPort.open` 11 | + `serialPort.path` -> manually set after user gesture and user permission granted? I don't see it in the port info object 12 | + `serialPort.close` -> `serialPort.close` 13 | + `serialPort.set` -> `serialPort.setControlSignals` 14 | + `serialPort.write` -> `serialPort.writeable.getWriter().write` 15 | + `serialPort.read` -> `serialPort.readable.getReader().read` 16 | + `serialPort.flush` -> `serialPort.flush` 17 | 18 | ### events 19 | + error 20 | + close 21 | + open 22 | 23 | **Note:** this list is not exhaustive of node serialport but these are the minimum requirements in order to bootstrap Avrgirl Arduino 24 | 25 | ## questions 26 | + what should the default buffer size be for writing? Although in Avrgirl we can set this to the pageSize + amount of control bytes needed for opcodes 27 | + should the browser serialport library shim be written in typescript? (probably) 28 | + how are the pid and vid properties extracted? Assumption is that they're included in the properties of `getPorts` results though I don't see it in the fake mock that Reilly wrote 29 | + how can a static method be declared in an ES6 class declaration? I forget right now and I don't have internet for a week to look it up 30 | + should a more modern interface of promises be an option for the library shim while remaining compatible with existing callback implementation? 31 | + should the bundler be changed from browserify to webpack? graceful-fs would need to be swapped out for regular fs if so 32 | + do the events all match up to equivalencies? 33 | + perhaps the serialPort.path needs to be the id of the serial device instance? How do we reconnect after a reset of the device? 34 | 35 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "avrgirl-arduino", 3 | "version": "5.0.1", 4 | "description": "A NodeJS library for flashing compiled sketch files to Arduino microcontroller boards.", 5 | "bin": "./bin/cli.js", 6 | "main": "avrgirl-arduino-node.js", 7 | "module": "dist/avrgirl-arduino.min.js", 8 | "scripts": { 9 | "dev-browser": "webpack --watch", 10 | "lint": "eslint --fix \"tests/*.spec.js\" \"tests/helpers/*.js\" \"avrgirl-arduino.js\" \"lib/*.js\"", 11 | "tape": "tape \"tests/*.spec.js\" | tap-spec", 12 | "test": "npm run tape && npm run lint", 13 | "cover": "istanbul cover ./tests/*.spec.js", 14 | "demo": "sh -c 'node tests/demos/$1' --" 15 | }, 16 | "repository": { 17 | "type": "git", 18 | "url": "https://github.com/noopkat/avrgirl-arduino.git" 19 | }, 20 | "keywords": [ 21 | "arduino", 22 | "avr", 23 | "avr109", 24 | "stk500", 25 | "avrdude", 26 | "avrgirl", 27 | "avrg" 28 | ], 29 | "author": "Suz Hinton", 30 | "license": "MIT", 31 | "bugs": { 32 | "url": "https://github.com/noopkat/avrgirl-arduino/issues" 33 | }, 34 | "homepage": "https://github.com/noopkat/avrgirl-arduino", 35 | "dependencies": { 36 | "async": "^2.6.3", 37 | "awty": "^0.1.0", 38 | "browser-serialport": "git+https://github.com/noopkat/browser-serialport.git#c8628c41c11890d3058875994c15f83f2df8185b", 39 | "chip.avr.avr109": "^1.1.1", 40 | "colors": "^1.4.0", 41 | "graceful-fs": "^4.2.4", 42 | "intel-hex": "^0.1.2", 43 | "minimist": "^1.2.5", 44 | "process": "^0.11.10", 45 | "serialport": "^9.0.6", 46 | "stk500": "^2.0.3", 47 | "stk500-v2": "^1.0.4" 48 | }, 49 | "devDependencies": { 50 | "jscs-loader": "^0.3.0", 51 | "util": "^0.12.3", 52 | "buffer": "^6.0.3", 53 | "stream-browserify": "^3.0.0", 54 | "os-browserify": "^0.3.0", 55 | "eslint": "^6.5.0", 56 | "istanbul": "^0.4.0", 57 | "istanbul-coveralls": "^1.0.3", 58 | "proxyquire": "^1.7.3", 59 | "sinon": "^9.2.3", 60 | "tap-spec": "^5.0.0", 61 | "tape": "^5.1.1", 62 | "terser-webpack-plugin": "^5.1.1", 63 | "virtual-serialport": "^0.3.1", 64 | "webpack": "^5.15.0", 65 | "webpack-cli": "^3.3.12" 66 | }, 67 | "browser": { 68 | "graceful-fs": false, 69 | "serialport": false 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /tests/avrgirl-arduino.spec.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var proxyquire = require('proxyquire'); 3 | var sinon = require('sinon'); 4 | 5 | // proxyquired connection module 6 | var Connection = proxyquire.noCallThru().load('../lib/connection', 7 | { serialport: { 8 | list: function() { return Promise.resolve( 9 | [ 10 | { comName: '/dev/cu.sierravsp', manufacturer: '', serialNumber: '', 11 | pnpId: '', locationId: '', vendorId: '', productId: '' }, 12 | { comName: '/dev/cu.Bluetooth-Incoming-Port', manufacturer: '', 13 | serialNumber: '', pnpId: '', locationId: '', vendorId: '', 14 | productId: '' }, 15 | { comName: '/dev/cu.usbmodem1421', manufacturer: 'Arduino (www.arduino.cc)', 16 | serialNumber: '55432333038351F03170', pnpId: '', locationId: '0x14200000', 17 | vendorId: '0x2341', productId: '0x0043' } 18 | ]) 19 | } 20 | }, 21 | 22 | SerialPort: require('./helpers/mockSerial').SerialPort 23 | }); 24 | 25 | // module to test 26 | var Avrgirl = proxyquire('../', { Connection: Connection }); 27 | 28 | // default options 29 | var DEF_OPTS2 = { 30 | board: 'uno' 31 | }; 32 | 33 | test('[ AVRGIRL-ARDUINO ] method presence', function(t) { 34 | var a = new Avrgirl(DEF_OPTS2); 35 | function isFn(name) { 36 | return typeof a[name] === 'function'; 37 | } 38 | 39 | var methods = ['flash', '_validateBoard', 'listPorts']; 40 | for (var i = 0; i < methods.length; i += 1) { 41 | t.ok(isFn(methods[i]), methods[i]); 42 | if (i === methods.length - 1) { 43 | t.end(); 44 | } 45 | } 46 | }); 47 | 48 | test('[ AVRGIRL-ARDUINO ] new creation', function(t) { 49 | t.plan(3); 50 | 51 | var a = new Avrgirl(DEF_OPTS2); 52 | t.ok(a.connection, 'connection was established'); 53 | t.ok(a.options.board.baud, 'board was established'); 54 | t.ok(a.protocol.chip, 'protocol was established'); 55 | }); 56 | 57 | test('[ AVRGIRL-ARDUINO ] ::_validateBoard (GOOD)', function(t) { 58 | t.plan(1); 59 | 60 | var a = new Avrgirl(DEF_OPTS2); 61 | a._validateBoard(function(error) { 62 | t.error(error, 'no error'); 63 | }); 64 | }); 65 | 66 | test('[ AVRGIRL-ARDUINO ] ::_validateBoard (SPARSE)', function(t) { 67 | t.plan(1); 68 | 69 | var a = new Avrgirl({ board: { name: DEF_OPTS2.board } }); 70 | a._validateBoard(function(error) { 71 | t.error(error, 'no error'); 72 | }); 73 | }); 74 | 75 | test('[ AVRGIRL-ARDUINO ] ::_validateBoard (SPARSE NO NAME)', function(t) { 76 | t.plan(1); 77 | 78 | var a = new Avrgirl({ board: { notName: DEF_OPTS2.board } }); 79 | a._validateBoard(function(error) { 80 | t.ok(error, 'error returned'); 81 | }); 82 | }); 83 | 84 | test('[ AVRGIRL-ARDUINO ] ::_validateBoard (NO BOARD)', function(t) { 85 | t.plan(1); 86 | 87 | var a = new Avrgirl({ board: 'bacon' }); 88 | a._validateBoard(function(error) { 89 | t.ok(error, 'error returned'); 90 | }); 91 | }); 92 | 93 | test('[ AVRGIRL-ARDUINO ] ::_validateBoard (NO PROTOCOL)', function(t) { 94 | t.plan(1); 95 | 96 | var a = new Avrgirl(DEF_OPTS2); 97 | a.protocol = 'bacon'; 98 | a._validateBoard(function(error) { 99 | t.ok(error, 'error returned'); 100 | }); 101 | }); 102 | 103 | test('[ AVRGIRL-ARDUINO ] ::_validateBoard (NO PORT & PRO-MINI)', function(t) { 104 | t.plan(1); 105 | 106 | var a = new Avrgirl({ board: 'pro-mini' }); 107 | a._validateBoard(function(error) { 108 | t.ok(error, 'error returned'); 109 | }); 110 | }); 111 | 112 | test('[ AVRGIRL-ARDUINO ] ::listPorts', function(t) { 113 | t.plan(3); 114 | Avrgirl.listPorts(function(error, ports) { 115 | t.ok(ports.length, 'got a list of ports'); 116 | t.ok(ports[2]._standardPid, 'added _standardPid property'); 117 | t.error(error, 'no error on listing'); 118 | }); 119 | }); 120 | 121 | test('[ AVRGIRL-ARDUINO ] ::listPorts (prototype)', function(t) { 122 | t.plan(3); 123 | var a = new Avrgirl(DEF_OPTS2); 124 | a.listPorts(function(error, ports) { 125 | t.ok(ports.length, 'got a list of ports'); 126 | t.ok(ports[2]._standardPid, 'added _standardPid property'); 127 | t.error(error, 'no error on listing'); 128 | }); 129 | }); 130 | 131 | test('[ AVRGIRL-ARDUINO ] ::flash (shallow)', function(t) { 132 | t.plan(4); 133 | var a = new Avrgirl(DEF_OPTS2); 134 | var spyInit = sinon.stub(a.connection, '_init').callsFake(function(callback) { 135 | return callback(null); 136 | }); 137 | 138 | var spyUpload = sinon.stub(a.protocol, '_upload').callsFake(function(file, callback) { 139 | return callback(null); 140 | }); 141 | 142 | var spyValidate = sinon.spy(a, '_validateBoard'); 143 | 144 | a.flash(__dirname + '/../junk/hex/uno/Blink.cpp.hex', function(error) { 145 | t.ok(spyValidate.calledOnce, 'validated board'); 146 | t.ok(spyInit.calledOnce, 'connection init'); 147 | t.ok(spyUpload.calledOnce, 'upload to board attempt'); 148 | t.error(error, 'no error'); 149 | }); 150 | }); 151 | -------------------------------------------------------------------------------- /tests/connection.spec.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var proxyquire = require('proxyquire'); 3 | var mockSerial = require('./helpers/mockSerial'); 4 | 5 | // module to test 6 | var ConnectionTest = proxyquire.noCallThru().load('../lib/connection', { SerialPort: mockSerial.SerialPort }); 7 | 8 | // default options 9 | var DEF_OPTS1 = { 10 | debug: false, 11 | board: { 12 | baud: 115200, 13 | signature: Buffer.from([0x1e, 0x95, 0x0f]), 14 | pageSize: 128, 15 | numPages: 256, 16 | timeout: 400, 17 | productId: ['0x0043', '0x7523', '0x0001', '0xea60'], 18 | protocol: 'stk500v1' 19 | }, 20 | port: '' 21 | }; 22 | 23 | test('[ Connection ] - new creation', function(t) { 24 | t.plan(2); 25 | var c = new ConnectionTest(DEF_OPTS1); 26 | t.ok(c.board, 'board exists'); 27 | t.equal(c.board.protocol, 'stk500v1', 'random board property is as expected'); 28 | }); 29 | 30 | test('[ Connection ] ::_listPorts (UNIX)', function(t) { 31 | t.plan(3); 32 | var ConnectionTest = proxyquire.noCallThru().load('../lib/connection', { serialport: { 33 | list: function() { return Promise.resolve( 34 | [ 35 | { comName: '/dev/cu.sierravsp', manufacturer: '', serialNumber: '', 36 | pnpId: '', locationId: '', vendorId: '', productId: '' }, 37 | { comName: '/dev/cu.Bluetooth-Incoming-Port', manufacturer: '', 38 | serialNumber: '', pnpId: '', locationId: '', vendorId: '', 39 | productId: '' }, 40 | { comName: '/dev/cu.usbmodem1421', manufacturer: 'Arduino (www.arduino.cc)', 41 | serialNumber: '55432333038351F03170', pnpId: '', locationId: '0x14200000', 42 | vendorId: '0x2341', productId: '0x0043' } 43 | ]); 44 | }, 45 | SerialPort: mockSerial.SerialPort 46 | } 47 | }); 48 | 49 | // nodejs 0.10.x race condition needs this 50 | setTimeout(function() { 51 | var c = new ConnectionTest(DEF_OPTS1); 52 | c._listPorts(function(error, ports) { 53 | t.ok(ports.length, 'got a list of ports'); 54 | t.ok(ports[2]._standardPid, 'added _standardPid property'); 55 | t.error(error, 'no error on listing'); 56 | }); 57 | }, 200); 58 | }); 59 | 60 | test('[ Connection ] ::_listPorts (WINDOWS)', function(t) { 61 | t.plan(3); 62 | var ConnectionTest = proxyquire.noCallThru().load('../lib/connection', { serialport: { 63 | list: function() { return Promise.resolve( 64 | [ 65 | { comName: 'COM3', manufacturer: 'Microsoft', serialNumber: '', 66 | pnpId: 'USB\\\\VID_2341&PID_0043\\\\55432333038351F03170', 67 | locationId: '', 68 | vendorId: '', 69 | productId: '' 70 | } 71 | ]); 72 | }, 73 | 74 | SerialPort: mockSerial.SerialPort 75 | } 76 | }); 77 | 78 | // nodejs 0.10.x race condition needs this 79 | setTimeout(function() { 80 | var c = new ConnectionTest(DEF_OPTS1); 81 | c._listPorts(function(error, ports) { 82 | t.ok(ports.length, 'got a list of ports'); 83 | t.ok(ports[0]._standardPid, 'added _standardPid property'); 84 | t.error(error, 'no error on listing'); 85 | }); 86 | }, 200); 87 | }); 88 | 89 | test('[ Connection ] ::_sniffPort (UNIX)', function(t) { 90 | t.plan(3); 91 | var ConnectionTest = proxyquire.noCallThru().load('../lib/connection', { serialport: { 92 | list: function() { return Promise.resolve( 93 | [ 94 | { comName: '/dev/cu.sierravsp', manufacturer: '', serialNumber: '', 95 | pnpId: '', locationId: '', vendorId: '', productId: '' }, 96 | { comName: '/dev/cu.Bluetooth-Incoming-Port', manufacturer: '', 97 | serialNumber: '', pnpId: '', locationId: '', vendorId: '', 98 | productId: '' }, 99 | { comName: '/dev/cu.usbmodem1421', manufacturer: 'Arduino (www.arduino.cc)', 100 | serialNumber: '55432333038351F03170', pnpId: '', locationId: '0x14200000', 101 | vendorId: '0x2341', productId: '0x0043' } 102 | ]); 103 | }, 104 | SerialPort: mockSerial.SerialPort 105 | } 106 | }); 107 | 108 | // nodejs 0.10.x race condition needs this 109 | setTimeout(function() { 110 | var c = new ConnectionTest(DEF_OPTS1); 111 | c._sniffPort(function(error, match) { 112 | t.ok(match.length, 'board was detected'); 113 | t.equal(match[0].comName, '/dev/cu.usbmodem1421', 'correct comName to match against'); 114 | t.error(error, 'no error on return'); 115 | }); 116 | }, 200); 117 | }); 118 | 119 | test('[ Connection ] ::_sniffPort (WINDOWS)', function(t) { 120 | t.plan(3); 121 | var ConnectionTest = proxyquire.noCallThru().load('../lib/connection', { serialport: { 122 | list: function() { return Promise.resolve( 123 | [ 124 | { comName: 'COM3', manufacturer: 'Microsoft', serialNumber: '', 125 | pnpId: 'USB\\\\VID_2341&PID_0043\\\\55432333038351F03170', 126 | locationId: '', vendorId: '', productId: '' } 127 | ]); 128 | }, 129 | SerialPort: mockSerial.SerialPort 130 | } 131 | }); 132 | 133 | // nodejs 0.10.x race condition needs this 134 | setTimeout(function() { 135 | var c = new ConnectionTest(DEF_OPTS1); 136 | c._sniffPort(function(error, match) { 137 | t.ok(match.length, 'board was detected'); 138 | t.equal(match[0].comName, 'COM3', 'correct comName to match against'); 139 | t.error(error, 'no error on return'); 140 | }); 141 | }, 200); 142 | }); 143 | 144 | test('[ Connection ] ::_pollForPort', function(t) { 145 | t.plan(1); 146 | var mockedSerial = mockSerial.SerialPort; 147 | mockedSerial.list = function() { return Promise.resolve( 148 | [ 149 | { comName: '/dev/cu.sierravsp', manufacturer: '', serialNumber: '', 150 | pnpId: '', locationId: '', vendorId: '', productId: '' }, 151 | { comName: '/dev/cu.Bluetooth-Incoming-Port', manufacturer: '', 152 | serialNumber: '', pnpId: '', locationId: '', vendorId: '', 153 | productId: '' }, 154 | { comName: '/dev/cu.usbmodem1421', manufacturer: 'Arduino (www.arduino.cc)', 155 | serialNumber: '55432333038351F03170', pnpId: '', locationId: '0x14200000', 156 | vendorId: '0x2341', productId: '0x0043' } 157 | ]); 158 | }; 159 | 160 | var ConnectionTest = proxyquire.noCallThru() 161 | .load('../lib/connection', { serialport: mockSerial.SerialPort }); 162 | 163 | var options = { 164 | debug: function(){}, 165 | board: { 166 | baud: 115200, 167 | signature: Buffer.from([0x1e, 0x95, 0x0f]), 168 | pageSize: 128, 169 | numPages: 256, 170 | timeout: 400, 171 | productId: ['0x0043', '0x7523', '0x0001', '0xea60'], 172 | protocol: 'stk500v1' 173 | }, 174 | port: '/dev/cu.usbmodem1421' 175 | }; 176 | 177 | var c = new ConnectionTest(options); 178 | c._pollForPort(function(error, ports) { 179 | console.log(error, ports); 180 | t.error(error, 'no error on polling result'); 181 | }); 182 | }); 183 | -------------------------------------------------------------------------------- /tests/demos/arduboy.js: -------------------------------------------------------------------------------- 1 | var Avrgirl = require('../../'); 2 | var avrgirl = new Avrgirl({ 3 | board: 'leonardo', 4 | debug: true 5 | }); 6 | 7 | var hex = __dirname + '/../../junk/hex/arduboy/rund.cpp.leonardo.hex'; 8 | 9 | avrgirl.flash(hex, function(error) { 10 | if (error) { 11 | console.error(error); 12 | } else { 13 | console.info('done.'); 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /tests/demos/blend-micro.js: -------------------------------------------------------------------------------- 1 | var Avrgirl = require('../../'); 2 | var avrgirl = new Avrgirl({ 3 | board: 'blend-micro', 4 | debug: true 5 | }); 6 | 7 | var hex = __dirname + '/../../junk/hex/blend-micro/Blink.cpp.hex'; 8 | 9 | avrgirl.flash(hex, function(error) { 10 | if (error) { 11 | console.error(error); 12 | } else { 13 | console.info('done.'); 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /tests/demos/circuit-playground-classic.js: -------------------------------------------------------------------------------- 1 | var Avrgirl = require('../../'); 2 | 3 | var avrgirl = new Avrgirl({ 4 | board: 'circuit-playground-classic', 5 | debug: true 6 | }); 7 | 8 | var hex = __dirname + '/../../junk/hex/circuit-playground-classic/Blink.cpp.hex'; 9 | 10 | avrgirl.flash(hex, function(error) { 11 | if (error) { 12 | console.error(error); 13 | } else { 14 | console.log('done.'); 15 | } 16 | }); 17 | -------------------------------------------------------------------------------- /tests/demos/due168.js: -------------------------------------------------------------------------------- 1 | var Avrgirl = require('../../'); 2 | var avrgirl = new Avrgirl({ 3 | board: 'duemilanove168', 4 | debug: true 5 | }); 6 | 7 | var hex = __dirname + '/../../junk/hex/duemilanove168/Blink.cpp.hex'; 8 | 9 | avrgirl.flash(hex, function(error) { 10 | if (error) { 11 | console.error(error); 12 | } else { 13 | console.info('done.'); 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /tests/demos/feather.js: -------------------------------------------------------------------------------- 1 | var Avrgirl = require('../../'); 2 | var avrgirl = new Avrgirl({ 3 | board: 'feather', 4 | debug: true 5 | }); 6 | 7 | var hex = __dirname + '/../../junk/hex/feather/Blink.cpp.hex'; 8 | 9 | avrgirl.flash(hex, function(error) { 10 | if (error) { 11 | console.error(error); 12 | } else { 13 | console.info('done.'); 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /tests/demos/imuduino.js: -------------------------------------------------------------------------------- 1 | var Avrgirl = require('../../'); 2 | const avrgirl = new Avrgirl({ 3 | board: 'imuduino', 4 | debug: true 5 | }); 6 | 7 | const hex = __dirname + '/../../junk/hex/imuduino/Blink.cpp.hex'; 8 | 9 | avrgirl.flash(hex, function(error) { 10 | if (error) { 11 | console.error(error); 12 | } else { 13 | console.info('done.'); 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /tests/demos/leonardo.js: -------------------------------------------------------------------------------- 1 | var Avrgirl = require('../../'); 2 | var avrgirl = new Avrgirl({ 3 | board: 'leonardo', 4 | debug: true 5 | }); 6 | 7 | var hex = __dirname + '/../../junk/hex/leonardo/Blink.cpp.hex'; 8 | 9 | avrgirl.flash(hex, function(error) { 10 | if (error) { 11 | console.error(error); 12 | } else { 13 | console.info('done.'); 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /tests/demos/lilypad-usb.js: -------------------------------------------------------------------------------- 1 | var Avrgirl = require('../../'); 2 | var avrgirl = new Avrgirl({ 3 | board: 'lilypad-usb', 4 | debug: true 5 | }); 6 | 7 | var hex = __dirname + '/../../junk/hex/lilypad-usb/Blink.cpp.hex'; 8 | 9 | avrgirl.flash(hex, function(error) { 10 | if (error) { 11 | console.error(error); 12 | } else { 13 | console.info('done.'); 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /tests/demos/mega.js: -------------------------------------------------------------------------------- 1 | var Avrgirl = require('../../'); 2 | var avrgirl = new Avrgirl({ 3 | board: 'mega', 4 | debug: true 5 | }); 6 | 7 | var hex = __dirname + '/../../junk/hex/mega/Blink.cpp.hex'; 8 | 9 | avrgirl.flash(hex, function(error) { 10 | if (error) { 11 | console.error(error); 12 | } else { 13 | console.info('done.'); 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /tests/demos/micro.js: -------------------------------------------------------------------------------- 1 | var Avrgirl = require('../../'); 2 | var board = { 3 | name: 'micro', 4 | baud: 57600, 5 | signature: Buffer.from([0x43, 0x41, 0x54, 0x45, 0x52, 0x49, 0x4e]), 6 | productId: ['0x0037', '0x8037', '0x0036'], 7 | protocol: 'avr109' 8 | }; 9 | 10 | var avrgirl = new Avrgirl({ 11 | board: board, 12 | debug: true 13 | }); 14 | 15 | var hex = __dirname + '/../../junk/hex/micro/Blink.cpp.hex'; 16 | 17 | avrgirl.flash(hex, function(error) { 18 | if (error) { 19 | console.error(error); 20 | } else { 21 | console.info('done.'); 22 | } 23 | }); 24 | -------------------------------------------------------------------------------- /tests/demos/nano.js: -------------------------------------------------------------------------------- 1 | var Avrgirl = require('../../'); 2 | var avrgirl = new Avrgirl({ 3 | board: 'nano', 4 | debug: true 5 | }); 6 | 7 | var hex = __dirname + '/../../junk/hex/nano/Blink.cpp.hex'; 8 | 9 | avrgirl.flash(hex, function(error) { 10 | if (error) { 11 | console.error(error); 12 | } else { 13 | console.info('done.'); 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /tests/demos/pinoccio.js: -------------------------------------------------------------------------------- 1 | var Avrgirl = require('../../'); 2 | var avrgirl = new Avrgirl({ 3 | board: 'pinoccio', 4 | debug: true 5 | }); 6 | 7 | var hex = __dirname + '/../../junk/hex/pinoccio/Blink.cpp.hex'; 8 | 9 | avrgirl.flash(hex, function(error) { 10 | if (error) { 11 | console.error(error); 12 | } else { 13 | console.info('done.'); 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /tests/demos/pro-mini.js: -------------------------------------------------------------------------------- 1 | var Avrgirl = require('../../'); 2 | var avrgirl = new Avrgirl({ 3 | board: 'pro-mini', 4 | port: '/dev/cu.usbserial-A50285BI', 5 | debug: true 6 | }); 7 | 8 | var hex = __dirname + '/../../junk/hex/pro-mini/StandardFirmata-3v.cpp.hex'; 9 | 10 | avrgirl.flash(hex, function(error) { 11 | if (error) { 12 | console.error(error); 13 | } else { 14 | console.info('done.'); 15 | } 16 | }); 17 | -------------------------------------------------------------------------------- /tests/demos/qduino.js: -------------------------------------------------------------------------------- 1 | var Avrgirl = require('../../'); 2 | var avrgirl = new Avrgirl({ 3 | board: 'qduino', 4 | debug: true 5 | }); 6 | 7 | var hex = __dirname + '/../../junk/hex/qduino/rainbow.cpp.hex'; 8 | 9 | avrgirl.flash(hex, function(error) { 10 | if (error) { 11 | console.error(error); 12 | } else { 13 | console.info('done.'); 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /tests/demos/sf-pro-micro.js: -------------------------------------------------------------------------------- 1 | var Avrgirl = require('../../'); 2 | var avrgirl = new Avrgirl({ 3 | board: 'sf-pro-micro', 4 | debug: true 5 | }); 6 | 7 | var hex = __dirname + '/../../junk/hex/sf-pro-micro/Blink-5v.cpp.hex'; 8 | 9 | avrgirl.flash(hex, function(error) { 10 | if (error) { 11 | console.error(error); 12 | } else { 13 | console.info('done.'); 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /tests/demos/tinyduino.js: -------------------------------------------------------------------------------- 1 | var Avrgirl = require('../../'); 2 | var avrgirl = new Avrgirl({ 3 | board: 'tinyduino', 4 | debug: true 5 | }); 6 | 7 | var hex = __dirname + '/../../junk/hex/tinyduino/Blink.cpp.hex'; 8 | 9 | avrgirl.flash(hex, function(error) { 10 | if (error) { 11 | console.error(error); 12 | } else { 13 | console.info('done.'); 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /tests/demos/uno.js: -------------------------------------------------------------------------------- 1 | var Avrgirl = require('../../'); 2 | 3 | var avrgirl = new Avrgirl({ 4 | board: 'uno', 5 | debug: true 6 | }); 7 | 8 | var hex = __dirname + '/../../junk/hex/uno/Blink.cpp.hex'; 9 | 10 | avrgirl.flash(hex, function(error) { 11 | if (error) { 12 | console.error(error); 13 | } else { 14 | console.info('done.'); 15 | } 16 | }); 17 | -------------------------------------------------------------------------------- /tests/demos/webserial/README.md: -------------------------------------------------------------------------------- 1 | # Web Serial Demo of AvrGirl Arduino 2 | 3 | ⚠️ Web serial support in AvrGirl Arduino is alpha right now and not guaranteed to be stable and full featured. ⚠️ 4 | 5 | This directory contains a simple web app example of how to use Avrgirl Arduino in the browser. An equivalent example using React can be found [here](./react-demo). 6 | 7 | ## How to navigate this example 8 | 9 | Most of the functionality is contained within `index.html`. All of the HTML elements are optional - they provide an interactive way to choose a file to upload and the Arduino board type. If you can provide a hex file in text format, you can avoid using an UI to source a file. 10 | 11 | This example uses the 'global' type of AvrGirl Arduino library distribution, which means that the `AvrgirlArduino` instance is available on the browser's `window` object. 12 | 13 | You can also use this library as an ES module and bundle it along with your app's code using a tool such a [webpack](https://webpack.js.org/). 14 | 15 | ## How to run this example 16 | 17 | The fastest way to run this example is to git clone this repository, and run a local web server from this directory. If you have Python installed, [Simple HTTP Server](https://docs.python.org/3.8/library/http.server.html?highlight=http%20server#module-http.server) is a great tool for this, or you can also install [http-server](https://www.npmjs.com/package/http-server) from npm. 18 | 19 | 1. Install NodeJS or Python 3 20 | 2. In your terminal, run `git clone https://github.com/noopkat/avrgirl-arduino` 21 | 3. Run `cd avrgirl-arduino/tests/demos/webserial` 22 | 23 | For Python 3, run `python -m http.server 3000` 24 | 25 | For NodeJS, run `npx http-server -p 3000` 26 | 27 | You can then navigate to `http://localhost:3000` in Chrome and play with the app from there. 28 | 29 | ## Caveats 30 | 31 | Currently there is no support for AVR109 / boards that use USB emulation on chip. This includes boards such as Arduino Leonardo, Arduino Micro, Arduboy, etc. There are some technical limitations behind this, and be my guest to give this a try if you're up for a challenge because it's definitely possible to hack this in, it's just something not included with this alpha release. 32 | 33 | The Web Serial API is currently in development and is only available behind a flag on the stable branch of Chrome. Please enable the `#enable-experimental-web-platform-features` flag in `chrome://flags` to run this example. 34 | 35 | ## Find bugs / problems? 36 | 37 | I'd love for you to open an issue or a pull request! This is super new and not thoroughly tested so you'll be helping us move towards beta and full releases by contributing. Thank you! 38 | -------------------------------------------------------------------------------- /tests/demos/webserial/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noopkat/avrgirl-arduino/4c88107415fec46eacabf81fb2fb8a6f271b7828/tests/demos/webserial/favicon.ico -------------------------------------------------------------------------------- /tests/demos/webserial/images/gear.idraw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noopkat/avrgirl-arduino/4c88107415fec46eacabf81fb2fb8a6f271b7828/tests/demos/webserial/images/gear.idraw -------------------------------------------------------------------------------- /tests/demos/webserial/images/gear4.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/demos/webserial/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | avrgirl test 5 | 6 | 7 | 8 | 9 |
10 |
11 |
12 |

Upload-o-matic

13 |

Choose a program to upload to an arduino

14 | 15 |
16 | 22 | 23 | 30 | 31 | 32 |
33 |
34 |
35 | 36 |
37 |
38 |
39 |
40 |
41 |
42 | 43 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /tests/demos/webserial/js/avrgirl-arduino.global.js: -------------------------------------------------------------------------------- 1 | ../../../../dist/avrgirl-arduino.global.js -------------------------------------------------------------------------------- /tests/demos/webserial/react-demo/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /tests/demos/webserial/react-demo/README.md: -------------------------------------------------------------------------------- 1 | # React Web Serial Demo of AvrGirl Arduino 2 | 3 | This directory contains a simple example of how to use Avrgirl Arduino with React. 4 | 5 | ## How to navigate this example 6 | 7 | This React project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). Most of the functionality is contained within `/src/App.js`. This example uses the UMD AvrGirl Arduino library distribution which allows it to be imported and bundled. 8 | 9 | ## How to run this example 10 | 11 | The fastest way to run this example is to git clone this repository and run the app locally. 12 | 13 | 1. Install NodeJS 14 | 2. In your terminal, run `git clone https://github.com/noopkat/avrgirl-arduino` 15 | 3. Run `cd avrgirl-arduino/tests/demos/webserial/react-demo` 16 | 4. Run `npm install` 17 | 5. Run `npm start`. Open `http://localhost:3000` in Chrome to play with the app. 18 | 19 | ## Caveats 20 | 21 | The Web Serial API is currently in development and is only available behind a flag on the stable branch of Chrome. Please enable the `#enable-experimental-web-platform-features` flag in `chrome://flags` to run this example. 22 | -------------------------------------------------------------------------------- /tests/demos/webserial/react-demo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-demo", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^4.2.4", 7 | "@testing-library/react": "^9.4.0", 8 | "@testing-library/user-event": "^7.2.1", 9 | "react": "^16.12.0", 10 | "react-dom": "^16.12.0", 11 | "react-scripts": "3.3.0" 12 | }, 13 | "scripts": { 14 | "start": "react-scripts start", 15 | "build": "react-scripts build", 16 | "test": "react-scripts test", 17 | "eject": "react-scripts eject" 18 | }, 19 | "eslintConfig": { 20 | "extends": "react-app" 21 | }, 22 | "browserslist": { 23 | "production": [ 24 | ">0.2%", 25 | "not dead", 26 | "not op_mini all" 27 | ], 28 | "development": [ 29 | "last 1 chrome version", 30 | "last 1 firefox version", 31 | "last 1 safari version" 32 | ] 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /tests/demos/webserial/react-demo/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noopkat/avrgirl-arduino/4c88107415fec46eacabf81fb2fb8a6f271b7828/tests/demos/webserial/react-demo/public/favicon.ico -------------------------------------------------------------------------------- /tests/demos/webserial/react-demo/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 18 | 19 | 28 | web serial react test 29 | 30 | 31 | 32 |
33 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /tests/demos/webserial/react-demo/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noopkat/avrgirl-arduino/4c88107415fec46eacabf81fb2fb8a6f271b7828/tests/demos/webserial/react-demo/public/logo192.png -------------------------------------------------------------------------------- /tests/demos/webserial/react-demo/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noopkat/avrgirl-arduino/4c88107415fec46eacabf81fb2fb8a6f271b7828/tests/demos/webserial/react-demo/public/logo512.png -------------------------------------------------------------------------------- /tests/demos/webserial/react-demo/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "AvrGirl Arduino React Demo", 3 | "name": "AvrGirl Arduino Web Serial React Demo", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /tests/demos/webserial/react-demo/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | -------------------------------------------------------------------------------- /tests/demos/webserial/react-demo/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { useState, useRef } from "react"; 2 | import AvrgirlArduino from "./avrgirl-arduino"; 3 | import "./style.css"; 4 | import ArduinoUno from "./img/ArduinoUno.svg"; 5 | import gear from "./img/gear4.svg"; 6 | 7 | function App() { 8 | const boardChoices = [ 9 | "micro", 10 | "uno", 11 | "mega" 12 | ]; 13 | 14 | const fileInput = useRef(null); 15 | const [board, updateBoard] = useState(boardChoices[0]); 16 | const [fileName, updateFileName] = useState(""); 17 | const [uploading, updateUploading] = useState(false); 18 | 19 | const handleSubmit = e => { 20 | e.preventDefault(); 21 | updateUploading(true); 22 | 23 | const reader = new FileReader(); 24 | reader.readAsArrayBuffer(fileInput.current.files[0]); 25 | 26 | reader.onload = event => { 27 | const filecontents = event.target.result; 28 | 29 | const avrgirl = new AvrgirlArduino({ 30 | board: board, 31 | debug: true 32 | }); 33 | 34 | avrgirl.flash(filecontents, error => { 35 | if (error) { 36 | console.error(error); 37 | } else { 38 | console.info("flash successful"); 39 | } 40 | updateUploading(false); 41 | }); 42 | }; 43 | }; 44 | 45 | const BoardOptions = boardChoices.map((board, i) => ) 46 | 47 | 48 | return ( 49 |
50 |
51 |
52 |

Upload-o-matic

53 |

Choose a program to upload to an arduino

54 | 55 |
56 | 66 | 67 | 92 | 93 | 96 |
97 |
98 | 99 |
100 | arduino board 101 |
102 |
103 |
104 |
105 | gear icon 110 |
111 |
112 |
113 | ); 114 | } 115 | 116 | export default App; 117 | -------------------------------------------------------------------------------- /tests/demos/webserial/react-demo/src/avrgirl-arduino.js: -------------------------------------------------------------------------------- 1 | ../../../../../dist/avrgirl-arduino.js -------------------------------------------------------------------------------- /tests/demos/webserial/react-demo/src/img/ArduinoUno.svg: -------------------------------------------------------------------------------- 1 | ../../../images/ArduinoUno.svg -------------------------------------------------------------------------------- /tests/demos/webserial/react-demo/src/img/gear4.svg: -------------------------------------------------------------------------------- 1 | ../../../images/gear4.svg -------------------------------------------------------------------------------- /tests/demos/webserial/react-demo/src/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom"; 3 | import App from "./App"; 4 | 5 | ReactDOM.render(, document.getElementById("root")); 6 | -------------------------------------------------------------------------------- /tests/demos/webserial/react-demo/src/style.css: -------------------------------------------------------------------------------- 1 | ../../style.css -------------------------------------------------------------------------------- /tests/demos/webserial/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: sans-serif; 3 | background-color: #3F2B96; 4 | background-color: #503bad; 5 | padding: 0px; 6 | margin: 0px; 7 | } 8 | 9 | .main { 10 | height: 100%; 11 | text-align: center; 12 | min-height: 24em; 13 | overflow: hidden; 14 | } 15 | 16 | .wrapper { 17 | text-align: left; 18 | overflow: hidden; 19 | width: 1000px; 20 | margin: 100px auto; 21 | } 22 | 23 | .wrapper div { 24 | float: left; 25 | width: 400px; 26 | } 27 | 28 | .bot { 29 | float: left; 30 | position: relative; 31 | z-index: 999; 32 | border-radius: 20px; 33 | border: 2px solid #aaa; 34 | background-color: #fafafa; 35 | background-color: #eee; 36 | box-shadow: 3px 3px 3px rgba(0,0,0,0.2); 37 | padding: 20px; 38 | margin-right: 100px; 39 | height: 300px; 40 | width: 400px; 41 | } 42 | 43 | .bot h1 { 44 | padding-top: 0; 45 | margin-top: 0; 46 | font-family: 'Fugaz One', cursive; 47 | color: #333; 48 | } 49 | 50 | .board { 51 | width: 400px; 52 | position: relative; 53 | z-index: 999; 54 | } 55 | 56 | .board img { 57 | height: 330px; 58 | } 59 | 60 | .board svg { 61 | font-family: sans-serif; 62 | } 63 | 64 | label, input, select { 65 | display: block; 66 | margin: 0 0 15px 0; 67 | width: 200px; 68 | } 69 | 70 | select, input { 71 | height: 30px; 72 | margin-top: 8px; 73 | font-size: 15px; 74 | } 75 | 76 | .fileButtonWrapper { 77 | display: block; 78 | } 79 | 80 | #fileButton, button[type=submit] { 81 | background-color: #acd3f6; 82 | border: 1px solid #7998b4; 83 | border-radius: 4px; 84 | padding: 4px 8px 4px 8px; 85 | position: relative; 86 | overflow: hidden; 87 | margin-right: 20px; 88 | margin-top: 8px; 89 | cursor: pointer; 90 | font-size: 16px; 91 | } 92 | 93 | input[type=file] { 94 | position: absolute; 95 | top: 0; 96 | right: 0; 97 | filter: alpha(opacity=0); 98 | opacity: 0; 99 | outline: none; 100 | background: white; 101 | cursor: inherit; 102 | display: block; 103 | } 104 | 105 | input[type=file]:focus { 106 | outline: 3px solid #0000ff; 107 | border: 3px solid #0000ff; 108 | } 109 | 110 | button[type=submit] { 111 | float: right; 112 | font-size: 20px; 113 | margin-top: 20px; 114 | margin-right: 5px; 115 | background-color: #99f89c; 116 | border: 2px solid #7fc381; 117 | padding: 10px; 118 | border-radius: 7px; 119 | } 120 | 121 | #fileName { 122 | min-width: 175px; 123 | max-width: 175px; 124 | max-height: 20px; 125 | color: #666; 126 | overflow: hidden; 127 | position: relative; 128 | text-overflow: ellipsis; 129 | } 130 | 131 | #gear { 132 | position: absolute; 133 | margin-top: 60px; 134 | z-index: 1000; 135 | margin-left: 400px; 136 | width: 80px; 137 | height: 80px; 138 | } 139 | 140 | @keyframes rotation { 141 | from { 142 | transform: rotate(0deg); 143 | } 144 | to { 145 | transform: rotate(359deg); 146 | } 147 | } 148 | 149 | .spinning { 150 | animation: rotation 0.8s infinite linear; 151 | } 152 | 153 | #progress, #pipe { 154 | position: absolute; 155 | margin-top: 85px; 156 | margin-left: 461px; 157 | z-index: 1; 158 | text-align: left; 159 | width: 100px; 160 | max-width: 100px; 161 | height: 20px; 162 | overflow: hidden; 163 | border: 2px solid #f6f6f6; 164 | border: 2px solid #aaa; 165 | background-color: #fff; 166 | background-color: #eee; 167 | box-shadow: 3px 3px 3px rgba(0,0,0,0.2); 168 | } 169 | 170 | #progress { 171 | width: 0px; 172 | background-color: #99f89c; 173 | z-index: 3; 174 | color: forestgreen; 175 | text-align: center; 176 | text-transform: uppercase; 177 | padding-top: 2px; 178 | height: 17px; 179 | font-size: 15px; 180 | font-weight: bold; 181 | transition: width 0.2s; 182 | } 183 | 184 | #logbox { 185 | position: relative; 186 | text-align: left; 187 | width: 922px; 188 | max-width: 922px; 189 | margin-top: 30px; 190 | margin-left: 30px; 191 | } 192 | 193 | #logbox h2 { 194 | color: #ad9aff; 195 | } 196 | 197 | #log { 198 | position: relative; 199 | text-align: left; 200 | width: 922px; 201 | max-width: 922px; 202 | margin-top: 10px; 203 | } 204 | 205 | #log > span { 206 | margin-left: 5px; 207 | margin-bottom: 5px; 208 | border: 1px solid #0000ff; 209 | color: blue; 210 | border-radius: 4px; 211 | background-color: #ad9aff; 212 | padding: 1px 4px; 213 | font-family: monospace; 214 | font-size: 9px; 215 | float: left; 216 | display: inline-block; 217 | } 218 | 219 | -------------------------------------------------------------------------------- /tests/helpers/mockSerial.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides a somewhat complete mock implementation of node-serialport 3 | * built on top of virtual-serialport for later stubbing. 4 | */ 5 | 6 | var util = require('util'); 7 | var VirtualSerialPort = require('virtual-serialport'); 8 | 9 | var MockSerial = function() { 10 | VirtualSerialPort.call(this); 11 | }; 12 | 13 | util.inherits(MockSerial, VirtualSerialPort); 14 | 15 | MockSerial.prototype.open = function(callback) { 16 | if (callback) { 17 | return callback(null); 18 | } 19 | 20 | return; 21 | }; 22 | 23 | MockSerial.prototype.close = function(callback) { 24 | if (callback) { 25 | return callback(null); 26 | } 27 | 28 | return; 29 | }; 30 | 31 | MockSerial.prototype.drain = function(callback) { 32 | if (callback) { 33 | return callback(null); 34 | } 35 | 36 | return; 37 | }; 38 | 39 | MockSerial.prototype.set = function(props, callback) { 40 | if (callback) { 41 | return callback(null); 42 | } 43 | 44 | return; 45 | }; 46 | 47 | MockSerial.list = MockSerial.prototype.list = function() { return Promise.resolve([])}; 48 | 49 | module.exports = { 50 | list: function() { return Promise.resolve([])}, 51 | 52 | 53 | parsers: { 54 | raw: function() {}, 55 | 56 | readline: function() {}, 57 | 58 | byteLength: function() {}, 59 | 60 | byteDelimeter: function() {} 61 | }, 62 | SerialPort: MockSerial 63 | }; 64 | -------------------------------------------------------------------------------- /tests/helpers/mockStk500.js: -------------------------------------------------------------------------------- 1 | function mockStk500() { 2 | } 3 | 4 | mockStk500.prototype.bootload = function(serialPort, hex, board, callback) { 5 | callback(); 6 | }; 7 | 8 | module.exports = mockStk500; 9 | -------------------------------------------------------------------------------- /tests/protocol.spec.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var Protocol = require('../lib/protocol.js'); 3 | var STK = require('stk500'); 4 | 5 | // default options 6 | var DEF_OPTS3 = { 7 | protocol: STK, 8 | board: { 9 | baud: 115200, 10 | signature: Buffer.from([0x1e, 0x95, 0x0f]), 11 | pageSize: 128, 12 | numPages: 256, 13 | timeout: 400, 14 | productId: ['0x0043', '0x7523'], 15 | protocol: 'stk500v1' 16 | }, 17 | connection: {}, 18 | debug: function() {} 19 | }; 20 | 21 | test('[ Protocol ] - new creation', function(t) { 22 | t.plan(4); 23 | var p = new Protocol(DEF_OPTS3); 24 | t.ok(p.board, 'established board'); 25 | t.ok(p.connection, 'established connection'); 26 | t.ok(p.chip, 'established chip'); 27 | t.equal(typeof p._reset, 'function', 'has _reset function'); 28 | }); 29 | -------------------------------------------------------------------------------- /tests/test-pilot.js: -------------------------------------------------------------------------------- 1 | var testpilot = require('avrga-tester'); 2 | var Avrgirl = require('../'); 3 | var fs = require('fs'); 4 | var path = require('path'); 5 | 6 | fs.readFile(path.join(__dirname, '..', 'package.json'), function (err, data) { 7 | var pjson = JSON.parse(data); 8 | var avrgav = pjson.version; 9 | var hexpath = path.join(__dirname, '..', 'junk', 'hex'); 10 | testpilot(Avrgirl, avrgav, hexpath); 11 | }); 12 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const TerserPlugin = require('terser-webpack-plugin'); 3 | const webpack = require('webpack'); 4 | 5 | const resolve = { 6 | fallback: { 7 | "util": require.resolve("util/"), 8 | "stream": require.resolve("stream-browserify"), 9 | "os": require.resolve("os-browserify/browser"), 10 | } 11 | } 12 | 13 | const plugins = [ 14 | new webpack.ProvidePlugin({ 15 | Buffer: ['buffer', 'Buffer'], 16 | process: 'process/browser.js', 17 | }) 18 | ]; 19 | 20 | const importableConfig = { 21 | entry: './avrgirl-arduino-browser.js', 22 | output: { 23 | path: path.resolve(__dirname, 'dist'), 24 | filename: 'avrgirl-arduino.js', 25 | libraryTarget: 'umd' 26 | }, 27 | optimization: { 28 | minimize: false, 29 | }, 30 | resolve, 31 | plugins 32 | }; 33 | 34 | const importableMinConfig = { 35 | entry: './avrgirl-arduino-browser.js', 36 | output: { 37 | path: path.resolve(__dirname, 'dist'), 38 | filename: 'avrgirl-arduino.min.js', 39 | libraryTarget: 'umd' 40 | }, 41 | optimization: { 42 | minimize: true, 43 | minimizer: [new TerserPlugin()], 44 | }, 45 | resolve, 46 | plugins 47 | }; 48 | 49 | 50 | const globalConfig = { 51 | entry: './avrgirl-arduino-browser.js', 52 | output: { 53 | path: path.resolve(__dirname, 'dist'), 54 | filename: 'avrgirl-arduino.global.min.js', 55 | library: 'AvrgirlArduino', 56 | libraryTarget: 'window' 57 | }, 58 | optimization: { 59 | minimize: true, 60 | minimizer: [new TerserPlugin()], 61 | }, 62 | resolve, 63 | }; 64 | const globalConfigNonMin = { 65 | entry: './avrgirl-arduino-browser.js', 66 | output: { 67 | path: path.resolve(__dirname, 'dist'), 68 | filename: 'avrgirl-arduino.global.js', 69 | library: 'AvrgirlArduino', 70 | libraryTarget: 'window', 71 | }, 72 | optimization: { 73 | minimize: false, 74 | }, 75 | resolve, 76 | plugins 77 | }; 78 | 79 | module.exports = [importableConfig, importableMinConfig, globalConfig, globalConfigNonMin]; 80 | --------------------------------------------------------------------------------