ArnieX / swifitch

Swifitch is ESP8266 based relay board that could be used to turn any light or any wall socket into smart one!
http://www.swifitch.cz
Other
132 stars 29 forks source link

Possible to have the SPI pins available #1

Closed osos closed 6 years ago

osos commented 7 years ago

I really love this work. I have been looking for this diy-HW for a long time. Thank You.

I am interested in applying i2c and/or SPI sensors, displays etc.

Would it be possible to make al the pins available through headers?

ArnieX commented 7 years ago

Hi,

first of, thanks for the appreciation. To the i2c that's simple as ESP8266 has only SW i2c and you can set whatever GPIO pins you wish I guess default are GPIO 0 and 2 or 0 and 4, I'm not very sure now, those pins are indeed broken out on the header. About SPI I'm really short of knowledge here as I have never used this interface, in case this is too supported only in SW you could likely just set pins you wish to use within your FW.

To keep small footprint we have decided to break out only few pins for additional relay or two or some motion sensor etc. that can extend device's functionality. Breaking all pins would require a lot more space.

Alternatively if SPI pins aren't broken out or possible to set within FW. You could solder wires directly to ESP module in place of SPI pins.

Hope this helps ;), also if you make Swifich, please post pictures here.

osos commented 7 years ago

Hi,

Please see this http://www.pighixxx.com/test/portfolio-items/esp8266/?portfolioID=360

The pins 12 (MISO), 13 (MOSI), 14 (CLK) and 15 (CS) represent the hardware SPI. Pin 15 (CS) may to software defined, but in general better performance is achived using the predefined HW pins

i2c are normally on pin 4 and 5.

ArnieX commented 7 years ago

Hi,

pins that you are referencing as HW SPI aren't real GPIO, these are only to directly communicate with internal memory. For example ESP8266 12S already do not have these pins as they are useless. Pin 15 is GND.

BR,

Martin

osos commented 7 years ago

Ok. Not sure I completely understand. Just know that for my SPI enabled sensors etc, these IO-pins are to be used with the libraries available.

Would be fantastic if all available pins could be available on the PIN header on the board.

ArnieX commented 7 years ago

That is virtually impossible due to size constrains. This device isn't to be allrounder it is meant to switch things on and off and offer limited pin out for sensors or another relays. There is currently no plan to extend the header. The best you could do is to wire pins that you need directly from ESP module by soldering wires to pins directly.

I'm sorry I can't help more here.

BR,

Martin