티스토리 뷰
void b_TreatCommand_WiFi(String CommandString1){
int Index1 = CommandString1.indexOf(":");
char CommandType0 = CommandString1.charAt(0);
char CommandType1 = CommandString1.charAt(1);
String CommandValue1 = CommandString1.substring(Index1+1);
switch(CommandType0){
case 'P': // Port Control
{
if(CommandType1 == '4'){
if(CommandValue1.equals("0")) h_SwitchRelay('F');
if(CommandValue1.equals("1")) h_SwitchRelay('N');
}
}
break;
case 'W': // WiFi Information
{
int Index2 = CommandValue1.indexOf(",");
if(Index2 < 1) return;
thisSSID = CommandValue1.substring(0, Index2);
thisPASSWORD = CommandValue1.substring(Index2+1);
b_SetWiFiInfo(thisSSID, thisPASSWORD);
}
break;
case 'T':
ADCValue_Ref = CommandValue1.toInt();
break;
case 'S':
if(CommandType1 != 'N') return;
SNo_Command = CommandValue1.toInt();
break;
default:
break;
}
}
반응형
'SWDesk > Firmware' 카테고리의 다른 글
HC-05, 블루투스 통신 모듈 (0) | 2020.12.20 |
---|---|
[Arduino] JSON 예제 (0) | 2020.11.25 |
[BMS] Command Process for VIC Instrument (0) | 2020.07.19 |
[BMS] Command Process for CD Devices (0) | 2020.07.19 |
[BMS] Command Process for LoRa Device (0) | 2020.07.19 |
반응형
250x250
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 전압
- Hurdles
- 치매
- 심심풀이
- 티스토리챌린지
- 절연형
- DYOV
- BSC
- arduino
- badp
- 혁신과허들
- Innovation&Hurdles
- Innovations
- ServantClock
- 오블완
- 아두이노
- 심심풀이치매방지기
- 허들
- 전압전류모니터링
- 전류
- 둎
- Video
- image
- 배프
- bilient
- Decorator
- 치매방지
- Innovations&Hurdles
- 혁신
- 빌리언트
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함