Phil Howard
445737088f
Switch drivers over to I2C class, tidy up common include
...
Removes all driver-specific SDA/SCL pin definitions and defaults.
Pin type is "uint" everywhere, but "PIN_UNUSED" is *int*_max for MicroPython compat. That's still a lot of pins!
Adds baudrate to the I2C class, and allows a driver (like Trackball) to check the baudrate is supported
2021-05-17 11:46:12 +01:00
Phil Howard
42c7555c96
Add common I2C class
...
This change adds a common I2C class, gathering various I2C functions into a single point of responsibility.
It's necessary for correctly managing the I2C bus pins and state across multiple devices.
2021-05-14 23:02:38 +01:00
Phil Howard
3dfae2ed5c
Add a common header for pins and settings
...
* Add a common/pimoroni.hpp to list default pins for various add-ons
* Move the BG SPI Slot enum here for safe keeping
* Switch all GPIO pin references to "uint" to match Pico SDK and bring back PIN_UNUSED as UINT_MAX
2021-05-14 21:55:19 +01:00
ZodiusInfuser
f2ee2a4f8d
Better solution to keywords and constructors. Just for I2C for now
2021-05-14 17:14:07 +01:00
ZodiusInfuser
09fc7ca4a7
Added MP address printout for supported breakouts
2021-05-14 15:14:47 +01:00
Phil Howard
5ca77b6e28
Cleanup RV3028 comments/whitespace
2021-05-14 13:15:39 +01:00
Phil Howard
904bf657bb
Add check for valid Chip ID and fail early
...
Confused myself by plugging this into a BG base. It gave all the appearance of working, but the time was not counting up.
Turns out the library will happily talk to no device whatsoever and when you "set_time" it's stored in an C array and returned as if it came from the RTC.
2021-05-14 13:15:39 +01:00
ZodiusInfuser
2be5528ec7
Partial micropython bindings for RV3028
2021-05-14 13:15:38 +01:00
ZodiusInfuser
80eddb24c7
Updated RV3028 driver to our coding style and included a standalone C example
2021-05-14 13:15:08 +01:00
Phil Howard
fd3ef973b6
Fix MICS6814 heater enable, improve demo
2021-05-14 12:41:46 +01:00
ZodiusInfuser
d45a92fef3
Micropython bindings for IOExpander breakout
2021-05-14 12:41:46 +01:00
ZodiusInfuser
31edcf8f93
Renamed IOE's set_addr method to set_address
2021-05-14 12:41:46 +01:00
ZodiusInfuser
eb95bb0ffe
Reorder of variables to make MP happy
2021-05-14 12:41:27 +01:00
ZodiusInfuser
05af3e86ba
Renamed IOExpander and added Pot, Enc, and MICS specific classes
2021-05-14 12:40:33 +01:00
ZodiusInfuser
acf011bba2
Merge in previous Nuvoton driver code
2021-05-14 12:40:33 +01:00
ZodiusInfuser
ea460f9519
Micropython bindings and example for MSA301
2021-05-14 10:02:56 +01:00
ZodiusInfuser
c4b166d4d9
MSA301 Driver and example tweaks
2021-05-14 10:02:49 +01:00
Jonathan Williamson
f211fe67e6
Added MSA301 driver, library, and example
2021-05-14 10:01:29 +01:00
Phil Howard
8db593a819
AS7262 convert float correctly
2021-05-12 16:04:50 +01:00
Phil Howard
ae489873ee
AS7262 add set_integration_time
2021-05-12 16:04:50 +01:00
ZodiusInfuser
a6c738d018
Finished micropython bindings for AS7262, and added example
2021-05-12 16:04:50 +01:00
ZodiusInfuser
5af43311f4
Micropython bindings and minor tweaks for AS7262
2021-05-12 16:04:50 +01:00
Phil Howard
6afbc2e64c
AS7262 driver
...
Co-authored-by: ZodiusInfuser <christopher.parrott2@gmail.com>
2021-05-12 16:04:50 +01:00
Philip Howard
5d27dbc711
Merge pull request #137 from pimoroni/driver/st7789
...
C++ and MP support and example for 1.3" LCD breakout
2021-05-10 08:59:19 +01:00
Philip Howard
a99be13272
Merge pull request #139 from pimoroni/example/pico-wireless-sdcard
...
Pico Wireless example: Serve files from SD card
2021-05-07 14:18:50 +01:00
Phil Howard
356e649308
Extra init for 240x240 ST7789 displays
2021-05-07 13:48:56 +01:00
Phil Howard
f843b771ab
Fix for ST7789 display flicker
2021-05-07 13:48:56 +01:00
ZodiusInfuser
f4a58ec2b2
Changed private to public
2021-05-07 13:48:56 +01:00
ZodiusInfuser
c6068c0fec
Reordered variables
2021-05-07 13:48:56 +01:00
ZodiusInfuser
84015d7de9
ST7789 tidyup, incl. whitespace removal
2021-05-07 13:48:56 +01:00
ZodiusInfuser
16106d5596
Micropython bindings for ColourLCD and minor tweaks for ST7789, and RoundLCD
2021-05-07 13:48:51 +01:00
Phil Howard
a5dfb9fd78
Add BSD 2c license to sdcard driver
2021-05-07 11:13:04 +01:00
ZodiusInfuser
c613a0f75d
Added pin defines
2021-05-07 11:10:48 +01:00
ZodiusInfuser
2be5b11c42
Micropython bindings for small ColourLCD and ST7735
2021-05-07 11:10:47 +01:00
ZodiusInfuser
ded2710f90
Micropython binding fixes and example for SGP30
2021-05-06 10:16:10 +01:00
ZodiusInfuser
77ca674ac8
Micropython bindings and minor tweaks for SGP30
2021-05-06 10:01:55 +01:00
Simon Reap
62e085e81c
SGP30 driver for Raspberry Pico
...
Co-authored-by: ZodiusInfuser <christopher.parrott2@gmail.com>
2021-05-06 10:01:19 +01:00
ZodiusInfuser
3f379d04e7
C++ and MP support and example for LTR559 breakout ( #135 )
...
* C driver and example for LTR559 breakout
* Micropython bindings and example for LTR559
2021-05-06 09:48:17 +01:00
Phil Howard
24fa369759
Pico Wireless HTTP SD Card demo
2021-05-05 17:32:35 +01:00
ZodiusInfuser
7d3eb60b33
C++ and MP support and example for Trackball breakout ( #134 )
...
* C and Micropython bindings for trackball
* C and Micropython examples for trackball
2021-05-04 22:29:53 +01:00
Philip Howard
eee621db13
Merge pull request #131 from pimoroni/patch-is31fl3731
...
Recover the initialisation patch for is31fl3731
2021-05-04 10:35:24 +01:00
ZodiusInfuser
69ba1c88ef
C++ and MP support and examples for Dotmatrix breakout ( #133 )
...
* C driver for LTP305 breakout
* Micropython bindings for LTP305 breakout
* Micropython examples for dotmatrix
* C++ examples for dotmatrix
Co-authored-by: Phil Howard <phil@gadgetoid.com>
2021-05-04 10:34:52 +01:00
ZodiusInfuser
7b15bda03c
Fix for initialisation order issue
2021-04-23 10:12:40 +01:00
Phil Howard
91bf9be9f0
IS31FL3731 for RGBMatrix5x5 and Matrix11x7
...
Add IS31FL3731 driver
Add RGBMatrix5x5 library and example
Add Matrix11x7 library and example
Co-authored-by: ZodiusInfuser <christopher.parrott2@gmail.com>
2021-04-22 17:29:37 +01:00
Philip Howard
7776536d83
Merge pull request #126 from pimoroni/pico-wireless
...
C++/MicroPython Support & Examples for Pico Wireless
2021-04-22 13:40:59 +01:00
ZodiusInfuser
a406bb5e11
Added final missing functions from wifi api
2021-04-20 12:05:29 +01:00
Phil Howard
b3df1483c1
Add breakout-garden SPI slot selection for ST7789 displays
...
A new constructor has been added which accepts a enum type BG_SPI_SLOT which can be either:
ST7789::BG_SPI_FRONT or ST7789::BG_SPI_BACK.
This selects the correct CS/BL pins for the respective breakout-garden SPI slot.
Additionally the PWM'd backlight is turned *on* by default to avoid any confusion when the user does not set a value.
2021-04-19 17:22:56 +01:00
ZodiusInfuser
15ccd8f001
Added digital_read and analog_read functions
2021-04-19 16:44:11 +01:00
ZodiusInfuser
47bfada0d9
Fixes for picowireless not showing in Micropython
2021-04-15 10:11:16 +01:00
ZodiusInfuser
971ac565dd
Finished micropython bindings for current C++ class implementation
2021-04-15 10:11:16 +01:00