• HOW TO UPLOAD A SKETCH TO A MDUINO/ARDBOX USING THE COMMAND LINE. LINUX - In this post it will be seen how to upload a sketch using the command line instead of using Arduino IDE. This is an introduction for a newer post in which we will show how to upload remotely a sketch using the command line. Without further delay we will see how this process can be achieved. First of all we need to know that for uploading a sketch using the command line it is necessary to use the program avrdude....

    Read More Read More

  • How to upload a sketch to a MDuino/Ardbox using the command line. Windows - In this post it will be seen how to upload a sketch using the command line instead of using the Arduino IDE. This is an introduction for a newer post in which we will show how to upload remotely a sketch using the command line. Without further delay we will see how this process can be achieved.  First of all we need to know that for uploading a sketch using the command line it is necessary to use the program...

    Read More Read More

  • 2ND STEP TO CREATE A TCP CLIENT ON A TOUCHBERRY PI 3. CREATING A TCP CLIENT USING NODE.JS - On this post it showed how to implement a TCP server on Touchberry Pi 3 The requirements of this post is just a Touchberry Pi with internet connection. To get the Node.js JavaScript interpreter we need to install the command cURL on our Linux. cURL command is  very useful for HTTP/S requests. To get the cURL we just need to type on the Linux Terminal: sudo apt-get install curl   Once there is the cURL installed we can download the node source typing...

    Read More Read More

  • Serial Communication between Raspberry and MDuino/Ardbox - In this post it will be shown how to communicate using the serial between a MDuino/Ardbox and a Raspberry Pi. It actually exists many ways on communicating between this two devices, but today we will focus on see how to do it using the Serial. Serial communication is actually one of the easiest way to communicate. It only uses two wires to achieve that, Rx & Tx. One wire is to send(Tx) and the other is for receiving(Rx). To stablish...

    Read More Read More

  • 1st step to create a TCP client on a Touchberry Pi 3. Setting an static IP Address - In this post it will be shown how it is set an static ip for the Raspberry. By default the Raspberry Pi is automatically set to obtain an IP address from a wired or wireless network. Then why do we want an static IP if the Raspberry automatically sets already one? The answer is because we need to have the same exact IP, not an automatic one. The reason of being automatic makes that the IP can be different each...

    Read More Read More

  • How to avoid the debouncing when reading a digital input. Library Tools40 Digital Filter - In this post it will be shown how to ensure the reading of a digital input using our library Tools40. This library has been developed by Industrial Shields. For more information, check the information of this library in the following post: Tools40 library, useful tool using our equipments First of all it is important to know the purpose of our digital filter. Basically it filters the debounces when a digital input changes from HIGH to LOW or vice versa. When...

    Read More Read More

  • Review + new documentation of the Ardbox Analog HF - In this post it will be seen a review of the PLC Arduino ARDBOX 20 I/Os Analog HF Modbus. The guide of the PLC Arduino ARDBOX 20 I/Os Analog HF Modbus on our website is already uploaded into the 7.1 version. The User Guide now is for the HF version, so it exists now the possibility of taking all the information of the PLC Arduino ARDBOX 20 I/Os Analog HF Modbus from there.   It will be shown a little introduction...

    Read More Read More

  • How to use RS232 on Industrial Arduino Based PLC - On this post it’s showed how to use RS232 on an Arduino based PLC of Industrial Shields. To use RS232 is required the next points: Industrial Shields equipment (not any Ardbox HF version) Industrial Shields boards installed, follow this older post to install it. Hardware Configuration The first step is configure the hardware. The right connections between the desired devices are showed below: Industrial Shields PCL RS232 Device RX TX TX RX GND GND   Also it’s important to have...

    Read More Read More

  • How to connect a Wi-Fi module to Arduino based PLC - On this post it is showed how to connect a WiFi module, ESP8266 WiFi shield on this example, to an Arduino based PLC. With all the Industrial Shields equipment it’s possible to add a WiFi module as ESP8266 WiFi shield. ESP8266 is a cheap and popular WiFi/microcontroller system-on-chip. Furthermore it can be programmed like a normal controller. Actually ESP8266 is a serially-controlled WiFi gateway. It can be configured with AT command, so using the Industrial Shiedls equipment’s UART it’s possible to communicate...

    Read More Read More

  • FUNCTION TO calculate a square root of a number - The function to calculate a square root of a number is sqrt(). Function sqrt(x); Parameter x: could be any data type  Example Next it is showed a simple example of how to print a square root of an analog value every second. long number = 0; void setup() { Serial.begin(9600L); } void loop() { number = sqrt(analogRead(I0_7)); Serial.println(number); delay(1000); }
  • HOW TO CALCULATE THE VALUE RAISED TO A POWER WITH ARDUINO IDE - In this post it will be seen how to calculate the value raised to a power. Basically this function takes a number(base) and it raises to another number(exponent).  The function for calcultaing the value raised to a power using Arduino IDE is pow().  This function is used to raise a number to a certain exponent. *With latest version of Industrial Shields boards it isn’t necessary to configure the pins, just selecting the properly board, I/O’s will be automatically configured.  Function pow(base, exponent) Parameters...

    Read More Read More

  • HOW TO UPLOAD A SKETCH USING ETHERNET. - In this post it will be shown how to proceed in order to upload a sketch using the Ethernet instead of using the tipical Serial (USB). This is really useful in order to upload a sketch being far from the Arduino board. This post is been prepared for upload a code using Linux and using Windows. This process is a bit long and for this reasons it has been divided in the 3 big parts. 1.How to install the Ariadne...

    Read More Read More

  • HOW TO PAUSE THE EXECUTION OF THE CODE WITH ARDUINO IDE with microseconds - In this post it will be seen how to pause the execution code for a certain time in microseconds.  Basically this function pauses the program for a certain time and after this time it continues as normal.  The function for pause the execution code for a certain time in microseconds using Arduino IDE is delayMicroseconds()  This function is used to set a time of pause. *With next version of Industrial Shields boards won’t be necessary to configure the pins, just selecting the properly board,...

    Read More Read More

  • UPLOADING A SKETCH TO A PLC USING ETHERNET. STEP 3. TFTP CLIENT - In this post it will be seen how to send the binary file of an sketch into Arduino using Ethernet with tftp Client. Furthermore it is needed to use Telnet in order to do a remote reset. As in the step 2 of this process this post will be divided in two different parts. One for sending the binary file using Windows and the other using Linux.   Windows For sending an sketch using the tftp Client it is need...

    Read More Read More

  • How to read time on Arduino IDE - In this post it will be seen how to read the time since the Arduino based PLC board began running with the function millis().  Basically this function return the number of milliseconds since the controller began running the current program. This function is really useful when you want to control process comparing time *This value will overflow after 50 days approximately Function time = millis(); Parameters Nothing Return Unsigned long of millisecond since the controller program started Example Code Example,...

    Read More Read More

  • Echo TCP server on Arduino based PLC - On this post is showed how to create a server TCP on an Arduino based PLC. The requirements of this post is just an M-Duino PLC with Ethernet connection and an available TCP client in order to test it.  Take a look an example of how to implement a TCP client with Arduino based PLC. Once the server is running, any client can connect to the server. On this example it is used an M-Duino to generate the server. The example...

    Read More Read More

  • Modbus TCP/IP library for Arduino based PLC’s - On this post it’s showed one of the best Modbus TCP/IP libraries. This library has been tasted on Industrial Shields labs and it fits communicating with other Modbus TCP/IP industrial devices.   How to install? Download the zip file on Modbus TCP/IP libraries. Open Arduino IDE, go to “Sketch –> Include library –> Add .ZIP library”. Search .ZIP file and click Open.   How to use it? By default, this Modbus library communication protocol is placed on port 502 (Modbus standard)....

    Read More Read More

  • HOW TO PAUSE THE EXECUTION OF THE CODE WITH ARDUINO IDE - In this post it will be seen how to pause the execution code for a certain time.  Basically this function pauses the program for a certain time and after this time it continues as normal.  The function for pause the execution code for a certain time using Arduino IDE is delay().  This function is used to set a time of pause. *With next version of Industrial Shields boards won’t be necessary to configure the pins, just selecting the properly board, I/O’s will...

    Read More Read More

  • UPLOADING A SKETCH TO A PLC USING ETHERNET. STEP 1. ARIADNE BOOTLOADER - In this string of posts we will see how to upload an sketch to a PLC using Ethernet connection instead of using the USB. USB is the most common way to upload an sketch into an Arduino board but it is not always the most comfortable way because you need to bring the PLC near of a PC or vice versa. Before getting into the post it is important to have our boards installed. If you don’t have it please get...

    Read More Read More

  • UPLOADING A SKETCH TO A PLC USING ETHERNET. STEP 2. BINARY FILE - In this post we will see how to take the binary file from an sketch.ino First of all we need to know the differences between uploading a code via USB  and uploading via Ethernet. When a code is uploaded into an Arduino board using the USB, Arduino IDE software automatically does its magic and transforms the code sketch.ino into a file.hex which is the one that gets uploaded automatically. If we want to upload a code via Ethernet we need...

    Read More Read More