Program for microcontroller STM32 NUCLEOF401RE with WiFi expansion board X-NUCLEO-IDW04A1, microSD adapter (SPI) and Air Quality sensor MQ-135. Its purpose - read data from sensor and save it on microSD and/or transmit it to server by WiFi.
Configuration file should be placed in the root directory of SDCard with name: config.txt.
File contents:
- Date & Time configuration This date and time will be set as current for microcontroller.
Date=7;
Month=6;
Year=21;
WeekDay=3;
Hours=0;
Minutes=14;
Seconds=47;
- WiFi configuration
Private modes:
0
- None1
- WEP2
- WPA Personal
SSID=;
SecurityKey=;
PrivateMode=2;
- Intervals configuration
Configure with what interval data will be send to server (
transmitIntervalSeconds
) or written to microSD (writeSDIntervalSeconds
) and longpolling interval (requestIntervalSeconds
).
writeSDIntervalSeconds=60;
transmitIntervalSeconds=1800;
requestIntervalSeconds=900;
- Server connection configuration
IP address and port of server which will be receiving data
Protocols for data transmitting:
t
- TCPu
- UDP (Not supported)
IP=;
Port=;
Protocol=t;
- Credentials configuration
OwnerID=;
MicrocontrollerID=;
MicrocontrollerPassword=;
SensorID=;