티스토리 뷰
BilientSevices/MeasurementSystem[BMS]
[BMS] Command Processor for WiFi Device
bizmaker 2020. 6. 10. 08:45void b_PostprocessWebCommand(char CommandType1, char CommandType2, String CommandString){
switch(CommandType1){
case 'P': // Port control of WiFi device
{
int PortValue = 0;
int PortNo = 0;
PortValue = (int) CommandString.toInt();
if(CommandType2 == 'R'){ // Port control for RELAY
PortNo = PIN_RELAY;
if(PortValue == 1) IsPowerON = true;
if(PortValue == 0) IsPowerON = false;
}else if(CommandType2 == 'O'){ // Port control for RELAY
PortNo = PIN_BUZZER;
}else{
PortNo = (int)(String(CommandType2).toInt());
if(PortNo == 0) return;
}
if(PortValue == 1) digitalWrite(PortNo, HIGH);
if(PortValue == 0) digitalWrite(PortNo, LOW);
}
break;
case 'R': // Request
{
switch(CommandType2){
case '0': // for THE WiFi device
b_CheckAnalogInput();
break;
case 'L': // list of sub devices
b_SendDeviceList();
break;
case 'D': // Data
RxCommand_WiFi = CommandString;
IsCommandFromWeb = true;
break;
case 'C': // Command
RxCommand_WiFi = CommandString;
IsCommandFromWeb = true;
break;
}
}
break;
}
}
반응형
'BilientSevices > MeasurementSystem[BMS]' 카테고리의 다른 글
[BMS] Command Processor for Instrument (0) | 2020.06.11 |
---|---|
[BMS] Command Process for Actuator (0) | 2020.06.10 |
[BMS] Display of Measured Data (0) | 2020.06.08 |
[BMS] Images of Web Pages (2) | 2020.06.08 |
[BMS] Measurement System Launched (0) | 2020.06.08 |
반응형
250x250
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- Innovation&Hurdles
- 혁신
- 혁신과허들
- 빌리언트
- Innovations
- Decorator
- arduino
- 배프
- 치매방지
- 둎
- 오블완
- BSC
- badp
- 허들
- 절연형
- 치매
- 아두이노
- 심심풀이치매방지기
- 전압전류모니터링
- 티스토리챌린지
- image
- DYOV
- Innovations&Hurdles
- bilient
- Video
- Hurdles
- ServantClock
- 전압
- 전류
- 심심풀이
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함