====== Writing the Program in Arduino IDE ====== [[:en-us_guide:hmi_connection|HMI Connection]] ~~NOTOC~~ With Arduino IDE, the product program handles HMI requests through the built-in communication functions in the ILOGICS Arduino SDK. Each protocol has its own initialization and request-handling functions and its own HMI address format, so choose the section for a protocol your HMI supports. Channels and wiring are covered in [[:en-us_guide:hmi_connection:wiring|Wiring the HMI]]. Screen setup and result checks are covered in [[:en-us_guide:hmi_connection:screen|Building the HMI Screen]] and [[:en-us_guide:hmi_connection:check|Checking Operation]]. Follow the installation steps below if this is your first time. After installing, you can use the simple example at the end of the protocol page you choose. ===== 1. Install the ILOGICS Arduino SDK ===== {{ :en-us_guide:hmi_connection:sdk-install-flow.svg?420 |Install Arduino IDE, install the ILOGICS SDK, restart the IDE, and select the board }} - Download and install the **Windows Arduino IDE installer** from the [[https://www.arduino.cc/en/software|official Arduino page]]. - Download and run **ARDUINO SDK INSTALL** from the [[https://www.ilogics.net/en-us/resources/downloads/software/3|ILOGICS Arduino SDK download page]]. - Set the SDK install location to **Hardware under the Arduino IDE sketchbook folder**. If you changed the default location, check the sketchbook location in the IDE preferences. - Close Arduino IDE and start it again. - Select your product under **Tools → Board → ILOGICS**. For MPINO-8A4R-S, select **MPINO-8A4R(T)-S**. - Connect the MP Download Cable and select its COM port under **Tools → Port**. {{ :guide:hmi_connection:revision2:board-select-actual.svg?480 |Example of the Arduino IDE board selection window. Select the board name of your product. }} In the board selection window, set **BOARDS** to the product name and **PORTS** to the COM number of the connected cable. For other products' cables and drivers, see [[:en-us_guide:getting_started#connect_the_product_and_find_the_com_port|Connect the Product and Find the COM Port]]. The COM port for uploading is separate from ''Serial1'', which is used to communicate with the HMI. **[[:en-us_guide:hmi_connection:arduino:modbus|2. Connect with Modbus RTU]]** **[[:en-us_guide:hmi_connection:arduino:cnet|3. Connect with LS Electric Cnet]]** **[[:en-us_guide:hmi_connection:arduino:mc|4. Connect with Mitsubishi MC]]**