diff --git a/.common/Makefile b/.common/Makefile index ee1a53e..c231bd2 100644 --- a/.common/Makefile +++ b/.common/Makefile @@ -1,21 +1,28 @@ # makefile to build examples with platformi # -.PHONY: run clean upload monitor ci envdump +.PHONY: phony -run: +run: phony pio run -envdump: +envdump: phony -pio run --target envdump -clean: +clean: phony -pio run --target clean -upload: - pio run --target upload +upload: phony + pio run --target upload -monitor: - pio device monitor +monitor: phony + pio device monitor -tags: +tags: phony ctags -R + +ci: + find .. -maxdepth 2 -not -path '\.\./\.common/*' -name Makefile \ + -exec sh -c 'make -C $$(dirname {})' \; +phony: + + diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..37db543 --- /dev/null +++ b/.envrc @@ -0,0 +1,3 @@ +VIRTUAL_ENV=$HOME/.platformio/penv +PATH_add $VIRTUAL_ENV/bin + diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..c6b4512 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,27 @@ +on: + push: + branches: + - master + pull_request: + branches: + - master + +name: build examples +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: checkout code + uses: actions/checkout@v4 + + - name: install python + uses: actions/setup-python@v4 + with: + python-version: '3.13' + + - name: install tools + run: | + pip install platformio==6.1.10 + + - name: build examples + run: make -C .common ci diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..e068c31 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,16 @@ +name: 'Stale issue handler' +on: + workflow_dispatch: + schedule: + - cron: '0 0 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@main + with: + stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days' + days-before-stale: 90 + days-before-close: 5 + exempt-issue-labels: 'blocked,must,should,keep' diff --git a/README.md b/README.md index 9882850..57cc065 100644 --- a/README.md +++ b/README.md @@ -5,29 +5,34 @@ Notes on Arduino libraries and sketches and other related stuff. * [My Libraries and projects](#my-libraries-and-projects) - * [JLed](#jled) - * [log4arduino](#log4arduino) - * [eps32-aws-iot](#eps32-aws-iot) - * [USB Spinner Game Controller](#usb-spinner-game-controller) - * [Simpson Device (virtual Drinking Bird)](#simpson-device-virtual-drinking-bird) + * [JLed](#jled) + * [log4arduino](#log4arduino) + * [eps32-aws-iot](#eps32-aws-iot) + * [USB Spinner Game Controller](#usb-spinner-game-controller) + * [Simpson Device (virtual Drinking Bird)](#simpson-device-virtual-drinking-bird) * [Sketches](#sketches) - * [Interfacing SSD1306 based OLED displays (SPI)](#interfacing-ssd1306-based-oled-displays-spi) - * [Colorduino RGB matrix driver](#colorduino-rgb-matrix-driver) - * [CJMCU-8x8 RGB matix](#cjmcu-8x8-rgb-matix) - * [WEMOS D-Duino](#wemos-d-duino) - * [ESP32 TTGO](#esp32-ttgo) - * [Heltec WiFi Lora 32](#heltec-wifi-lora-32) - * [Raspberry Pi 480x320 SPI TFT Display (3.5 inches)](#raspberry-pi-480x320-spi-tft-display-35-inches) - * [Further info](#further-info) - * [Sipeed Longan Nano RISC-V proto board (GD32VF103CBT6)](#sipeed-longan-nano-risc-v-proto-board-gd32vf103cbt6) - * [DFU mode](#dfu-mode) - * [Upload demo sketch](#upload-demo-sketch) - * [TODO](#todo) - * [Raspberry Pi HDMI LCD display (800x480, 4")](#raspberry-pi-hdmi-lcd-display-800x480-4) - * [Raspberry Pi Pico (RP2040)](#raspberry-pi-pico-rp2040) - * [PCA9685 driver board](#pca9685-driver-board) + * [Interfacing SSD1306 based OLED displays (SPI)](#interfacing-ssd1306-based-oled-displays-spi) + * [Colorduino RGB matrix driver](#colorduino-rgb-matrix-driver) + * [CJMCU-8x8 RGB matix](#cjmcu-8x8-rgb-matix) + * [WEMOS D-Duino](#wemos-d-duino) + * [ESP32 TTGO](#esp32-ttgo) + * [Heltec WiFi Lora 32](#heltec-wifi-lora-32) + * [Raspberry Pi 480x320 SPI TFT Display (3.5 inches)](#raspberry-pi-480x320-spi-tft-display-35-inches) + * [Further info](#further-info) + * [Sipeed Longan Nano RISC-V proto board (GD32VF103CBT6)](#sipeed-longan-nano-risc-v-proto-board-gd32vf103cbt6) + * [DFU mode](#dfu-mode) + * [Upload demo sketch](#upload-demo-sketch) + * [Raspberry Pi HDMI LCD display (800x480, 4")](#raspberry-pi-hdmi-lcd-display-800x480-4) + * [Raspberry Pi Pico (RP2040)](#raspberry-pi-pico-rp2040) + * [PCA9685 driver board](#pca9685-driver-board) + * [MP3 Modules](#mp3-modules) + * [VS1053 notes](#vs1053-notes) + * [Bosch BMP280](#bosch-bmp280) + * [TM1637 based Display](#tm1637-based-display) + * [ESP32 board with 1.14" RGB ST7789V TFT display](#esp32-board-with-114-rgb-st7789v-tft-display) + * [ESP32-C3 with 0.42" I²C OLED display](#esp32-c3-with-042-ic-oled-display) * [Misc](#misc) - * [WS2812 protection circuit](#ws2812-protection-circuit) + * [WS2812 protection circuit](#ws2812-protection-circuit) * [Author](#author) @@ -38,7 +43,7 @@ Notes on Arduino libraries and sketches and other related stuff. JLed is an Arduino library to control LEDs. It uses a non-blocking approach and can control LEDs in simple (on/off) and complex (blinking, breathing) ways in a -time-driven manner. +time-driven manner. It's available as a C++ or Python lib. jled @@ -54,7 +59,21 @@ void loop() { led_breathe.Update(); } ``` + +The Python API mirrors the C++ API: + +```python +import board +from jled import JLed + +led = JLed(board.LED).blink(500, 500).forever() + +while True: + led.update() +``` + * https://github.com/jandelgado/jled +* https://github.com/jandelgado/jled-circuitpython ### log4arduino @@ -66,7 +85,8 @@ delay(42); LOG("use %s formatting: %d %c %d %c %d", "printf", 9, '+', 1, '=', 10); ``` -Allows simple printf-like formatting and shows current time in millis and available memory, e.g. +Allows simple printf-like formatting and shows current time in millis and +available memory, e.g. ``` 0(1623): hello, log4arduino. @@ -77,7 +97,8 @@ Allows simple printf-like formatting and shows current time in millis and availa ### eps32-aws-iot -Code, tools and instructions on how to connect ESP32 securely to the AWS IOT cloud. +Code, tools and instructions on how to connect ESP32 securely to the AWS IOT +cloud. * https://github.com/jandelgado/esp32-aws-iot @@ -93,11 +114,11 @@ to play games like e.g. Arkanoid. Simulates an USB mouse and needs no drivers. Simulates an USB mouse using an Attiny85 (Digispark board) and randomly moves your mouse (see The Simpsons S07E07). -* https://github.com/jandelgado/simpson-device +* https://github.com/jandelgado/simpson-device ## Sketches -To build the demo sketches you can either copy the folders to the source +To build the demo sketches you can either copy the folders to the source folder of your Arduino IDE or use PlatformIO and the provided makefiles, e.g.: ``` @@ -136,13 +157,13 @@ rmation. ### WEMOS D-Duino The Wemos D-Duino is an ESP8266 board with an integrated SSD1306 OLED display -connected via I2C. +connected via I2C. wemos-d-duino * SSD1306 is connected with I2C and SCL connected to D2 and SDA connected to D1. -* see [example sketch](wemos_d_duino) for an example on how to use it with +* see [example sketch](wemos_d_duino) for an example on how to use it with the u8g2 library. ### ESP32 TTGO @@ -158,7 +179,8 @@ switch. * SSD1306 is connected with I2C and SCL connected to GPIO4 and SDA connected to GPIO5. -* see [example sketch](esp32_ttgo) for an example on how to use it with +* the builtin blue LED is connected to GPIO 16 +* see [example sketch](esp32_ttgo) for an example on how to use it with the u8g2 library. ### Heltec WiFi Lora 32 @@ -181,7 +203,7 @@ transceiver.

