Closed fa1ke5 closed 4 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
in file SH1106Spi CS pin for display is not programmed and multi SPI devices is not work with display correctly `class SH1106Spi : public OLEDDisplay { private: uint8_t _rst; uint8_t _dc;
public: SH1106Spi(uint8_t _rst, uint8_t _dc, uint8_t _cs, OLEDDISPLAY_GEOMETRY g = GEOMETRY_128_64) { setGeometry(g);
you can see only RST and DC and CS declaration not present :( I find this bug only then i take oscilloscope. i'm add some code in SH1106Spi.h and now it work great `
ifndef SH1106Spi_h
define SH1106Spi_h
include "OLEDDisplay.h"
include
class SH1106Spi : public OLEDDisplay { private: uint8_t _rst; uint8_t _dc; uint8_t _cs;
public: SH1106Spi(uint8_t _rst, uint8_t _dc, uint8_t _cs, OLEDDISPLAY_GEOMETRY g = GEOMETRY_128_64) { setGeometry(g);
private: inline void sendCommand(uint8_t com) attribute((always_inline)){ digitalWrite(_cs, HIGH); digitalWrite(_dc, LOW); digitalWrite(_cs, LOW); SPI.transfer(com); digitalWrite(_cs, HIGH); } };
endif
`