{"id":27415615,"url":"https://github.com/davidbradway/arduino_cli_setup","last_synced_at":"2026-05-02T02:36:55.559Z","repository":{"id":77761828,"uuid":"197640486","full_name":"davidbradway/arduino_cli_setup","owner":"davidbradway","description":"Notes and an example sketch for using Arduino CLI","archived":false,"fork":false,"pushed_at":"2019-07-19T13:23:52.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-14T09:55:55.737Z","etag":null,"topics":["adafruit","arduino","arduino-cli","command-line","flora"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidbradway.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-07-18T18:49:36.000Z","updated_at":"2019-07-19T13:23:53.000Z","dependencies_parsed_at":"2023-05-06T08:15:32.567Z","dependency_job_id":null,"html_url":"https://github.com/davidbradway/arduino_cli_setup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davidbradway/arduino_cli_setup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbradway%2Farduino_cli_setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbradway%2Farduino_cli_setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbradway%2Farduino_cli_setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbradway%2Farduino_cli_setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidbradway","download_url":"https://codeload.github.com/davidbradway/arduino_cli_setup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidbradway%2Farduino_cli_setup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32521112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adafruit","arduino","arduino-cli","command-line","flora"],"created_at":"2025-04-14T09:27:56.538Z","updated_at":"2026-05-02T02:36:55.552Z","avatar_url":"https://github.com/davidbradway.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Arduino-Cli notes\n\nTo follow these notes https://github.com/arduino/arduino-cli, here were my steps.\n\nI first got an Adafruit FLORA working on my laptop via the Arduino GUI:\n- https://learn.adafruit.com/getting-started-with-flora?view=all\n- https://learn.adafruit.com/adafruit-arduino-ide-setup/arduino-1-dot-6-x-ide\n\n## CLI setup\n\nThen I downloaded the arduino-cli for Windows and followed along with the first link above and this one: https://learn.sparkfun.com/tutorials/efficient-arduino-programming-with-arduino-cli-and-visual-studio-code/introduction-to-the-arduino-cli\n\nI renamed the executable, moved it to `C:\\Program Files (x86)\\arduino-cli`, and added that path to the `PATH` User Environment Variable.\n\n## Adding support for 3rd-party cores (Adafruit, ESP8266, Digispark, etc)\n\nI couldn't find the `arduino-cli.yaml` to add the URLs to the Board Manager until I found: https://github.com/arduino/arduino-cli/issues/5\n\nThen from CMD, I did: `arduino-cli.exe config init` and this showed the path (or maybe generated the file?): `Config file PATH: C:\\Users\\dpb6\\AppData\\Local\\Arduino15\\arduino-cli.yaml`\n\nThen in that `yaml` file, I added the last 3 lines below to add Adafruit and ESP8266 boards:\n```\nproxy_type: auto\nsketchbook_path: C:\\Users\\dpb6\\Documents\\Arduino\narduino_data: C:\\Users\\dpb6\\AppData\\Local\\Arduino15\nboard_manager:\n  additional_urls:\n    - https://adafruit.github.io/arduino-board-index/package_adafruit_index.json\n    - http://arduino.esp8266.com/stable/package_esp8266com_index.json\n```\n\nThen, back in CMD, I did: `arduino-cli core update-index` to download the JSON files from the new URLs:\n```\nUpdating index: package_index.json downloaded\nUpdating index: package_index.json downloaded\nUpdating index: package_adafruit_index.json downloaded\nUpdating index: package_esp8266com_index.json downloaded\n```\n\n## Connecting a board\n\nThen I connected the FLORA microcontroller to a USB port and did: `arduino-cli board list` which returned:\n```\nPort  Type              Board Name FQBN\nCOM10 Serial Port (USB) Unknown\n```\nSince the Board Name and FQBN are unknown, I needed to install support for the FLORA.\n\nI searched for the type of board in the board manager lists: `arduino-cli core search flora`, which returned:\n```\nSearching for platforms matching 'flora'\nID            Version Name\nTeeOnArdu:avr 1.0.3   Adafruit TeeOnArdu\nadafruit:avr  1.4.13  Adafruit AVR Boards\n```\n\nI installed the board I wanted: `arduino-cli core install adafruit:avr`\n\nI then listed the cores that were attached: `arduino-cli core list`, which showed:\n```\nID                  Installed Latest Name\nadafruit:avr@1.4.13 1.4.13    1.4.13 Adafruit AVR Boards\n```\n\nThen, I Listed All `arduino-cli board listall flora` to get the Fully Qualified Board Name (FQBN):\n```\nBoard Name     FQBN\nAdafruit Flora adafruit:avr:flora8\n```\n\nAnd I listed the attached boards again `arduino-cli board list` to see that the Board Name and FQBN are now associated with the FLORA plugged in via USB:\n```\nPort  Type              Board Name     FQBN\nCOM10 Serial Port (USB) Adafruit Flora adafruit:avr:flora8\n```\n\n## Compiling\n\nI was getting errors on \"compile\", until I found this: https://github.com/arduino/arduino-cli/issues/177#issuecomment-484291281 and did the following:\n`arduino-cli core install arduino:avr`\n\nAfter which I could compile the code: `arduino-cli compile --fqbn adafruit:avr:flora8 C:/Users/dpb6/Downloads/repos/myFirstSketch` which returned:\n```\nBuild options changed, rebuilding all\nSketch uses 4130 bytes (14%) of program storage space. Maximum is 28672 bytes.\nGlobal variables use 149 bytes of dynamic memory.\n```\n\n## Uploading\n\nAnd finally, I uploaded the binaries to the board: `arduino-cli upload -p COM10 -v --fqbn adafruit:avr:flora8 C:/Users/dpb6/Downloads/repos/myFirstSketch`:\n```\navrdude: Version 6.3-20171130\n         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/\n         Copyright (c) 2007-2014 Joerg Wunsch\n\n         System wide configuration file is \"C:\\Users\\dpb6\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avrdude\\6.3.0-arduino14/etc/avrdude.conf\"\n\n         Using Port                    : COM11\n         Using Programmer              : avr109\n         Overriding Baud Rate          : 57600\n         AVR Part                      : ATmega32U4\n         Chip Erase delay              : 9000 us\n         PAGEL                         : PD7\n         BS2                           : PA0\n         RESET disposition             : dedicated\n         RETRY pulse                   : SCK\n         serial program mode           : yes\n         parallel program mode         : yes\n         Timeout                       : 200\n         StabDelay                     : 100\n         CmdexeDelay                   : 25\n         SyncLoops                     : 32\n         ByteDelay                     : 0\n         PollIndex                     : 3\n         PollValue                     : 0x53\n         Memory Detail                 :\n\n                                  Block Poll               Page                       Polled\n           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack\n           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------\n           eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00\n           flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00\n           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00\n           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00\n           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00\n           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00\n           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00\n           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00\n\n         Programmer Type : butterfly\n         Description     : Atmel AppNote AVR109 Boot Loader\n\nConnecting to programmer: .\nFound programmer: Id = \"CATERIN\"; type = S\n    Software Version = 1.0; No Hardware Version given.\nProgrammer supports auto addr increment.\nProgrammer supports buffered memory access with buffersize=128 bytes.\n\nProgrammer supports the following devices:\n    Device code: 0x44\n\navrdude: devcode selected: 0x44\navrdude: AVR device initialized and ready to accept instructions\n\nReading | ################################################## | 100% 0.01s\n\navrdude: Device signature = 0x1e9587 (probably m32u4)\navrdude: safemode: lfuse reads as FF\navrdude: safemode: hfuse reads as D0\navrdude: safemode: efuse reads as CB\navrdude: reading input file \"C:/Users/dpb6/Downloads/repos/myFirstSketch/myFirstSketch.adafruit.avr.flora8.hex\"\navrdude: writing flash (4130 bytes):\n\nWriting | ################################################## | 100% 0.49s\n\navrdude: 4130 bytes of flash written\navrdude: verifying flash memory against C:/Users/dpb6/Downloads/repos/myFirstSketch/myFirstSketch.adafruit.avr.flora8.hex:\navrdude: load data flash data from input file C:/Users/dpb6/Downloads/repos/myFirstSketch/myFirstSketch.adafruit.avr.flora8.hex:\navrdude: input file C:/Users/dpb6/Downloads/repos/myFirstSketch/myFirstSketch.adafruit.avr.flora8.hex contains 4130 bytes\navrdude: reading on-chip flash data:\n\nReading | ################################################## | 100% 0.15s\n\navrdude: verifying ...\navrdude: 4130 bytes of flash verified\n\navrdude: safemode: lfuse reads as FF\navrdude: safemode: hfuse reads as D0\navrdude: safemode: efuse reads as CB\navrdude: safemode: Fuses OK (E:CB, H:D0, L:FF)\n\navrdude done.  Thank you.\n```\n\nThis ends the README!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidbradway%2Farduino_cli_setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidbradway%2Farduino_cli_setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidbradway%2Farduino_cli_setup/lists"}