
About the Library
This library adds more functionality to your IOT2000 with the Arduino IDE. It was developed by Dominik Reichl in 2018 and designed for the Siemens Simatic IOT2000.
This library is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation.
You can download the library here
How to Install
1. Download the repository from GitHub
2. Unzip it
3. Copy the "Siemens-Simatic-IOT2000-Arduino-Library-master" folder into your library folder
4. Open the Arduino IDE
5. Click on Sketch > Include Library > Siemens Simatic IOT2000
Done!
Functions
const |
USER_LED
Constant for the user LED. |
const |
DI0
Constant for the I/O-Shield. |
const |
DI1
Constant for the I/O-Shield. |
const |
DI2
Constant for the I/O-Shield. |
const |
DI3
Constant for the I/O-Shield. |
const |
DI4
Constant for the I/O-Shield. |
const |
DQ0
Constant for the I/O-Shield. |
const |
DQ1
Constant for the I/O-Shield. |
const |
U0
Constant for the I/O-Shield. |
const |
I0
Constant for the I/O-Shield. |
const |
U1
Constant for the I/O-Shield. |
const |
I1
Constant for the I/O-Shield. |
void |
userLEDSketchRunning()
Defines the user LED as output and turns it on. |
void |
activateUserButton()
Activates the reading of the user button. |
bool |
readUserButton()
Reads the state of the user button. |
class |
EthernetClientIOT
An extension to the default EthernetClient class. |
void |
standardHttpResponseHeader(EthernetClient client)
Sends a standard http response header to the client. |
void |
loadHTML(char* location,EthernetClient client)
Loads a HTML file from the internal storage and sends it to the client. |
class |
getRequest
Class that allows searching for a string in the requested URL. |
void |
getString(char c)
Function for getting the URL. |
bool |
checkString(char* y)
Checks for a string in the URL. |
void |
resetString()
Resets the saved string. |
You can also use the functions of the Ethernet(Galileo) library when you only include this library!
Particularities
You can use the definitions on the I/O-Shield and the definition USER_LED in the Arduino IDE to control the parts.
When you load an HTML document with the loadHTML function you can write the following in your document to get the values:
<!--digitalRead(0)-->
<!--digitalRead(1)-->
<!--digitalRead(2)-->
<!--digitalRead(3)-->
<!--digitalRead(4)-->
<!--digitalRead(5)-->
<!--digitalRead(6)-->
<!--digitalRead(7)-->
<!--digitalRead(8)-->
<!--digitalRead(9)-->
<!--digitalRead(10)-->
<!--digitalRead(11)-->
<!--digitalRead(12)-->
<!--digitalRead(13)-->
<!--analogRead(A0)-->
<!--analogRead(A1)-->
<!--analogRead(A2)-->
<!--analogRead(A3)-->
<!--analogRead(A4)-->
<!--analogRead(A5)-->
Examples
You can find examples in the library and also use the examples of the Ethernet(Galileo) library.