Used software modules:
Consider the application of a simple system URDC device. Device Task:
- transfer to a remote control panel (URDC) about pressing the button on the device,
- enable/disable the LED RGB through a remote control panel (URDC).
In this article we will look at the connection option Arduino to the internet via a PC running Windows:
Advanced diagram describing as software modules (previously downloaded) will be used in the general infrastructure:
Installing RemoteDeviceControl library
RemoteDeviceControl_vX.X.X.zip unpack the archive in the Libraries directory of your Arduino development environment, for example:
Run the Arduino development environment
Check for installed libraries:
Open the sample library RemoteDeviceControl (File -> Open...):
If you have collected the device according to the above mentioned schemes, the code that you have opened, do not need to change anything, all the pins in the example code shown correspond to the scheme (above).
Specify the device type:
Compile, if done correctly, the compilation is successful:
Upload program in Arduino:
Device adapter - software for PC - the intermediary between your Arduino device and the Internet.
Configure the adapter:
Open the text file /ini/config.ini from the unpacked folder.
Enter the Login, Password.
Enter the device name in the DeviceName field, because you can have several of their devices!
Specify the name of the control panel in the Control Panel Name field, and after all the control panels can be several!
Fields Frontend and Backend leave unchanged.
DevicePort - port name that is connected to your Arduino. (How do you know the name of the port to Arduino)
Save the configuration file config.ini and run URDC.Device Adapter.exe
You will see something like the following:
Configure the program through configuration file /ini/config.ini
Specify the field Login | Password the same as when setting DeviceAdapter in the previous step.
ControlPanelName and DeviceName must also match the settings DeviceAdapter!
Frontend и Backend оставляем без изменений.
Run the program URDC.ControlPanel.exe
Congratulations we have raised all the infrastructure and set up!
Arduino device must be connected to a PC.
Programs should be run: URDC.DeviceAdapter (on the PC, which is connected Arduino device on this PC to be an internet connection), URDC.ControlPanel (on any PC that has access to the Internet).
The data flow from the device to the control panel:
We need to see how the control panel changes the parameter "but1" with the "DOWN" to the "UP" and vice versa.
On the device, press the button and see what happens to the window control panel. We should see something like the following:
If we observe, everything is done correctly and you can control your device from anywhere in the world where there is Internet ))
Check the flow of data from the control panel to the unit:
Turn on red module (4 digital pin) LED, the other is off.
To do this, we point to the name of the control parameter "RGB_LED" (defined by the device, this value can be found in the Arduino code) and the value of "R". If you want to include all of the modules, please indicate "RGB".
If as a result we see that the red LED module, then it is working! Try to include different combinations of the LEDs.