Average rainfall 2001-2016, global tropics

Map: Average rainfall 2001-2016, global tropics

ide: Setup Arduino IDE

Thomas Gumbricht bio photo By Thomas Gumbricht

Introduction

The Arduino Integrated development Environment (IDE) can be accessed using the cloud, or installed locally. This post covers how to setup Arduino IDE locally on Mac OSX. At time of writing this (November 2019) the Arduino IDE does not recognize the usb port for all kinds of board and the post describes how to use Homebrew to fix this problem.

If Ardiono IDE recognizes the USB and the sketch (script) compiles but does not load, and ends with an error like:

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00

a probable cause is that you have some components connected to your rx and tx pins.

prerequisits

Homebrew must be installed on your machine, as described in this post or on the Homebrew site.

Arduino IDE

Get the latest Arduino IDE from the Arduino software page. Select the operating system, that will take you to the page giving you the option of contributing towards the development of the Arduino software (shown in figure below). You can either JUST DOWNLOAD or CONTRIBUTE & DOWNLOAD.

Arduino IDE download page.

Install

Once downloaded on Mac OSX, all you need to do is to drag the Arduino app to the Applications folder.

Start

Start Arduino by double clicking. You probably need to allow it to start as you downloaded directly from the Arduino homepage (not via the repository designated for your Operating System).

To allow Arduino, go via the mac main menu, click the apple (absolute top left of the computer screen), select System Preferences….

In the top row of the System Preferences window, click the Security & Privacy icon. In the window that open, under the General tab (usually in front by default), you should see a paragraph towards the bottom:

"Arduino" was blocked from opening...

Click the button Open Anyway, and Arduino should open.

Arduino desktop.

Test port access

Attach an Arduino board via a USB cable to your computer. If you have several USB ports, try all of them out before concluding that your Arduino IDE does not connect to the Arduino board.

In the Arduino menu select:

Tools -> Port

and if the list that appears contain a usb port entry you are fine to go. In the example below, the second line is the serial port connection to your arduino board.

Serial ports
/dev/cu.Bluetooth-incoming-Port
/dev/cu.usbmodemFD121 ("Your Arduino Board")

If not, you have to install a driver that allows Arduino to recognize the usb port.

Install usb port driver

The driver that you need is called CH34x, and is available on GitHub. The README.MD document (also available as a pdf) include all the required instructions.

I used the Homebrew alternative, which boils down to the following two Terminal commands:

$ brew tap adrianmihalko/ch340g-ch34g-ch34x-mac-os-x-driver https://github.com/adrianmihalko/ch340g-ch34g-ch34x-mac-os-x-driver

$ brew cask install wch-ch34x-usb-serial-driver

Then again try to connect to your arduino board.