chapter_1.md
1 # Chapter 1 (Installation of Tools) 2 3 ## Installation of `arduino-cli-interactive` or `aci` 4 5 For now there are 2 ways to install the `aci` tool. 6 7 1. Download from source 8 9 ```bash 10 git clone https://github.com/Vaishnav-Sabari-Girish/arduino-cli-interactive.git 11 cd bash_shell_script 12 chmod +x main.sh 13 ./main.sh 14 ``` 15 16 2. Using Homebrew 17 18 To download `aci` using Homebrew , you need to first have homebrew installed. 19 To install homebrew , copy and paste this script in your terminal 20 21 ```bash 22 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 23 ``` 24 25 After Homebrew is installed , copy and paste the following commands in the terminal 26 27 ```bash 28 brew update 29 brew tap vaishnav-sabari-girish/arduino-cli-interactive 30 brew install aci 31 ``` 32 33 ## Pre-requisites 34 35 For the `aci` tool to work as intended , there are 2 prerequisite tools required. 36 37 ### `arduino-cli` 38 39 Arduino-cli can be installed using 2 ways 40 41 1. Using Homebrew 42 43 ```bash 44 brew update 45 brew install arduino-cli 46 ``` 47 48 2. Using their installation script 49 50 ```bash 51 curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh 52 ``` 53 54 For other installation methods , check out their website [here](https://arduino.github.io/arduino-cli/1.1/installation/) 55 56 ### `gum` 57 58 This tool helps create awesome looking Terminal User Interfaces (TUI's). 59 You can download `gum` in multiple ways. 60 61 1. Using Homebrew 62 63 ```bash 64 brew update 65 brew install gum 66 ``` 67 68 2. Using Package Managers 69 70 ```bash 71 #Arch Linux (btw) 72 pacman -S gum 73 74 # Nix 75 nix-env -iA nixpkgs.gum 76 77 # Flox 78 flox install gum 79 ``` 80 <br><br> 81 82 ### `timer` 83 This is an interactive alternative to the default `sleep` command. It provides aesthetic progress bars. 84 85 You can install it using 86 1. Homebrew 87 88 ```bash 89 brew install caarlos0/tap/timer 90 ``` 91 92 For other ways to install `timer` checkout it's [Github Repo](https://github.com/caarlos0/timer) 93 94 <br><br> 95 96 You can also install a few alternative text editors if you do not want to use the default `nano` editor 97 of linux. 98 99 Some options are : 100 101 1. <a id="micro">Micro</a> 102 103 104 ```bash 105 sudo apt-get install micro 106 ``` 107 108 2. <a id="vim">Vim</a> 109 110 ```bash 111 sudo apt-get install vim 112 ``` 113 114 3. <a id="neovim">NeoVim</a> 115 116 ```bash 117 sudo apt install nvim 118 ``` 119 120 4. <a id="gedit">Gedit</a> 121 122 ```bash 123 sudo apt install gedit 124 ``` 125 126 5. <a id="vscode">Visual Studio Code</a> 127 128 ```bash 129 130 sudo apt-get install wget gpg 131 wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg 132 sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg 133 echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" |sudo tee /etc/apt/sources.list.d/vscode.list > /dev/null 134 rm -f packages.microsoft.gpg 135 ``` 136 137 ```bash 138 139 sudo apt install apt-transport-https 140 sudo apt update 141 sudo apt install code # or code-insiders 142 ``` 143 144 6. <a id="vscodium">VSCodium</a> 145 146 ```bash 147 #Using snap 148 snap install codium --classic 149 150 #Using Nix 151 nix-env -iA nixpkgs.vscodium 152 153 #Arch Linux 154 yay -S vscodium-bin 155 ``` 156 157 ```bash 158 #For Debian/Ubuntu distros 159 160 wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \ 161 | gpg --dearmor \ 162 | sudo dd of=/usr/share/keyrings/vscodium-archive-keyring.gpg 163 164 echo 'deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.gpg ] https://download.vscodium.com/debs vscodium main' \ 165 | sudo tee /etc/apt/sources.list.d/vscodium.list 166 167 sudo apt update && sudo apt install codium 168 ``` 169 170 7. <a id="hx">Helix</a> 171 172 ```bash 173 #For Debian/Ubuntu distos 174 sudo add-apt-repository ppa:maveonair/helix-editor 175 sudo apt update 176 sudo apt install helix 177 178 #For Fedora/RHEl 179 sudo dnf install helix 180 181 #Homebrew 182 brew install helix 183 184 #AppImage (First download the .AppImage file from the official helix repo) 185 chmod +x helix-*.AppImage # change permission for executable mode 186 ./helix-*.AppImage # run helix 187 ``` 188 189 ## Post Installation 190 191 After the installation of `aci` there is one small step you have to do. 192 193 Type the following in the terminal 194 195 ```bash 196 arduino-cli board listall 197 arduino-cli core install arduino:avr 198 ``` 199 200 This step will make sure you have the cores of the basic Arduino Boards like Uno , Nano etc.