I can't set "configurePin" in mode 'pwm' (work with Raspberry pi3)

1 visualización (últimos 30 días)
Sergey Nazarov
Sergey Nazarov el 29 de Dic. de 2017
Editada: Walter Roberson el 30 de Dic. de 2017
When I write command:
configurePin(mypi, 13, 'PWM');
I receive error:
">> configurePin(mypi, 13, 'PWM');
Error using raspi/recvResponse (line 697)
Unable to configure pin for PWM output.
Error in raspi.internal.PWMBase/initPWM (line 24)
recvResponse(obj);
Error in raspi/configurePinPWM (line 830)
initPWM(obj,pinNumber,frequency,0);
Error in raspi/configurePin (line 489)
configurePinPWM(obj,pinNumber,frequency);
"
Help me, please.

Respuestas (1)

Walter Roberson
Walter Roberson el 29 de Dic. de 2017
Notice that 13 is not on the list of Available Digital Pins in the example https://www.mathworks.com/help/supportpkg/raspberrypiio/ref/configurepin.html#bvdit9u.bt548he-20 .
The list of GPIO pins is different for different boards and different ways of talking about the pins. In at least one of the pin numbering schemes, pin 13 is MISO, which is for SPI interfaces.
  1 comentario
Sergey Nazarov
Sergey Nazarov el 30 de Dic. de 2017
Editada: Walter Roberson el 30 de Dic. de 2017
I was trying "Wiring Pi pin 23" - nothing
I also was trying use any number from this list:
"
>> mypi.AvailableDigitalPins
ans =
2 3 4 5 6 7 8 9 10 11 12 13 14
15 16 17 18 19 20 21 22 23 24 25 26 27
"
but answer was old

Iniciar sesión para comentar.

Comunidades de usuarios

Más respuestas en  Power Electronics Control

Categorías

Más información sobre MATLAB Support Package for Raspberry Pi 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