The display is labeled with `RPi Display 480x320 Pixel XPT246 Touch Controller` -and uses an `ILI9486` controller. In raspian (tested with `2018-11-13 Raspian`). +and uses an `ILI9486` controller. In raspian (tested with `2018-11-13 Raspian`). no additional drivers are needed. I got it running with the following configuration: Add to `/boot/config.txt`: @@ -255,7 +277,7 @@ Found DFU: [28e9:0189] ver=1000, devnum=7, cfg=1, intf=0, path="1-2", alt=1, nam Found DFU: [28e9:0189] ver=1000, devnum=7, cfg=1, intf=0, path="1-2", alt=0, name="@Internal Flash /0x08000000/512*002Kg", serial="??" ``` -#### Upload demo sketch +#### Upload demo sketch Before uploading to the MCU, make sure you installed [the udev rules as described here](https://docs.platformio.org/en/latest/faq.html#faq-udev-rules). Afterwards a `udevadm control --reload-rules && udevadm trigger` (as root) might be necessary. @@ -272,7 +294,7 @@ dfu-util: dfuse_download: libusb_control_transfer returned -1 If the demo sketch works, you should now see the builtin LEDs cycle in colors red, green and blue. -#### TODO +TODO - [ ] LCD demo w/ arduino framework - [ ] JLed demo @@ -284,7 +306,7 @@ red, green and blue. rpi tft hdmi

-The display is labelled "4inch HDMI LCD". The resolution is 800x480 and the +The display is labelled "4inch HDMI LCD". The resolution is 800x480 and the display has a built in XPT2046 touch controller. I had to power both the Raspi (RPi 3) and the display to get it run. The display @@ -333,7 +355,7 @@ and a [simple build script](https://github.com/jandelgado/jled/blob/4.7.0/exampl The PCA9685 is an **I2C bus** controlled LED/Servo controller **with 16 individually controllable PWM channels**. Each channel has a resolution of 12 bits, resulting in 4096 steps. All channels operate at the same fixed -frequency, which must be in the range between 24Hz and 1526Hz. +frequency, which must be in the range between 24Hz and 1526Hz. The board operates at 3V to 5V, which is fed through the VCC pin. The V+ pin is optional and is used to power servos or LEDs with up to 6V. The V+ voltage @@ -348,16 +370,233 @@ SDA and SCL are the I2C data and clock pins. The OE pin is optional (and pulled down by default) and is used to quickly disable all outputs (by setting OE to high level). -The I2C address is by default `0x40` and can be changed by closing the `A0` to +The I2C address is by default `0x40` and can be changed by closing the `A0` to `A5` pins using a soldering iron. There are many libraries for PCA9685 based boards out there, I successfully used the [Adafruit PWM Servo Driver -library](https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library). +library](https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library). Have a look at [this example here](pca9685). +### MP3 Modules + +I recently [built a Music Box for Kids](https://github.com/jandelgado/carl) and +evaluated some MP3 modules to find the right one for the job (I finally ended +up using the DFPlayer Mini). + +![MP3 Modules](images/mp3_modules.jpg) + +| | WTV020M01 V1.00 | DFPlayer Mini | Catalex Serial MP3 Player V1.0 | VS1053 MP3 Shield (geeetech) | GPD2856A based | +|------------------|------------------------------------|--------------------------------------------------------|-------------------------------------------------------------|----------------------------------------------------------------------------------|-----------------------------------------------------| +| Dimensions (mm) | 22x17 | 20x20 | 40x23 | 55x55 | 45x35, 22x34 | +| VCC | 3.3V | 3.2V-5V | 3.2V-5.2V | | 3.7V-5V | +| Chip | ? | ? | YX5300 | VLSI VS1053B | GPOD2856A | +| Media | Micro SD, 1 or 2GB, very picky | Micro SD up to 32GB | Micro SD up to GB | Micro SD | | +| Filesystem | FAT16/32 | FAT16/32 | FAT16/32 | FAT16/32 | | +| Max Files | 512 | 100*255 | ? | ? | ? | +| Formats | AD4,NO MP3 | MP3, WAV | MP3, WAV | MP1, MP2, MP3, MP4, AAC, OGG, WAV and more | | +| Frequency | 32kHz | 8-48kHz | 11-48kHz | | | +| Amplifier | Yes | Yes | Line out only | | 2W Mono | +| Buttons | Opt.: Play, Prev, Next, Vol+, Vol- | Optional | No | | Play, Prev, Next, Vol+, Vol- | +| Serial Interface | 2 Line + CLK | UART 9600bps | UART 9600bps | | | +| Microphone | No | No | No | Record in OGG, WAV | | +| Misc | Busy signal, Reset input | Busy signal, Equalizer | | | | +| Price (04/2021) | ca. 4€ | Starting at 1€ | ca. 2€ | ? | starting at 1€ | +| Library | | [Link](https://github.com/DFRobot/DFRobotDFPlayerMini) | [Link](https://github.com/cefaloide/ArduinoSerialMP3Player) | [Link](https://github.com/madsci1016/Sparkfun-MP3-Player-Shield-Arduino-Library) | n/a | +| Site | | | | | | +| Comment | Better use DFPlayer Mini instead | Small, reliable w/ Amplifier | | Many features, good documentation | Standalone Player, w/ and wo/ buttons and terminals | + +Summary: +* WTV020M01 is not recommended since not supporting MP3 format and very + restrictive regarding SD cards used and audio encoding +* The GPD2856A based boards are designed as stand alone players and are not + meant to be controlled by a micro controller. +* The DFPlayer Mini is a reliable board which can be controlled by a micro + controller. It has an amplifier built in as well as an equalizer. +* The VL1053 based shield supports many file formats and even recording of + audio. It lacks an amplifier but is otherwise feature-packed. +* The Catalex board is very simple to use and can be controlled by a micro + controller. It lacks an amplifier and offers only a serial interface for + control. + +Addiontial links: +* DFPlayerMini: https://wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299 +* Catalex: http://geekmatic.in.ua/pdf/Catalex_MP3_board.pdf +* GPD2856A: https://www.petervis.com/Electronics_Kits/gpd2856a/gpd2856a-mp3-decoder-board.html +* WTV020M01: https://hackaday.io/project/3508-portable-trollmaster-3000/log/12391-the-joy-of-using-an-underdocumented-module-and-using-a-plan-b-at-the-last-minute +* Geeetch VS1053: http://www.geeetech.com/wiki/index.php/Arduino_MP3_shield_board_with_TF_card + * Profiles for the VS1053: http://www.vlsi.fi/en/support/software/vs10xxapplications.html + +#### VS1053 notes + +The module is also capable to record audio on the SD card in OGG Vorbis and WAV +format. To encode the audio in OGG format, a plugin needs to be loaded from the +SD card. The plugins are available [here at +VLSI](http://www.vlsi.fi/fileadmin/software/VS10XX/vs1053-vorbis-encoder-170c.zip). +Pick yours from the `profiles/` directory (files with `.img` extension). The +name of the plugin is passed to the `prepareRecordingOgg` function. I had to +change the name to conform to 8.3 naming (e.g. `v08k1q06.img`), otherwise the +plugin did not load. Refer to the +[documentation](http://www.vlsi.fi/fileadmin/software/VS10XX/VorbisEncoder170c.pdf) +for more details. + +Libraries and examples: +* https://github.com/adafruit/Adafruit_VS1053_Library +* https://github.com/madsci1016/Sparkfun-MP3-Player-Shield-Arduino-Library + +### Bosch BMP280 + +bmp280 + +The [Bosch +BMP280](https://www.bosch-sensortec.com/products/environmental-sensors/pressure-sensors/bmp280/) +is an environmental sensor, capable of measuring temperature and barometric air +Pressure. The sensor supports both I²C and SPI. There are many different +boards available, mine is labeled `GY-BME/PM280` and costs about 1.60€ +(02/2023). I successfully connected it using I²C and CircuitPython, running on +an Raspberry Pi Pico W using the +[adafruit_bmp280](https://github.com/adafruit/Adafruit_CircuitPython_BMP280) +library (install on the Pico Pi with `circup adadfruit_bmp280`). + +In the example I connected the sensor as follows: + +| GY-BME/PM280 | Pico Pi Signal | Pin | +|--------------|----------------|-----| +| VCC | 3V3(OUT) | 36 | +| GND | GND | 23 | +| SCL | GP17/I2C0SCL | 22 | +| SDA | GP16/I2C0SDA | 21 | + +Running an I²C bus scan in the CircuitPython REPL reveals that the device is +has address 0x76 (118): + +``` +>>> import busio +>>> import board +>>> i2c = busio.I2C(board.GP1, board.GP0) +>>> i2c.try_lock() +True +>>> i2c.scan() +[118] +``` + +This is important, since the Adafruit library defaults to 119. Reading values +from the sensor is straight forward: + + +```python +# CircuitPython example +import busio +import board +import adafruit_bmp280 + +i2c = busio.I2C(board.GP17, board.GP16) +sensor = adafruit_bmp280.Adafruit_BMP280_I2C(i2c, 118) + +print(sensor.temperature) +print(sensor.pressure) +``` + +The first sensor I tried was broken. It was correctly detected during the bus +scan, but delivered wrong measurements all the time. Luckily I had some more +at hand to test wether it was a software or a hardware problem. + +### TM1637 based Display + +bmp280 + +This is a 4 digit 7-segment display using a TM1637 driver, which uses a data +and a clock line for connection to the MCU. + +| Display(TM1637) | Pico Pi Signal | Pin | +|-----------------|----------------------|-----| +| CLK | GP14 | 19 | +| DIO | GP15 | 20 | +| VCC | 3V3(OUT) or VBUS(5V) | 36 | +| GND | GND | 18 | + +```python +# CircuitPython example using https://github.com/bablokb/circuitpython-tm1637 +import board +from TM1637 import TM1637 + +display = TM1637(board.GP14,board.GP15) +display.hex(0xcafe) +display.scroll("hello world") +display.temperature(23) +``` + +### ESP32 board with 1.14" RGB ST7789V TFT display + +

