Read data from digital pin on Arduino hardware
value = readDigitalPin(a,pin)
Create a connection to Arduino hardware and read digital pin 13.
a = arduino; readDigitalPin(a,'D13')
ans = 1
a— Arduino hardware connection
Arduino hardware connection
arduino, specified as an object.
pin— Digital pin number
Digital pin number on the physical hardware, specified as a character vector.
value— value acquired from digital pin
Value acquired from digital pin, returned as a numeric double.