Wykres commitów

91 Commity (0f7c9a10531bf168119658b09675d935027398b9)

Autor SHA1 Wiadomość Data
Phil Howard be9b1437db Add MicroPython bindings for BME280 and BMP280 2021-08-02 14:20:59 +01:00
Phil Howard f0eff195fe C++ SDK Support for BME280 and BMP280 2021-08-02 14:20:40 +01:00
Phil Howard 746e21c542 BME68X Add Time/Temp config to Gas, document 2021-08-02 14:12:46 +01:00
Phil Howard c402d92e0f Basic MicroPython bindings for BME68X
The BME68X library is *linked* against the MicroPython bindings, rather than compiled directly in.
This saves specifing the list of target files twice.
2021-08-02 14:12:46 +01:00
Phil Howard 22d39faf5f Bringup BME688 and BME680 sensors
This changeset brings the BOSCH BME68X Sensor API library in as a submodule and makes it buildable with CMake.

A thin wrapper- the BME68X driver- provides simple init, configure, read_forced and read_parallel functions.

Two BME688 examples are available for forced-mode and parallel-mode operation.
2021-08-02 14:11:56 +01:00
Philip Howard 73d92023e9
Merge pull request #29 from pimoroni/driver-bh1745
Add BH1745 driver
2021-08-02 09:43:46 +01:00
Philip Howard c81b92ecdc
Merge pull request #180 from Daft-Freak/patch-1
Fix some ST7789 regs
2021-08-02 09:20:25 +01:00
Phil Howard bd648034f5 Fix LTR559 duty cycle 2021-07-30 13:30:42 +01:00
Phil Howard b80b714c4f BH1745 MicroPython bindings & example 2021-07-30 12:41:06 +01:00
Phil Howard ea6acf2207 Porti BH1745 to Pimoroni I2C 2021-07-30 12:41:06 +01:00
Phil Howard 54169f4150 Add BH1745 driver 2021-07-30 12:41:02 +01:00
Phil Howard 32e226bfca Add RGBLED and Button libraries
"RGBLED" PWMs 3 pins as a single RGB LED and exposes methods to set the colour via HSV/RGB.

"Button" handles tracking the state and changed state of a single GPIO button, in addition to supporting auto-repeat for held-down buttons.
2021-07-20 15:34:24 +01:00
Charlie Birks 47a2f7c1c7
Fix some ST7789 regs
Fixes frame rate/porch register confusion and uses PWCTRL1 instead of 0xd0.
2021-07-20 15:22:31 +01:00
Philip Howard 3274069a27
Merge pull request #165 from pimoroni/patch-pico-explorer-spi
Fix Pico Explorer SPI for #162
2021-06-05 19:17:16 +01:00
Phil Howard 6022928517 Fix Pico Explorer SPI for #162
The switch to common I2C and common definitions for SPI had broken an edge case in Pico Explorer where no backlight pin is used.

The backlight pin was inadvertently set to the front Breakout Garden SPI slot default, which is pin 20- this also happens to be the I2C SDA pin for Pico Explorer, breaking I2C comms.

This fix adds a new special case board "PICO_EXPLORER_ONBOARD" so that ST7789 can be initialised without the backlight pin.

This will be useful for anyone using ST7789 without the rest of the Pico Explorer library, although it feels a little contrived.

Also switches ST7735 over to the common defines.
2021-06-05 19:06:11 +01:00
David Lin 1f385d8f30 Fix build error: missing printf declaration 2021-06-04 23:08:26 +08:00
Phil Howard 0bda2abd2a Fix AS7262 constructor and example 2021-05-18 11:36:14 +01:00
Phil Howard 3e56dfb14c Remove unecessary manual conversion to byte arrays 2021-05-17 16:05:09 +01:00
Phil Howard 77839e2a6a Tidy up constructors, drop unused variables, const single addr
Removes i2c_inst_t from constructors since it's ignored, and updated the Python bindings not to supply this argument. Instance is inferred from the supplied pins.
2021-05-17 14:50:49 +01:00
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