Get it on Google Play


Wm뮤 :: C# 시리얼

블로그 이미지
가끔 그림그리거나 3D모델링하거나
취미로 로봇만드는
퇴직한 전자과 게임프로그래머
2020.3.48f1 , 2022.3.6f1 주로 사용
모카쨩
@Ahzkwid

Recent Comment

Archive


2021. 10. 11. 19:08 Unity/C#

 

 

 


받을때
if (serialport.BytesToRead > 0)
{
    string t = serialport.ReadExisting().Trim();//좌우공백지움
    if (t.IndexOf("P3RR") >= 0)//문자열있는지 검색하고 있으면 해당위치 없으면 -1
    {
        ping = 0;
    }
}


보낼때
serialport.Write("문자열");
serialport.Write(바이트배열,offset,길이);

'Unity > C#' 카테고리의 다른 글

유니티 RectTransform  (0) 2021.10.16
C# Delegate와 IEnumerator  (0) 2021.10.11
c# 해쉬테이블  (0) 2021.09.13
posted by 모카쨩

  • total
  • today
  • yesterday

Recent Post

저사양 유저용 블로그 진입