How to access hardware libraries in a Raspberry Pi, just like Python does

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By sirvela
:warning: Old Version Published before Godot 3 was released.

Hi,

when writing a python script in a raspberry pi, there is a module for hardware access. Is there any way to access hardware resources (serial ports, SPI, I2C, GPIO etc) from GDScript?

In fact, many resources are file-like, so if I can use some sort of fopen-fwrite-fclose from GDScript would be enough, I think. Any chance?

You have the File class, but I don’t know if will work with device files…

A custom module for the engine may be the best option.

eons | 2016-12-13 14:49