self.gpio.setup(self.reset_pin, self.gpio.OUT)
self.gpio.output(self.reset_pin, self.gpio.HIGH)
self.gpio.setup(self.dc_pin, self.gpio.OUT)
self.gpio.output(self.dc_pin, self.gpio.LOW)
Then we get more complicated, and don't know where to even start here, but I want to write out to my SSD1306 device, the following are the defines and inits of erlang code with the python for example.
Python:
self.spi = gaugette.spi.SPI(bus, device)
where bus=0 and device =0
Erlang: (for read device)
-define(SPICHANNEL, spi1).
-define(SPIMODE, 0).
-define(SPIBPW, 8).
-define(SPISPEED, 1000000).
-define(SPIDELAY, 10).
init() ->
spi_sup:start_link([{?SPICHANNEL, "/dev/spidev0.0"}]),
spi:config(?SPICHANNEL, ?SPIMODE, ?SPIBPW, ?SPISPEED, ?SPIDELAY).
If anyone has any help it would be really appreciated, sure once I get started/understand correctly it would be easy sailing.
Any help appreciated,
Thanks,
Stuart