Azzera filtri
Azzera filtri

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

2 visualizzazioni (ultimi 30 giorni)
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?

Risposte (0)

Categorie

Scopri di più su MATLAB Support Package for Arduino Hardware in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by