Browsed by
Tag: arduinoide

Controlling the temperature with Dallas DS18xx sensor. Arduino IDE

Controlling the temperature with Dallas DS18xx sensor. Arduino IDE

Description Control a climatic camera temperature using a DS18xx temperature sensor using the OneWire protocol. This is a simple way to know the temperature provided by a temperature sensor. The good thing of this sensor is that it already provides a library of Arduino, which helps in its programmation.     Requirements Dallas DS18xx Arduino library: https://github.com/milesburton/Arduino-Temperature-Control-Library   Connection Red: 5V Yellow: PIN2 (data pin) Black: GND List connected devices The sketch lists the devices connected to the OneWire pin…

Read More Read More

Command Line Arduino library

Command Line Arduino library

Requirements Arduino IDE: http://www.arduino.cc  (v 1.8.0 or above) CmdLine library: https://github.com/IndustrialShields/arduino-CmdLine   Installation https://www.arduino.cc/en/Guide/Libraries#toc4   Description Add a command line utility to the Arduino. You can type customizable commands to the Arduino board through a Serial port to execute functions. For example, you can add a command “set-ip 192.168.1.10” to set the PLC IP address. Of course, you MUST implement the function which sets the IP address.   Example You MUST define a set of commands with the associated functions…

Read More Read More

HOW TO UPLOAD A SKETCH TO A MDUINO/ARDBOX USING THE COMMAND LINE. LINUX

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

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

How to avoid the debouncing when reading a digital input. Library Tools40 Digital Filter

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

HOW TO CALCULATE THE VALUE RAISED TO A POWER WITH ARDUINO IDE

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 PAUSE THE EXECUTION OF THE CODE WITH ARDUINO IDE with microseconds

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

How to read time on Arduino IDE

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