필터 지우기
필터 지우기

How to display digital output from arduino to Matlab GUI using static text

조회 수: 2 (최근 30일)
Hi,
The idea is when I touch the button at pin 2 Arduino the output shows 1 and release the output shows 0 (continuously). Below is the arduino code.
int pinTouch1 = 2;
void setup() { pinMode(pinTouch1,INPUT); Serial.begin(9600); }
void loop() { digitalRead(pinTouch1); int touchState1 = digitalRead(pinTouch1); Serial.print(touchState1); delay(100); }
The problem is 1) I don't know to use either edit text or static text. 2) What is the code use to display the output?

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Support Package for Arduino Hardware에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by