The SoftwareSPI library is licensed under the MIT License. For past versions, please see the Electric Imp public GitHub repos listed below. The Electric Imp Dev Center documents the latest version of the library. Read 2 bytes of data from SPI and log it Parameters Parameterīlob - the data read from SPI. This method reads the specified number of bytes from the software SPI and returns it as a Squirrel blob. Read 8 bytes of data from SPI and log it This method reads the specified number of bytes from the software SPI and returns it as a string. The first serial port (-1 or 0) will always be used by the Arduino bootloader. The size and type of the data returned matches the size and type of the data sent. Bang-Bang Bed Heating Thermal Protection Settings. This method writes to, and concurrently reads data from, the software SPI. This method writes the specified data to the software SPI and returns the number of bytes written. Local sspi = SoftwareSPI(sclk, mosi, miso) Local miso = hardware.pinC // Master Input hardware SPI at all, and just bit-bang some GPIO. Local mosi = hardware.pinB // Master Output Are you sure about that > The Adafruit Arduino St7735S driver library seems to use 8-bit data and >. Your application should take care of this functionality. Note This class does not configure or toggle a chip-select pin. To add this library to your project, add #require ":0.1.0" to the top of your device code Class Usage Constructor: SoftwareSpi( sclk, mosi, miso) Parameters ParameterĮach of the imp pin objects will be configured by the class. Click here to see information on other versions of this library. You can view the library’s source code on GitHub. Clock speed cannot be configured when using this class. Note The only supported SPI mode is currently 0 (CPOL 0, CPHA 0) with the most significant bit sent first. This class contains the same read and write methods as the imp API. This library provides software-based bit-bang SPI (Serial Peripheral Interface) that can be used as an alternative to the imp API’s hardware.spi object.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |