Borrar filtros
Borrar filtros

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

2 visualizaciones (últimos 30 días)
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?

Respuestas (0)

Categorías

Más información sobre MATLAB Support Package for Arduino Hardware en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by