MATLAB Answers


Can't read GPIO pin 4

Asked by Reitsam Laurenz on 6 Aug 2016
Hi, i can't read the value of of pin 4 with Matlab (and/or Simulink) every other pin is working. Has anybody an idea? thanks in advance!
mypi =
raspi with properties:
Port: 18730
BoardName: Raspberry Pi 2 Model B
AvailableLEDs: {'led0'}
AvailableDigitalPins: [4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]
AvailableSPIChannels: {}
AvailableI2CBuses: {'i2c-1'}
AvailableWebcams: {}
I2CBusSpeed: 0
Supported peripherals
>> readDigitalPin(mypi,4)
Reference to non-existent field 'gpio4'.
Error in raspi/readDigitalPin (line 565)
if ~obj.DigitalPin.(pinName).Opened


Sign in to comment.

0 Answers