+ + + +

+ +This module was sold on aliexpress in different variations as +_T-Display T-PicoC3 ESP32 S3 1,9 Zoll WiFi und Bluetooth-kompatibles Modul +ESP32 C3 Entwicklungsboard 1,14 Zoll LCD für Arduino_. I ordered the ESP32-S3 +version, but the one I got had an ESP32-D0WDQD6 and not an ESP32-S3, as +advertised. According to the specs, the display is a 1.14" RGB TFT display with +an ST7789V controller, connected through SPI and wired as follows: + +| Signal | Pin | +|------------- |-----| +| `MOSI` | 19 | +| `SCLK` | 18 | +| `CS` | 5 | +| `DC` | 16 | +| `RST` | 23 | +| `BL` | 4 | + +I tested 2 different libraries to control the TFT: + +1. [deirvlon/ST7789v-Arduino](https://github.com/deirvlon/ST7789v-Arduino): + while I had initially success in getting displayed at least anything, + further inspection of the [code](https://github.com/deirvlon/ST7789v-Arduino/blob/main/ST7789v_arduino.cpp#L545) + revealed, that the lib is hardwired to a resoultion of 240x320 pixels, resulting + in a wrong geometry of displayed graphics +2. [adafruit/Adafruit ST7735 and ST7789 Library](https://github.com/adafruit/Adafruit-ST7735-Library): + this lib worked, and I have adapted one of the original [demos here](esp32_st7789v/test.ino), + with the proper configuration + +I eventually found out, that `BL` stands for `BACKLIGHT` and that the backlight +must be turned on for obvious reasons.For that, I added the following code: + +```c++ +... +#define BL 4 +... + +void setup() { + ... + // turn the backlight on + pinMode(BL, OUTPUT); + digitalWrite(BL, 1); + ... +} +``` + +See this [sketch](esp32_st7789v/test.ino) for a working example. + +### ESP32-C3 with 0.42" I²C OLED display + +

+ +

+ +This board features the +[ESP32-C3](https://www.espressif.com/en/products/socs/esp32-c3), which is based +on a single core RISC-V CPU. This tiny board also hosts a 0.42" OLED display, +connected by I²C through GPIO 5 (SDA) and GPIO 6 (SCL). The Display has a +resolution of 72x40 pixels, and runs out of the box using the u8g2 library using +the `U8G2_SH1106_72X40_WISE_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE)` +constructor. The on-board LED is connected to GPIO 8 and low active. Look [here +for a demo sketch](./esp32_c3_oled_0.42/esp32_c3_oled.ino). + ## Misc ### WS2812 protection circuit diff --git a/cjmcu_8x8_sample/platformio.ini b/cjmcu_8x8_sample/platformio.ini index 270b673..0b58bc2 100644 --- a/cjmcu_8x8_sample/platformio.ini +++ b/cjmcu_8x8_sample/platformio.ini @@ -9,12 +9,12 @@ ; http://docs.platformio.org/page/projectconf.html [platformio] -env_default = nanoatmega328 +default_envs = nanoatmega328 src_dir = . [env:nanoatmega328] platform = atmelavr board = nanoatmega328 framework = arduino -lib_deps=FastLED +lib_deps=fastled/FastLED@3.9.3 diff --git a/esp32_c3_oled_0.42/Makefile b/esp32_c3_oled_0.42/Makefile new file mode 120000 index 0000000..44526d2 --- /dev/null +++ b/esp32_c3_oled_0.42/Makefile @@ -0,0 +1 @@ +../.common/Makefile \ No newline at end of file diff --git a/esp32_c3_oled_0.42/esp32_c3_oled.ino b/esp32_c3_oled_0.42/esp32_c3_oled.ino new file mode 100644 index 0000000..6d5ca3d --- /dev/null +++ b/esp32_c3_oled_0.42/esp32_c3_oled.ino @@ -0,0 +1,54 @@ +/* + * demo for tiny ESP32-C3 board with 0.42" OLED display using u8glib2. + * The OLED is connected to I²C pins 5 (SDA) and 6 (SCL). + * The on-board LED is connected to pin 8 and low-active. + */ + +#include "U8g2lib.h" +#include "jled.h" +#include +#include + +#define SDA_PIN 5 +#define SCL_PIN 6 + +U8G2_SH1106_72X40_WISE_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE); +auto led = JLed(8).Breathe(4000).MinBrightness(20).LowActive().Forever(); + +void setup(void) { + // initialize I²C + Wire.begin(SDA_PIN, SCL_PIN); + u8g2.begin(); + + // Initialize temperature sensor + temp_sensor_config_t temp_sensor = { + .dac_offset = TSENS_DAC_DEFAULT, + .clk_div = 6, + }; + temp_sensor_set_config(temp_sensor); + temp_sensor_start(); +} + +void loop(void) { + static long last_update = 0; + + if (millis() - last_update > 1000) { + u8g2.firstPage(); + do { + float temp; + temp_sensor_read_celsius(&temp); + + u8g2.setFont(u8g2_font_torussansbold8_8r); + u8g2.drawFrame(0, 0, 72, 40); + u8g2.drawStr(2, 10, "Hello"); + u8g2.drawStr(2, 18, "ESP32-C3"); + u8g2.drawStr(2, 26, (String("T=") + String(temp, 1)).c_str()); + u8g2.drawStr(2, 34, (String(last_update / 1000)).c_str()); + + } while (u8g2.nextPage()); + last_update = millis(); + } + + led.Update(); + delay(1); +} diff --git a/esp32_c3_oled_0.42/platformio.ini b/esp32_c3_oled_0.42/platformio.ini new file mode 100644 index 0000000..dfeb084 --- /dev/null +++ b/esp32_c3_oled_0.42/platformio.ini @@ -0,0 +1,10 @@ +[platformio] +default_envs = esp32c3 +src_dir = . + +[env:esp32c3] +platform = espressif32 +board = esp32-c3-devkitm-1 +framework = arduino +lib_deps=olikraus/U8g2@2.36.2 + jandelgado/JLed@4.15.0 diff --git a/esp32_st7789v/Makefile b/esp32_st7789v/Makefile new file mode 120000 index 0000000..44526d2 --- /dev/null +++ b/esp32_st7789v/Makefile @@ -0,0 +1 @@ +../.common/Makefile \ No newline at end of file diff --git a/esp32_st7789v/platformio.ini b/esp32_st7789v/platformio.ini new file mode 100644 index 0000000..685523a --- /dev/null +++ b/esp32_st7789v/platformio.ini @@ -0,0 +1,10 @@ +[platformio] +default_envs = esp32 +src_dir = . + +[env:esp32] +platform = espressif32 +board = esp32dev +framework = arduino +monitor_speed = 9600 +lib_deps=adafruit/Adafruit ST7735 and ST7789 Library@1.10.4 diff --git a/esp32_st7789v/test.ino b/esp32_st7789v/test.ino new file mode 100644 index 0000000..1b04fba --- /dev/null +++ b/esp32_st7789v/test.ino @@ -0,0 +1,319 @@ +/************************************************************************** + Source: https://github.com/adafruit/Adafruit-ST7735-Library/blob/c7882bfd42adf196f34c7080c7206d2f0d6939da/examples/graphicstest/graphicstest.ino + Minor changes (i.e. enable backlight and removal of unused code) for + ESP32 ST7789V 1.14" demo by Jan Delgado 12/2024. + + >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + This is a library for several Adafruit displays based on ST77* drivers. + + Works with the Adafruit 1.8" TFT Breakout w/SD card + ----> http://www.adafruit.com/products/358 + The 1.8" TFT shield + ----> https://www.adafruit.com/product/802 + The 1.44" TFT breakout + ----> https://www.adafruit.com/product/2088 + The 1.14" TFT breakout + ----> https://www.adafruit.com/product/4383 + The 1.3" TFT breakout + ----> https://www.adafruit.com/product/4313 + The 1.54" TFT breakout + ----> https://www.adafruit.com/product/3787 + The 1.69" TFT breakout + ----> https://www.adafruit.com/product/5206 + The 2.0" TFT breakout + ----> https://www.adafruit.com/product/4311 + as well as Adafruit raw 1.8" TFT display + ----> http://www.adafruit.com/products/618 + + Check out the links above for our tutorials and wiring diagrams. + These displays use SPI to communicate, 4 or 5 pins are required to + interface (RST is optional). + + Adafruit invests time and resources providing this open source code, + please support Adafruit and open-source hardware by purchasing + products from Adafruit! + + Written by Limor Fried/Ladyada for Adafruit Industries. + MIT license, all text above must be included in any redistribution + + **************************************************************************/ + +#include // Core graphics library +#include // Hardware-specific library for ST7789 +#include + +// using software SPI +#define TFT_CS 5 +#define TFT_RST 23 +#define TFT_DC 16 +#define TFT_MOSI 19 // Data out +#define TFT_SCLK 18 // Clock out + +// JD: backlight +#define BL 4 + +Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST); + +float p = 3.1415926; + +void setup(void) { + Serial.begin(9600); + Serial.print(F("Hello! ST77xx TFT Test")); + + // JD: turn backlight on + pinMode(BL, OUTPUT); + digitalWrite(BL, 1); + + tft.init(135, 240); // Init ST7789 240x135 + + Serial.println(F("Initialized")); + + uint16_t time = millis(); + tft.fillScreen(ST77XX_BLACK); + time = millis() - time; + + Serial.println(time, DEC); + delay(500); + + // large block of text + tft.fillScreen(ST77XX_BLACK); + testdrawtext("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur adipiscing ante sed nibh tincidunt feugiat. Maecenas enim massa, fringilla sed malesuada et, malesuada sit amet turpis. Sed porttitor neque ut ante pretium vitae malesuada nunc bibendum. Nullam aliquet ultrices massa eu hendrerit. Ut sed nisi lorem. In vestibulum purus a tortor imperdiet posuere. ", ST77XX_WHITE); + delay(1000); + + // tft print function! + tftPrintTest(); + delay(4000); + + // a single pixel + tft.drawPixel(tft.width()/2, tft.height()/2, ST77XX_GREEN); + delay(500); + + // line draw test + testlines(ST77XX_YELLOW); + delay(500); + + // optimized lines + testfastlines(ST77XX_RED, ST77XX_BLUE); + delay(500); + + testdrawrects(ST77XX_GREEN); + delay(500); + + testfillrects(ST77XX_YELLOW, ST77XX_MAGENTA); + delay(500); + + tft.fillScreen(ST77XX_BLACK); + testfillcircles(10, ST77XX_BLUE); + testdrawcircles(10, ST77XX_WHITE); + delay(500); + + testroundrects(); + delay(500); + + testtriangles(); + delay(500); + + mediabuttons(); + delay(500); + + Serial.println("done"); + delay(1000); +} + +void loop() { + tft.invertDisplay(true); + delay(500); + tft.invertDisplay(false); + delay(500); +} + +void testlines(uint16_t color) { + tft.fillScreen(ST77XX_BLACK); + for (int16_t x=0; x < tft.width(); x+=6) { + tft.drawLine(0, 0, x, tft.height()-1, color); + delay(0); + } + for (int16_t y=0; y < tft.height(); y+=6) { + tft.drawLine(0, 0, tft.width()-1, y, color); + delay(0); + } + + tft.fillScreen(ST77XX_BLACK); + for (int16_t x=0; x < tft.width(); x+=6) { + tft.drawLine(tft.width()-1, 0, x, tft.height()-1, color); + delay(0); + } + for (int16_t y=0; y < tft.height(); y+=6) { + tft.drawLine(tft.width()-1, 0, 0, y, color); + delay(0); + } + + tft.fillScreen(ST77XX_BLACK); + for (int16_t x=0; x < tft.width(); x+=6) { + tft.drawLine(0, tft.height()-1, x, 0, color); + delay(0); + } + for (int16_t y=0; y < tft.height(); y+=6) { + tft.drawLine(0, tft.height()-1, tft.width()-1, y, color); + delay(0); + } + + tft.fillScreen(ST77XX_BLACK); + for (int16_t x=0; x < tft.width(); x+=6) { + tft.drawLine(tft.width()-1, tft.height()-1, x, 0, color); + delay(0); + } + for (int16_t y=0; y < tft.height(); y+=6) { + tft.drawLine(tft.width()-1, tft.height()-1, 0, y, color); + delay(0); + } +} + +void testdrawtext(char *text, uint16_t color) { + tft.setCursor(0, 0); + tft.setTextColor(color); + tft.setTextWrap(true); + tft.print(text); +} + +void testfastlines(uint16_t color1, uint16_t color2) { + tft.fillScreen(ST77XX_BLACK); + for (int16_t y=0; y < tft.height(); y+=5) { + tft.drawFastHLine(0, y, tft.width(), color1); + } + for (int16_t x=0; x < tft.width(); x+=5) { + tft.drawFastVLine(x, 0, tft.height(), color2); + } +} + +void testdrawrects(uint16_t color) { + tft.fillScreen(ST77XX_BLACK); + for (int16_t x=0; x < tft.width(); x+=6) { + tft.drawRect(tft.width()/2 -x/2, tft.height()/2 -x/2 , x, x, color); + } +} + +void testfillrects(uint16_t color1, uint16_t color2) { + tft.fillScreen(ST77XX_BLACK); + for (int16_t x=tft.width()-1; x > 6; x-=6) { + tft.fillRect(tft.width()/2 -x/2, tft.height()/2 -x/2 , x, x, color1); + tft.drawRect(tft.width()/2 -x/2, tft.height()/2 -x/2 , x, x, color2); + } +} + +void testfillcircles(uint8_t radius, uint16_t color) { + for (int16_t x=radius; x < tft.width(); x+=radius*2) { + for (int16_t y=radius; y < tft.height(); y+=radius*2) { + tft.fillCircle(x, y, radius, color); + } + } +} + +void testdrawcircles(uint8_t radius, uint16_t color) { + for (int16_t x=0; x < tft.width()+radius; x+=radius*2) { + for (int16_t y=0; y < tft.height()+radius; y+=radius*2) { + tft.drawCircle(x, y, radius, color); + } + } +} + +void testtriangles() { + tft.fillScreen(ST77XX_BLACK); + uint16_t color = 0xF800; + int t; + int w = tft.width()/2; + int x = tft.height()-1; + int y = 0; + int z = tft.width(); + for(t = 0 ; t <= 15; t++) { + tft.drawTriangle(w, y, y, x, z, x, color); + x-=4; + y+=4; + z-=4; + color+=100; + } +} + +void testroundrects() { + tft.fillScreen(ST77XX_BLACK); + uint16_t color = 100; + int i; + int t; + for(t = 0 ; t <= 4; t+=1) { + int x = 0; + int y = 0; + int w = tft.width()-2; + int h = tft.height()-2; + for(i = 0 ; i <= 16; i+=1) { + tft.drawRoundRect(x, y, w, h, 5, color); + x+=2; + y+=3; + w-=4; + h-=6; + color+=1100; + } + color+=100; + } +} + +void tftPrintTest() { + tft.setTextWrap(false); + tft.fillScreen(ST77XX_BLACK); + tft.setCursor(0, 30); + tft.setTextColor(ST77XX_RED); + tft.setTextSize(1); + tft.println("Hello World!"); + tft.setTextColor(ST77XX_YELLOW); + tft.setTextSize(2); + tft.println("Hello World!"); + tft.setTextColor(ST77XX_GREEN); + tft.setTextSize(3); + tft.println("Hello World!"); + tft.setTextColor(ST77XX_BLUE); + tft.setTextSize(4); + tft.print(1234.567); + delay(1500); + tft.setCursor(0, 0); + tft.fillScreen(ST77XX_BLACK); + tft.setTextColor(ST77XX_WHITE); + tft.setTextSize(0); + tft.println("Hello World!"); + tft.setTextSize(1); + tft.setTextColor(ST77XX_GREEN); + tft.print(p, 6); + tft.println(" Want pi?"); + tft.println(" "); + tft.print(8675309, HEX); // print 8,675,309 out in HEX! + tft.println(" Print HEX!"); + tft.println(" "); + tft.setTextColor(ST77XX_WHITE); + tft.println("Sketch has been"); + tft.println("running for: "); + tft.setTextColor(ST77XX_MAGENTA); + tft.print(millis() / 1000); + tft.setTextColor(ST77XX_WHITE); + tft.print(" seconds."); +} + +void mediabuttons() { + // play + tft.fillScreen(ST77XX_BLACK); + tft.fillRoundRect(25, 10, 78, 60, 8, ST77XX_WHITE); + tft.fillTriangle(42, 20, 42, 60, 90, 40, ST77XX_RED); + delay(500); + // pause + tft.fillRoundRect(25, 90, 78, 60, 8, ST77XX_WHITE); + tft.fillRoundRect(39, 98, 20, 45, 5, ST77XX_GREEN); + tft.fillRoundRect(69, 98, 20, 45, 5, ST77XX_GREEN); + delay(500); + // play color + tft.fillTriangle(42, 20, 42, 60, 90, 40, ST77XX_BLUE); + delay(50); + // pause color + tft.fillRoundRect(39, 98, 20, 45, 5, ST77XX_RED); + tft.fillRoundRect(69, 98, 20, 45, 5, ST77XX_RED); + // play color + tft.fillTriangle(42, 20, 42, 60, 90, 40, ST77XX_GREEN); +} + + diff --git a/esp32_ttgo/platformio.ini b/esp32_ttgo/platformio.ini index a6b0f22..eb799b3 100644 --- a/esp32_ttgo/platformio.ini +++ b/esp32_ttgo/platformio.ini @@ -1,10 +1,10 @@ [platformio] -env_default = esp32 +default_envs = esp32 src_dir = . [env:esp32] platform = espressif32 board = esp32dev framework = arduino -lib_deps=U8g2 +lib_deps=olikraus/U8g2@2.36.2 diff --git a/heltec_wifi_lora32/platformio.ini b/heltec_wifi_lora32/platformio.ini index a6b0f22..eb799b3 100644 --- a/heltec_wifi_lora32/platformio.ini +++ b/heltec_wifi_lora32/platformio.ini @@ -1,10 +1,10 @@ [platformio] -env_default = esp32 +default_envs = esp32 src_dir = . [env:esp32] platform = espressif32 board = esp32dev framework = arduino -lib_deps=U8g2 +lib_deps=olikraus/U8g2@2.36.2 diff --git a/images/TM1637.png b/images/TM1637.png new file mode 100644 index 0000000..6b30612 Binary files /dev/null and b/images/TM1637.png differ diff --git a/images/WS2812_protection.jpg b/images/WS2812_protection.jpg index 82ee412..68c7041 100644 Binary files a/images/WS2812_protection.jpg and b/images/WS2812_protection.jpg differ diff --git a/images/WS2812_protection.jpg_original b/images/WS2812_protection.jpg_original deleted file mode 100644 index 5e35ede..0000000 Binary files a/images/WS2812_protection.jpg_original and /dev/null differ diff --git a/images/bmp280.png b/images/bmp280.png new file mode 100644 index 0000000..5d13d1e Binary files /dev/null and b/images/bmp280.png differ diff --git a/images/cjmcu-8x8/cjmcu.jpg b/images/cjmcu-8x8/cjmcu.jpg index dd2d9dd..b57ca0a 100644 Binary files a/images/cjmcu-8x8/cjmcu.jpg and b/images/cjmcu-8x8/cjmcu.jpg differ diff --git a/images/cjmcu-8x8/cjmcu.jpg_original b/images/cjmcu-8x8/cjmcu.jpg_original deleted file mode 100644 index dd2d9dd..0000000 Binary files a/images/cjmcu-8x8/cjmcu.jpg_original and /dev/null differ diff --git a/images/cjmcu-8x8/cjmcu.jpg_original_original b/images/cjmcu-8x8/cjmcu.jpg_original_original deleted file mode 100644 index 9d5a17e..0000000 Binary files a/images/cjmcu-8x8/cjmcu.jpg_original_original and /dev/null differ diff --git a/images/cjmcu-8x8/cjmcu_back.jpg b/images/cjmcu-8x8/cjmcu_back.jpg index ea5dad5..5debf70 100644 Binary files a/images/cjmcu-8x8/cjmcu_back.jpg and b/images/cjmcu-8x8/cjmcu_back.jpg differ diff --git a/images/cjmcu-8x8/cjmcu_back.jpg_original b/images/cjmcu-8x8/cjmcu_back.jpg_original deleted file mode 100644 index ea5dad5..0000000 Binary files a/images/cjmcu-8x8/cjmcu_back.jpg_original and /dev/null differ diff --git a/images/cjmcu-8x8/cjmcu_back.jpg_original_original b/images/cjmcu-8x8/cjmcu_back.jpg_original_original deleted file mode 100644 index 88cabd1..0000000 Binary files a/images/cjmcu-8x8/cjmcu_back.jpg_original_original and /dev/null differ diff --git a/images/cjmcu-8x8/cjmcu_front.jpg b/images/cjmcu-8x8/cjmcu_front.jpg index 8f2ce49..af1e540 100644 Binary files a/images/cjmcu-8x8/cjmcu_front.jpg and b/images/cjmcu-8x8/cjmcu_front.jpg differ diff --git a/images/cjmcu-8x8/cjmcu_front.jpg_original b/images/cjmcu-8x8/cjmcu_front.jpg_original deleted file mode 100644 index 8f2ce49..0000000 Binary files a/images/cjmcu-8x8/cjmcu_front.jpg_original and /dev/null differ diff --git a/images/cjmcu-8x8/cjmcu_front.jpg_original_original b/images/cjmcu-8x8/cjmcu_front.jpg_original_original deleted file mode 100644 index 1c85c2d..0000000 Binary files a/images/cjmcu-8x8/cjmcu_front.jpg_original_original and /dev/null differ diff --git a/images/cjmcu-8x8/ws2812_detail.jpg b/images/cjmcu-8x8/ws2812_detail.jpg index d8f11ea..113821c 100644 Binary files a/images/cjmcu-8x8/ws2812_detail.jpg and b/images/cjmcu-8x8/ws2812_detail.jpg differ diff --git a/images/cjmcu-8x8/ws2812_detail.jpg_original b/images/cjmcu-8x8/ws2812_detail.jpg_original deleted file mode 100644 index d8f11ea..0000000 Binary files a/images/cjmcu-8x8/ws2812_detail.jpg_original and /dev/null differ diff --git a/images/cjmcu-8x8/ws2812_detail.jpg_original_original b/images/cjmcu-8x8/ws2812_detail.jpg_original_original deleted file mode 100644 index 1782dcc..0000000 Binary files a/images/cjmcu-8x8/ws2812_detail.jpg_original_original and /dev/null differ diff --git a/images/colorduino.JPG b/images/colorduino.JPG index 6570235..c0fb2e9 100644 Binary files a/images/colorduino.JPG and b/images/colorduino.JPG differ diff --git a/images/colorduino.JPG_original b/images/colorduino.JPG_original deleted file mode 100644 index 10bfc89..0000000 Binary files a/images/colorduino.JPG_original and /dev/null differ diff --git a/images/esp32-ttgo-back.png_original b/images/esp32-ttgo-back.png_original deleted file mode 100644 index 189727f..0000000 Binary files a/images/esp32-ttgo-back.png_original and /dev/null differ diff --git a/images/esp32-ttgo.png_original b/images/esp32-ttgo.png_original deleted file mode 100644 index 42956ea..0000000 Binary files a/images/esp32-ttgo.png_original and /dev/null differ diff --git a/images/esp32_c3_oled.jpg b/images/esp32_c3_oled.jpg new file mode 100644 index 0000000..f9abfd6 Binary files /dev/null and b/images/esp32_c3_oled.jpg differ diff --git a/images/esp32_st7789v_1.jpg b/images/esp32_st7789v_1.jpg new file mode 100644 index 0000000..4337ab6 Binary files /dev/null and b/images/esp32_st7789v_1.jpg differ diff --git a/images/esp32_st7789v_2.jpg b/images/esp32_st7789v_2.jpg new file mode 100644 index 0000000..f9ec07e Binary files /dev/null and b/images/esp32_st7789v_2.jpg differ diff --git a/images/esp32_st7789v_3.jpg b/images/esp32_st7789v_3.jpg new file mode 100644 index 0000000..0b0f998 Binary files /dev/null and b/images/esp32_st7789v_3.jpg differ diff --git a/images/ftdi232.JPG b/images/ftdi232.JPG index 0b68162..df490a2 100644 Binary files a/images/ftdi232.JPG and b/images/ftdi232.JPG differ diff --git a/images/ftdi232.JPG_original b/images/ftdi232.JPG_original deleted file mode 100644 index 62d09f2..0000000 Binary files a/images/ftdi232.JPG_original and /dev/null differ diff --git a/images/heltec.jpg b/images/heltec.jpg index e652260..136a05c 100644 Binary files a/images/heltec.jpg and b/images/heltec.jpg differ diff --git a/images/heltec.jpg_original b/images/heltec.jpg_original deleted file mode 100644 index 39b61b9..0000000 Binary files a/images/heltec.jpg_original and /dev/null differ diff --git a/images/led_matrix_mono.jpg b/images/led_matrix_mono.jpg index 3f457fd..dc5c567 100644 Binary files a/images/led_matrix_mono.jpg and b/images/led_matrix_mono.jpg differ diff --git a/images/led_matrix_mono.jpg_original b/images/led_matrix_mono.jpg_original deleted file mode 100644 index 264d5a3..0000000 Binary files a/images/led_matrix_mono.jpg_original and /dev/null differ diff --git a/images/led_matrix_rgb.JPG b/images/led_matrix_rgb.JPG index 3ab84ff..8d9360c 100644 Binary files a/images/led_matrix_rgb.JPG and b/images/led_matrix_rgb.JPG differ diff --git a/images/led_matrix_rgb.JPG_original b/images/led_matrix_rgb.JPG_original deleted file mode 100644 index 8567805..0000000 Binary files a/images/led_matrix_rgb.JPG_original and /dev/null differ diff --git a/images/led_matrix_rgb_front.JPG b/images/led_matrix_rgb_front.JPG index 4dd7f99..4f5409d 100644 Binary files a/images/led_matrix_rgb_front.JPG and b/images/led_matrix_rgb_front.JPG differ diff --git a/images/led_matrix_rgb_front.JPG_original b/images/led_matrix_rgb_front.JPG_original deleted file mode 100644 index 02a1945..0000000 Binary files a/images/led_matrix_rgb_front.JPG_original and /dev/null differ diff --git a/images/mp3_modules.jpg b/images/mp3_modules.jpg new file mode 100644 index 0000000..d5a8553 Binary files /dev/null and b/images/mp3_modules.jpg differ diff --git a/images/pico.jpg b/images/pico.jpg index 240fd17..4b2d982 100644 Binary files a/images/pico.jpg and b/images/pico.jpg differ diff --git a/images/rpi_tft_35.jpg b/images/rpi_tft_35.jpg index b9161f3..d0c80e2 100644 Binary files a/images/rpi_tft_35.jpg and b/images/rpi_tft_35.jpg differ diff --git a/images/rpi_tft_35.jpg_original b/images/rpi_tft_35.jpg_original deleted file mode 100644 index 024b2d4..0000000 Binary files a/images/rpi_tft_35.jpg_original and /dev/null differ diff --git a/images/rpi_tft_35_demo.jpg b/images/rpi_tft_35_demo.jpg index bd02a9d..4d93499 100644 Binary files a/images/rpi_tft_35_demo.jpg and b/images/rpi_tft_35_demo.jpg differ diff --git a/images/rpi_tft_35_demo.jpg_original b/images/rpi_tft_35_demo.jpg_original deleted file mode 100644 index 2045030..0000000 Binary files a/images/rpi_tft_35_demo.jpg_original and /dev/null differ diff --git a/images/rpi_tft_hdmi_1.jpg b/images/rpi_tft_hdmi_1.jpg index 87e686f..2f9ec36 100644 Binary files a/images/rpi_tft_hdmi_1.jpg and b/images/rpi_tft_hdmi_1.jpg differ diff --git a/images/rpi_tft_hdmi_1.jpg_original b/images/rpi_tft_hdmi_1.jpg_original deleted file mode 100644 index cd74dfc..0000000 Binary files a/images/rpi_tft_hdmi_1.jpg_original and /dev/null differ diff --git a/images/rpi_tft_hdmi_2.jpg b/images/rpi_tft_hdmi_2.jpg index 05d63ae..8adea99 100644 Binary files a/images/rpi_tft_hdmi_2.jpg and b/images/rpi_tft_hdmi_2.jpg differ diff --git a/images/rpi_tft_hdmi_2.jpg_original b/images/rpi_tft_hdmi_2.jpg_original deleted file mode 100644 index 77b1476..0000000 Binary files a/images/rpi_tft_hdmi_2.jpg_original and /dev/null differ diff --git a/images/sipeed_nano_1.jpg b/images/sipeed_nano_1.jpg index f684c2e..2b825a1 100644 Binary files a/images/sipeed_nano_1.jpg and b/images/sipeed_nano_1.jpg differ diff --git a/images/sipeed_nano_1.jpg_original b/images/sipeed_nano_1.jpg_original deleted file mode 100644 index d8b222a..0000000 Binary files a/images/sipeed_nano_1.jpg_original and /dev/null differ diff --git a/images/sipeed_nano_2.jpg b/images/sipeed_nano_2.jpg index 00d1e86..ea5ad85 100644 Binary files a/images/sipeed_nano_2.jpg and b/images/sipeed_nano_2.jpg differ diff --git a/images/sipeed_nano_2.jpg_original b/images/sipeed_nano_2.jpg_original deleted file mode 100644 index e77fb43..0000000 Binary files a/images/sipeed_nano_2.jpg_original and /dev/null differ diff --git a/images/ssd13006_back.jpg b/images/ssd13006_back.jpg index 863aba2..9fa2602 100644 Binary files a/images/ssd13006_back.jpg and b/images/ssd13006_back.jpg differ diff --git a/images/ssd13006_back.jpg_original b/images/ssd13006_back.jpg_original deleted file mode 100644 index c9c833b..0000000 Binary files a/images/ssd13006_back.jpg_original and /dev/null differ diff --git a/images/ssd1306.jpg b/images/ssd1306.jpg index e7d295d..929ce6b 100644 Binary files a/images/ssd1306.jpg and b/images/ssd1306.jpg differ diff --git a/images/ssd1306.jpg_original b/images/ssd1306.jpg_original deleted file mode 100644 index 29f4a83..0000000 Binary files a/images/ssd1306.jpg_original and /dev/null differ diff --git a/images/wemos-d-duino.png_original b/images/wemos-d-duino.png_original deleted file mode 100644 index 8952cf4..0000000 Binary files a/images/wemos-d-duino.png_original and /dev/null differ diff --git a/images/wtv020a.png_original b/images/wtv020a.png_original deleted file mode 100644 index eaf7591..0000000 Binary files a/images/wtv020a.png_original and /dev/null differ diff --git a/images/wtv020b.png_original b/images/wtv020b.png_original deleted file mode 100644 index b819bc1..0000000 Binary files a/images/wtv020b.png_original and /dev/null differ diff --git a/pca9685/platformio.ini b/pca9685/platformio.ini index 661e709..820ed8e 100644 --- a/pca9685/platformio.ini +++ b/pca9685/platformio.ini @@ -12,12 +12,11 @@ default_envs = esp32 src_dir = . - [env:esp32] platform = espressif32 board = esp32dev framework = arduino -lib_ldf_mode = chain+ -lib_deps=30 - Wire +lib_ldf_mode = deep+ +lib_deps = adafruit/Adafruit PWM Servo Driver Library@3.0.2 + adafruit/Adafruit BusIO@1.16.2 diff --git a/sipeed_longan_nano/platformio.ini b/sipeed_longan_nano/platformio.ini-off similarity index 72% rename from sipeed_longan_nano/platformio.ini rename to sipeed_longan_nano/platformio.ini-off index bfc5bc3..4cc3393 100644 --- a/sipeed_longan_nano/platformio.ini +++ b/sipeed_longan_nano/platformio.ini-off @@ -2,6 +2,8 @@ env_default = sipeed_longan_nano src_dir = . +; no longer works an platformio does not support arduino framework +; for the sipeed-longan-nano using the nuclei sdk. [env:sipeed_longan_nano] platform = gd32v board = sipeed-longan-nano diff --git a/ssd1306_sample_adafruit/platformio.ini b/ssd1306_sample_adafruit/platformio.ini index 1c5b4f0..43975d9 100644 --- a/ssd1306_sample_adafruit/platformio.ini +++ b/ssd1306_sample_adafruit/platformio.ini @@ -1,11 +1,11 @@ [platformio] -env_default = nanoatmega328 +default_envs = nanoatmega328 src_dir = . [env:nanoatmega328] platform = atmelavr board = nanoatmega328 framework = arduino -lib_deps=13 - 135 +lib_deps = adafruit/Adafruit GFX Library@1.11.11 + adafruit/Adafruit SSD1306@2.5.13 diff --git a/ssd1306_sample_u8g/platformio.ini b/ssd1306_sample_u8g/platformio.ini index 95dfd47..694a751 100644 --- a/ssd1306_sample_u8g/platformio.ini +++ b/ssd1306_sample_u8g/platformio.ini @@ -1,10 +1,10 @@ [platformio] -env_default = nanoatmega328 +default_envs = nanoatmega328 src_dir = . [env:nanoatmega328] platform = atmelavr board = nanoatmega328 framework = arduino -lib_deps=U8glib +lib_deps=olikraus/U8glib@1.19.1 diff --git a/wemos_d_duino/platformio.ini b/wemos_d_duino/platformio.ini index baef16e..c5d25ef 100644 --- a/wemos_d_duino/platformio.ini +++ b/wemos_d_duino/platformio.ini @@ -1,9 +1,9 @@ [platformio] -env_default = esp8266 +default_envs = esp8266 src_dir = . [env:esp8266] platform = espressif8266 board = nodemcuv2 framework = arduino -lib_deps=U8g2 +lib_deps=olikraus/U8g2@2.36.2