Wykres commitów

380 Commity (5a92a9c73505a8cb8fa3320a1605379e8892a05c)

Autor SHA1 Wiadomość Data
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
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
Phil Howard 306877cdf5 Add RGB HTTP demo 2021-04-15 10:11:16 +01:00
Phil Howard 2e3af3b436 Silence warnings, rename prot_mode
* Silences printf output on wait falures, original library had these as WARN so I assume they're completely optional and mostly just noise.
* Renames the "prot_mode" parameter to "protocol_mode" so it doesn't look like someone typod "port_mode" a lot.
2021-04-15 10:11:16 +01:00
Phil Howard 0703c90dea Use std::string in API 2021-04-15 10:11:16 +01:00
ZodiusInfuser 8ff49474ea Progressed on Wifi class, adding IPAddress 2021-04-15 10:11:16 +01:00
ZodiusInfuser e5545c1c02 Added latest local code for wireless pack 2021-04-15 10:11:16 +01:00
Phil Howard 50912e65bf Revert ST7789 backlight for Pico Display 2021-03-31 11:45:54 +01:00
ZodiusInfuser 848aa19c2c Added micropython support and example for roundlcd breakout 2021-03-30 15:15:13 +01:00
Phil Howard f812e23d8e Cleaner RASET, CASET and MADCTL handling 2021-03-29 13:18:31 +01:00
David Tillotson 1993d403e5 Added portrait mode (building with the work from hamid-elaosta:portrait) 2021-03-29 13:18:31 +01:00
David Tillotson 98b633f31f Correct version of the st7789.cpp driver! 2021-03-29 13:18:31 +01:00
David Tillotson 237d59d1d1 Slight efactor of st7789 driver, and addition of the flip function 2021-03-29 13:18:31 +01:00
Simon Reap 0166208a52 Pico driver for vl53l1x Time of Flight breakout 2021-02-22 22:02:23 +00:00
Simon Reap 89386dada3 Fix getTimerCount() for > 256 units 2021-02-08 16:15:53 +00:00
Simon Reap 456b9309bd RV3028 RTC Driver and example for Raspberry Pico 2021-02-03 14:20:31 +00:00
Phil Howard 1d845374f7 Add cmake files for other libraries 2021-01-22 14:33:17 +00:00
Phil Howard 8dae215552 Add .cmake files to support out-of-tree projects 2021-01-22 14:03:38 +00:00
ZodiusInfuser 75560ea038 Added outline of an mpy wrapper for pico_display 2021-01-20 15:59:48 +00:00
Jonathan Williamson 6911719183 example driver for MSA301, ability to embed an image into binary and draw it on screen 2021-01-17 16:05:28 +00:00
Jonathan Williamson 96d702ef9a PicoExplorer library and example, basic text support for PicoGraphics 2021-01-17 07:41:25 +00:00
Jonathan Williamson 9f31765c98 Setup libraries and drivers correctly for CMake 2021-01-16 15:02:18 +00:00
Jonathan Williamson 90d3ab8178 pico display driver 2021-01-16 12:26:03 +00:00
Jonathan Williamson cf86122d56 ST7789 driver 2021-01-15 16:12:36 +00:00