フィルターのクリア

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

2 ビュー (過去 30 日間)
syat mat zin
syat mat zin 2017 年 11 月 28 日
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 Center および File ExchangeMATLAB 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