This guide explains how to install Arduino IDE and the ILOGICS boards, upload the first program to an MPINO or MPAINO product, and check its digital I/O.
ARDUINO SDK INSTALL from the ILOGICS Arduino SDK download page.At the top left of Arduino IDE, Verify (✓) compiles the code and Upload (→) transfers it to the product on the selected port.
The ILOGICS SDK configures digital I/O directions automatically. These examples do not need a separate pinMode() call.
Disconnect output loads before the first upload. Check the product page for the power specification and R (relay) or T (transistor) output type.
Silicon Labs CP210x USB to UART Bridge(COMx).Silicon Labs CP210x USB to UART Bridge(COMx).USB Serial Port(COMx).Find the board name in the MPINO Series specifications or the MPAINO Series specifications. Open Select other board and port… from the board selector at the top of Arduino IDE, then search for the same name. The product name in the figure is an example of the selection method.
| No. | Selection |
|---|---|
| 1 | In the BOARDS search field, enter the board name shown in the product-family table. |
| 2 | Select the result with the exact same name. R and T products grouped together use the common board name containing R(T). |
In PORTS, select the COM number found in Device Manager.
| No. | Selection |
|---|---|
| 1 | Under PORTS, choose the same COM number shown in Device Manager. COM1 and COM3 in the figures are examples. |
| 2 | Select OK to apply the board and port. |
You can also select the same items from Tools → Board and then Tools → Port.
Find the first I/O numbers for your model in the product-family table, then use the example below with the same numbers. Open File → New Sketch, enter the code, and save it with Ctrl + S. Select Verify (✓) and wait for Done compiling., then select Upload (→).
A relay output can be checked by its operating sound. To check a transistor output, switch off power and connect a test load according to the output-wiring section on the product page.
// first MPAINO output const uint8_t OUTPUT_CHANNEL = 64; void setup() {} void loop() { digitalWrite(OUTPUT_CHANNEL, HIGH); delay(500); digitalWrite(OUTPUT_CHANNEL, LOW); delay(500); }
Use this example with MPINO-8A4R(T)-S, MPINO-8A4R-SU, MPINO-8A8R(T)-S, and MPINO-16A16R.
// first output on these MPINO models const uint8_t OUTPUT_CHANNEL = 32; void setup() {} void loop() { digitalWrite(OUTPUT_CHANNEL, HIGH); delay(500); digitalWrite(OUTPUT_CHANNEL, LOW); delay(500); }
To test transistor output O(39) on MPINO-16A8R8T, check the transistor-output wiring on its product page and change OUTPUT_CHANNEL to 39.
// relay output R(62) const uint8_t OUTPUT_CHANNEL = 62; void setup() {} void loop() { digitalWrite(OUTPUT_CHANNEL, HIGH); delay(500); digitalWrite(OUTPUT_CHANNEL, LOW); delay(500); }
// relay output R(39) const uint8_t OUTPUT_CHANNEL = 39; void setup() {} void loop() { digitalWrite(OUTPUT_CHANNEL, HIGH); delay(500); digitalWrite(OUTPUT_CHANNEL, LOW); delay(500); }
Switch off power before wiring the input and COM. Turn the input on and off and check that the output follows it. Use the Digital Inputs and Output sections of your product page to identify the terminals and COM.
// first MPAINO input const uint8_t INPUT_CHANNEL = 0; const uint8_t OUTPUT_CHANNEL = 64; void setup() {} void loop() { const bool inputOn = digitalRead(INPUT_CHANNEL); digitalWrite(OUTPUT_CHANNEL, inputOn); }
// first input on these MPINO models const uint8_t INPUT_CHANNEL = 0; const uint8_t OUTPUT_CHANNEL = 32; void setup() {} void loop() { const bool inputOn = digitalRead(INPUT_CHANNEL); digitalWrite(OUTPUT_CHANNEL, inputOn); }
// input I(22) const uint8_t INPUT_CHANNEL = 22; const uint8_t OUTPUT_CHANNEL = 62; void setup() {} void loop() { const bool inputOn = digitalRead(INPUT_CHANNEL); digitalWrite(OUTPUT_CHANNEL, inputOn); }
// input I(22) const uint8_t INPUT_CHANNEL = 22; const uint8_t OUTPUT_CHANNEL = 39; void setup() {} void loop() { const bool inputOn = digitalRead(INPUT_CHANNEL); digitalWrite(OUTPUT_CHANNEL, inputOn); }
| Symptom | What to check |
|---|---|
| The model is missing from the board results | Confirm that ARDUINO SDK INSTALL ran, then restart Arduino IDE. Search for the board name exactly as shown in the product-family table. |
| No COM port appears in Device Manager | Use section 3 to check the connection and driver for your product. MPINO-16A8R does not use the MP Download Cable. |
| Verify reports an error | Check that the selected board matches the product and the code was entered correctly. Start with the first error shown in the output panel. |
| Upload fails | Confirm that Device Manager and Arduino IDE show the same COM number. Check the cable connection and product power. |
| Upload succeeds but the output does not change | Recheck the first output number in the product-family table and the R/T output type on the product page. A transistor output needs a wired test load to show its state. |
| The output does not follow the input | Recheck the first input number in the product-family table and the input-to-COM wiring on the product page. |