Raspberry Pi GPIO output

Hi,

Sorry if this has been asked before, I was wondering if there is an extension that allows output on the RPi pins? As part of an arcade cabinet project, I would like to be able to use addressable LEDs connected to the pi for led effects. does anyone know if this is possible? I’m already using some pins for button input, but wanted to see if there is any way of output too.

Thanks

1 Like

Hi thebodger,

not a direct answer to your question, but maybe an addition to your idea: I’ll use a Digispark with an ATTiny85 over serial to control WS2812 LEDs from RPi0/Arcade MakeCode.
The ATTiny85 has no hardware serial, but a SoftSerial implementation exists - 4800 Baud aren’t that much, but it’s enough.

Mirek

This is a really interesting idea!

I am also under the impression that GPIO input is supported for e.g. controllers:

But GPIO output on the RPi from MakeCode Arcade would also be really great!

Does anyone in the @makecode technical team(@peli?) know if this is somehow supported already, directly without @infchem nice work-around above, or if it feasibly could be achieved with an extension?

I don’t think we have GPIO output for the Pi. @mmoskal ?

1 Like

The GPIOs are not supported from user code. The runtime itself has access to them of course.

We do have serial interface though, so you could talk serial to an external board that would control the LEDs.

1 Like

Thanks for your reply, @mmoskal!

Sorry for not mastering all the esoteric details of your answer and needing it fed to me by a tea spoon, but may I read your answer like this?:

  1. The GPIOs are not supported from user code

=> As of now one can (obviously)not control GPIO output switches from code inside the MakeCode editor.

  1. The runtime itself has access to them of course.

=> It would be possible to control GPIO output switches from user code if they would be made available from the runtime by e.g. the making and use of such an extension?

Could it be solved with an extension talking to the runtime, then?