User Tools

Site Tools


arduino

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
arduino [2023/11/29 04:06] jhagstrandarduino [2023/11/30 00:58] (current) – [arduino-cli] jhagstrand
Line 1: Line 1:
 ====== Arduino ====== ====== Arduino ======
  
-platform, company, open source hardwaresoftware, IDE, CLI+Arduino is a platform of open source hardware and software for using microcontrollers.
  
 +It is known as an educational system for beginners, but is widely used among hobbyists, professionals and commercial entities at all levels. 
  
-IDE vs CLI+Arduino IDE is a software package for writing, compiling and uploading code to a microcontroller.  It is an "Integrated Development Environment (IDE)", including an editor and several tools. 
 + 
 +Arduino CLI is a command-line version of the same software. 
 + 
 +===== Arduino IDE ===== 
 + 
 +File - Preferences - Show verbose output during x compilation x upload 
 + 
 +Check compilation and upload to get detailed messaging and learn: 
 +  * arduino-builder - the executable run for compile and upload. 
 +  * the name of the board 
 +  * the name of the core 
 +  * the tools and libraries used 
 +  * the include files used and from which folders 
 + 
 + 
 +===== arduino-cli ===== 
 + 
 +Display a list of all installed boards, human name and FQBN: 
 +  $ arduino-cli board listall 
 + 
 +Display current config settings, print out ~/.arduino15/arduino-cli.yaml: 
 +  $ arduino-cli config dump 
 + 
 + 
 +=== help ===
  
 Arduino, Arduino CLI, include path Arduino, Arduino CLI, include path
  
 Arduino mpu 6050 Arduino mpu 6050
 +
 +Where are the human names of the platforms displayed in the Boards Manager menu?
 +
 +Why are there two core/library/package/platform for ESP32 Nano?  What is the difference?  Which do I use?
 +
 +Why is my sk8mini no longer compiling?
 +
 +When using Tools - Pin Numbering - "By Arduino pin (default)" \\
 +function digitalPinToGPIONumber(_pin) is added and compile fails
 +
 +When using Tools - Pin Numbering - "By GPIO number (legacy)" \\
 +it compiles successfully, but throttle motor does not respond
 +
 +My code uses D3 and D6 as pin numbers.
 +Where are these defined?
  
  
-=== Using microcontrollers ===+===== Using Microcontrollers =====
  
 A microcontroller is a type of integrated circuit (IC), a chip. A microcontroller is a type of integrated circuit (IC), a chip.
Line 38: Line 79:
 ===== Terms ===== ===== Terms =====
  
-sketch = a c++ program in a text file with extension ".ino".+sketch = a c++ program in a text file with extension ".ino", in a folder with the same name.
  
 Packages, cores, libraries, tools Packages, cores, libraries, tools
Line 130: Line 171:
 Library Manager - where is this list of libraries? Library Manager - where is this list of libraries?
  
 +Each of these folders contains a file named boards.txt.
 +boards.txt contains a number of key=value parameters grouped into sections.
 +It includes a name= keyword that identifies the name as displayed in the board menu in the IDE.
  
-===== Folder Structure =====+nano_nora.name=Arduino Nano ESP32 
 +This board is found in two packages. 
 +~/.arduino15/packages/esp32/hardware/esp32/2.0.13/boards.txt  - this one has many boards 
 +~/.arduino15/packages/arduino/hardware/esp32/2.0.13/boards.txt - this has only the one board 
  
-File - Preferences+The CLI needs the FQBN for the board.  Where is that specified? 
 + 
 +I have 5 Nano ESP32 boards installed.  WTF? 
 +| Arduino Nano        | arduino:avr:nano          |                          
 +| Arduino Nano ESP32  | esp32:esp32:nano_nora                             
 +| Arduino Nano ESP32  | arduino:esp32:nano_nora                           
 +| Nano32              | esp32:esp32:nano32        |                         
 +| UM NanoS3           | esp32:esp32:nanos3        | 
 + 
 + 
 + 
 + 
 + 
 + 
 +===== Folder Structure =====
  
-Sketchbook location:  +Directories created by initial apt install: 
 +  * ~/.local/bin/arduino/arduino-1.8.19/   - for Arduino executables 
 +  * ~/.arduino15/  - for Arduino system files, and Board Manager packages  
 +  * ~/Arduino  - user "Sketchbook", and Libary Manager packages
  
-Additional Boards Manager URLs: +~/.arduino15/preferences.txt     - defaults used by Arduino IDE, see Files - Preferences
  
 +~/.arduino15/arduino-cli.yaml    - defaults used by arduino-cli
  
 +Directores specified in preferences.txt:
 +  * Sketchbook location: ~/Arduino
 +  * Additional Boards Manager URLs: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
  
-Package installed into \\ +Boards Manager installs into ~/.arduino15/packages.  So far, three packages have been installed: 
-/home/john/.local/bin/arduino/arduino-1.8.19/  \\+  * ~/.arduino15/packages/arduino/hardware/avr/ 
 +  * ~/.arduino15/packages/arduino/hardware/esp32/2.0.13/ only one board 
 +  * ~/.arduino15/packages/esp32/hardware/esp32/2.0.13/  - many boards
  
-Boards Manager installs into:  \\ +Libarary Manager installs into ~/Arduino
-/home/john/.arduino15/packages/arduino/hardware/avr/  \\ +
-/home/john/.arduino15/packages/arduino/hardware/esp32/2.0.13/  \\ +
-/home/john/.arduino15/packages/esp32/hardware/esp32/2.0.13/+
  
 === Failure on Upload === === Failure on Upload ===
arduino.1701248806.txt.gz · Last modified: 2023/11/29 04:06 by jhagstrand

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki