Update examples for RP2040

This commit is contained in:
Bodmer
2022-01-06 23:10:49 +00:00
parent 5c99b0a50b
commit 91cb0464f1
3 changed files with 15 additions and 12 deletions

View File

@ -2,13 +2,13 @@
// Example for library:
// https://github.com/Bodmer/TJpg_Decoder
// This example is for an ESP8266 or ESP32, it renders all Jpeg files
// found in LittleFS. The test images are in the sketch "data" folder
// (press Ctrl+K to see it). You can add more images of your own to
// the Data folder.
// This example if for processors with LittleFS capability (e.g. RP2040,
// ESP32, ESP8266). It renders a Jpeg file that is stored in a LittleFS
// file.
// You must upload the images to LittleFS using the ESP8266 or ESP32
// Arduino IDE Sketch Data Upload menu option.
// The test image is in the sketch "data" folder (press Ctrl+K to see it).
// You must upload the image to LittleFS using the Arduino IDE Tools Data
// Upload menu option (you may need to install extra tools for that).
// Include the jpeg decoder library
#include <TJpg_Decoder.h>
@ -61,7 +61,7 @@ void setup()
//====================================================================================
void loop()
{
File root = LittleFS.open("/");
File root = LittleFS.open("/", "r");
while (File file = root.openNextFile()) {
String strname = file.name();
strname = "/" + strname;

View File

@ -1,10 +1,13 @@
// Example for library:
// https://github.com/Bodmer/TJpg_Decoder
// This example if for an ESP8266 or ESP32, it renders a Jpeg file
// that is stored in a LittleFS file. The test image is in the sketch
// "data" folder (press Ctrl+K to see it). You must upload the image
// to LittleFS using the ESP8266 or ESP32 Arduino IDE upload menu option.
// This example if for processors with LittleFS capability (e.g. RP2040,
// ESP32, ESP8266). It renders a Jpeg file that is stored in a LittleFS
// file.
// The test image is in the sketch "data" folder (press Ctrl+K to see it).
// You must upload the image to LittleFS using the Arduino IDE Tools Data
// Upload menu option (you may need to install extra tools for that).
// Include the jpeg decoder library
#include <TJpg_Decoder.h>

View File

@ -1,4 +1,4 @@
#if defined (ESP32) || defined (ESP8266)
#if defined (ESP32) || defined (ESP8266) || (ARDUINO_ARCH_RP2040) || defined (ARDUINO_ARCH_MBED)
#define TJPGD_LOAD_FFS
#endif