no, still don't work!!
yes 5 inches.......
Posts made by cepics
-
RE: ATOM Lite Display not display in smallHd 503
-
RE: <SOLVED> M5Stack basic vs gray and SD card
in SD.h I changed:
bool begin(uint8_t ssPin=SS, SPIClass &spi=SPI, uint32_t frequency=4000000, const char * mountpoint="/sd", uint8_t max_files=5, bool format_if_empty=false);
to
bool begin(uint8_t ssPin=SS, SPIClass &spi=SPI, uint32_t frequency=1000000, const char * mountpoint="/sd", uint8_t max_files=5, bool format_if_empty=false);
and in sd_diskio.cpp:
if (card->frequency > 25000000) { card->frequency = 25000000; }
to
if (card->frequency > 10000000) { card->frequency = 10000000; }
.... and now seems to work!!
-
RE: <SOLVED> M5Stack basic vs gray and SD card
I trierd to modify the sd.begin() function in the used SD.h with the new frequency .... but no joy!!
still searching......
any ideas??
-
lovyan launcher doesn't compile on M5Stack basic
Hi all,
arduino IDE 2.0.1 doesn't compile M5Stack_LovyanLauncher sketch with this error:
(this is only the "red" part of the output)In file included from C:\Users\Documents\Arduino\libraries\M5Stack_LovyanLauncher\LovyanLauncher\LovyanLauncher.ino:43: C:\Users\Documents\Arduino\libraries\M5Stack_LovyanLauncher\LovyanLauncher\src\WiFiWPS.h: In member function 'void WiFiWPS::wpsInitConfig()': C:\Users\Documents\Arduino\libraries\M5Stack_LovyanLauncher\LovyanLauncher\src\WiFiWPS.h:23:16: error: 'struct esp_wps_config_t' has no member named 'crypto_funcs' wps_config.crypto_funcs = &g_wifi_default_wps_crypto_funcs; ^~~~~~~~~~~~ C:\Users\Documents\Arduino\libraries\M5Stack_LovyanLauncher\LovyanLauncher\src\WiFiWPS.h:23:32: error: 'g_wifi_default_wps_crypto_funcs' was not declared in this scope wps_config.crypto_funcs = &g_wifi_default_wps_crypto_funcs; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\Users\Documents\Arduino\libraries\M5Stack_LovyanLauncher\LovyanLauncher\src\WiFiWPS.h: In member function 'virtual bool WiFiWPS::setup()': C:\Users\Documents\Arduino\libraries\M5Stack_LovyanLauncher\LovyanLauncher\src\WiFiWPS.h:100:37: error: no matching function for call to 'onEvent(void (&)(arduino_event_id_t, system_event_info_t))' onevent = WiFi.onEvent(WiFiEvent); ^ In file included from C:\Users\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5\libraries\WiFi\src/WiFiSTA.h:28, from C:\Users\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5\libraries\WiFi\src/WiFi.h:32, from c:\Users\Documents\Arduino\libraries\M5Stack_TreeView\src/MenuItemWiFiClient.h:4, from C:\Users\Documents\Arduino\libraries\M5Stack_LovyanLauncher\LovyanLauncher\LovyanLauncher.ino:31: C:\Users\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5\libraries\WiFi\src/WiFiGeneric.h:159:21: note: candidate: 'wifi_event_id_t WiFiGenericClass::onEvent(WiFiEventCb, arduino_event_id_t)' <near match> wifi_event_id_t onEvent(WiFiEventCb cbEvent, arduino_event_id_t event = ARDUINO_EVENT_MAX); ^~~~~~~ C:\Users\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5\libraries\WiFi\src/WiFiGeneric.h:159:21: note: conversion of argument 1 would be ill-formed: In file included from C:\Users\Documents\Arduino\libraries\M5Stack_LovyanLauncher\LovyanLauncher\LovyanLauncher.ino:43: C:\Users\Documents\Arduino\libraries\M5Stack_LovyanLauncher\LovyanLauncher\src\WiFiWPS.h:100:37: error: invalid conversion from 'void (*)(arduino_event_id_t, system_event_info_t)' to 'WiFiEventCb' {aka 'void (*)(arduino_event_id_t)'} [-fpermissive] onevent = WiFi.onEvent(WiFiEvent); ^ In file included from C:\Users\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5\libraries\WiFi\src/WiFiSTA.h:28, from C:\Users\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5\libraries\WiFi\src/WiFi.h:32, from c:\Users\Documents\Arduino\libraries\M5Stack_TreeView\src/MenuItemWiFiClient.h:4, from C:\Users\Documents\Arduino\libraries\M5Stack_LovyanLauncher\LovyanLauncher\LovyanLauncher.ino:31: C:\Users\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5\libraries\WiFi\src/WiFiGeneric.h:161:21: note: candidate: 'wifi_event_id_t WiFiGenericClass::onEvent(WiFiEventSysCb, arduino_event_id_t)' <near match> wifi_event_id_t onEvent(WiFiEventSysCb cbEvent, arduino_event_id_t event = ARDUINO_EVENT_MAX); ^~~~~~~ C:\Users\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5\libraries\WiFi\src/WiFiGeneric.h:161:21: note: conversion of argument 1 would be ill-formed: In file included from C:\Users\Documents\Arduino\libraries\M5Stack_LovyanLauncher\LovyanLauncher\LovyanLauncher.ino:43: C:\Users\Documents\Arduino\libraries\M5Stack_LovyanLauncher\LovyanLauncher\src\WiFiWPS.h:100:37: error: invalid conversion from 'void (*)(arduino_event_id_t, system_event_info_t)' to 'WiFiEventSysCb' {aka 'void (*)(arduino_event_t*)'} [-fpermissive] onevent = WiFi.onEvent(WiFiEvent); ^ Multiple libraries were found for "SD.h" Used: C:\Users\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5\libraries\SD Not used: C:\Users\AppData\Local\Arduino15\libraries\SD exit status 1 Compilation error: 'struct esp_wps_config_t' has no member named 'crypto_funcs'
all the libraries are up to date....
I could upload the code with M5burner, but I need to modify the clock of the sd card in M5Stack.cpp from 40Mhz to 10Mhz to work with M5stack basic....
some tips?
tnks a lot
-
RE: SD mount fail on M5Stack basic
the first sketch works, with M5Stack basic, if I modify the M5Stack.cpp library from:
// TF Card if (SDEnable == true) { SD.begin(TFCARD_CS_PIN, SPI, 40000000); }
to
// TF Card if (SDEnable == true) { SD.begin(TFCARD_CS_PIN, SPI, 10000000); }
-
RE: <SOLVED> M5Stack basic vs gray and SD card
tnks a lot to answer!!!
but I can't find where the M5Stack.cpp file is invoked....
mumble mumble...
-
<SOLVED> M5Stack basic vs gray and SD card
hi all
I'm trying to use M5Stack-SD-Updater on M5stack basic (V2.61), but after flashing the M5Stack doesn't see the sd card....
same process on M5Stack gray (v 2.4) works...same behavior if I use M5Burner to burn lovyan launcher on the two controllers... with the same sd card, M5gray can access to sd and M5basic don't
I tried four different M5Stack basic unit ... same behavior!!
ideas?
tnks a lot!!! -
SD mount fail on M5Stack basic
Hi all, I have problems with lovyan launcher... now the app doesn,t open the sd of the stack basic..
when I burn lovyan launcher with M5burner in a M5stack basic, the sd fail... same proces on a M5Stack gray, works...
on a basic unit, with this sketch, sd fail!!
/* ******************************************************************************* * Copyright (c) 2022 by M5Stack * Equipped with M5Core sample source code * 配套 M5Core 示例源代码 * Visit for more information: https://docs.m5stack.com/en/core/gray * 获取更多资料请访问: https://docs.m5stack.com/zh_CN/core/gray * * Describe: TF Card. TF卡 * Date: 2022/3/25 ******************************************************************************* In this example, we will detect the existence of a file and perform read and write operations on it 在这个示例中,我们将会检测某文件是否存在,并进行读写文件操作 */ #include <M5Stack.h> void setup() { M5.begin(); if (!SD.begin()) { // Initialize the SD card. 初始化SD卡 M5.Lcd.println( "Card failed, or not present"); // Print a message if the SD card // initialization fails or if the // SD card does not exist // 如果SD卡初始化失败或者SD卡不存在,则打印消息 while (1) ; } M5.Lcd.println("TF card initialized."); if (SD.exists("/hello.txt")) { // Check if the "/hello.txt" file // exists.查看是否存在"/hello.txt"文件 M5.Lcd.println("hello.txt exists."); } else { M5.Lcd.println("hello.txt doesn't exist."); } M5.Lcd.println("Creating hello.txt"); File myFile = SD.open("/hello.txt", FILE_WRITE); // Create a new file "/hello.txt". // 创建一个新文件"/hello.txt" if (myFile) { // If the file is open, then write to it. // 如果文件打开,则进行写入操作 M5.Lcd.println("Writing to test.txt..."); myFile.println("SD test."); myFile.close(); // Close the file. 关闭文件 M5.Lcd.println("done."); } else { M5.Lcd.println("error opening test.txt"); } delay(500); myFile = SD.open("/hello.txt", FILE_READ); // Open the file "/hello.txt" in read mode. // 以读取模式打开文件"/hello.txt" if (myFile) { M5.Lcd.println("/hello.txt Content:"); // Read the data from the file and print it until the reading is // complete. 从文件里读取数据并打印到串口,直到读取完成. while (myFile.available()) { M5.Lcd.write(myFile.read()); } myFile.close(); } else { M5.Lcd.println("error opening /hello.txt"); // If the file is not open. // 如果文件没有打开 } } void loop() { }
.... on basic unit with this sketch, sd works
// Libraries for SD card #include "FS.h" #include <SD.h> //#include "mySD.h" #include <SPI.h> // Define CS pin for the SD card module #define SD_MISO 19 #define SD_MOSI 23 #define SD_SCLK 18 #define SD_CS 4 SPIClass sdSPI(VSPI); String dataMessage; void setup() { // Start serial communication for debugging purposes Serial.begin(115200); // Initialize SD card //SD.begin(SD_CS); sdSPI.begin(SD_SCLK, SD_MISO, SD_MOSI, SD_CS); if(!SD.begin(SD_CS, sdSPI)) { Serial.println("Card Mount Failed"); return; } Serial.println("1"); uint8_t cardType = SD.cardType(); if(cardType == CARD_NONE) { Serial.println("No SD card attached"); return; } Serial.println("Initializing SD card..."); if (!SD.begin(SD_CS)) { Serial.println("ERROR - SD card initialization failed!"); return; // init failed } Serial.println("2"); // If the data.txt file doesn't exist // Create a file on the SD card and write the data labels File file = SD.open("/data1.txt"); if(!file) { Serial.println("File doens't exist"); Serial.println("Creating file..."); writeFile(SD, "/data1.txt", "Reading ID, Date, Hour, Temperature \r\n"); } else { Serial.println("File already exists"); } file.close(); logSDCard(); } void loop() { // The ESP32 will be in deep sleep // it never reaches the loop() } // Write the sensor readings on the SD card void logSDCard() { //dataMessage = String(readingID) + "," + String(dayStamp) + "," + String(timeStamp) + "," + // String(temperature) + "\r\n"; dataMessage = "Hello World \n"; Serial.print("Save data: "); Serial.println(dataMessage); appendFile(SD, "/data1.txt", dataMessage.c_str()); } // Write to the SD card (DON'T MODIFY THIS FUNCTION) void writeFile(fs::FS &fs, const char * path, const char * message) { Serial.printf("Writing file: %s\n", path); File file = fs.open(path, FILE_WRITE); if(!file) { Serial.println("Failed to open file for writing"); return; } if(file.print(message)) { Serial.println("File written"); } else { Serial.println("Write failed"); } file.close(); } // Append data to the SD card (DON'T MODIFY THIS FUNCTION) void appendFile(fs::FS &fs, const char * path, const char * message) { Serial.printf("Appending to file: %s\n", path); File file = fs.open(path, FILE_APPEND); if(!file) { Serial.println("Failed to open file for appending"); return; } if(file.print(message)) { Serial.println("Message appended"); } else { Serial.println("Append failed"); } file.close(); }
maybe I have to change some pins assignement some where??
tnks a lot!!
-
RE: upload code to STAMP PWR485
thnks!!!
but how do I select one of the two rs485 port?? -
RE: ATOM Lite Display not display in smallHd 503
from SmallHD503 datasheet:
HDMI Input Types
YCC 4:2:2 @ 8 bits, 8/10/12 bit color in RGB & YCC 4:4:4: 1080p60, 1080p59.94, 1080p50, 1080p30, 1080p29.97 1080p25, 1080p24, 1080p23.98,1080i60, 1080i59.94, 1080i50, 1080i30, 1080i29.97, 1080i25, 720p120, 720p119.88, 720p100, 720p60, 720p59.94 , 720p50, 720p30, 720p29.97, 720p25, 720p24, 720p23.98, 480p120, 480p119.88, 480p60, 480p59.94, 576p100, 576p50, 480i240, 480i239.76, 480i120, 480i119.88, 480i60, 480i59.94, 480i30, 480i29.97, 480i24, 480i23.98, 576i200, 576i100, 576i50, 576i25
-
upload code to STAMP PWR485
Hi all,
how can I upload code in STAMP PWR485??I'm in Arduino env.
-
analogread and wifi.h on m5Stick (gray)
Hi all,
I'm trying to use the unit fader with an old M5Stick graybut analog read on pin 13 or 25 seems to be impossible during WIFI operation.....
can I assign pin 13 or 25 to ADC1??
best regards
-
RE: ATOM Lite Display not display in smallHd 503
@macsbug said in ATOM Lite Display not display in smallHd 503:
1920/2,1080/2,24
No way to display something on the 503.... I tried all configuration:
// M5AtomDisplay display(); // 1280 x 720
M5AtomDisplay display(1920,1080,24); // 1920 x 1080 , 24bit
// M5AtomDisplay display(1366,768); // 1366 x 768
// M5AtomDisplay display(1920/2,1080/2,24);
// ( 480, 1920);(1920, 480);(1280, 720);(1024, 768);
// ( 960, 540);( 800, 600);( 640, 480);( 640, 400);
// ( 640, 360);( 512, 212);( 256, 192);( 320, 240);
// ( 240, 320);( 200, 200);( 240, 135);( 135, 240);
// ( 160, 160);( 160, 80);( 80, 160);( 80, 80);when I connect hdmi cable to the 503, the monitor "feel" something (green led on and image settings in the "in settings page" of 503) but no image displayed.....
the same cable works in other setup....
-
M5UnitOLED with U8g2 Library
Hi all,
someone with a working arduino code for M5UnitOLED using U8g2 Library?Using this constructor, I can display things but it is a little triky to calcolate positions, rotates and mirror...
U8G2_SH1107_SEEED_128X128_F_SW_I2C u8g2(U8G2_MIRROR, 32, 26,U8X8_PIN_NONE);
I'm with ATOM LITE...
tnks a lot..
-
RE: (SOLVED) Change I2C pin in M5GFX Library (to use With ATOM LITE)
@m5stack said in Change I2C pin in M5GFX Library (to use With ATOM LITE):
if you wanna change the I2C pin. you could use this code.
#include <M5UnitOLED.h> //M5UnitOLED display; // default setting M5UnitOLED display ( 21, 22, 400000 ); // SDA, SCL, FREQ
tnks a lot !!!
-
How to use 7 seg font with M5UnitOLED.h
Hi all,
I saw a seven segment font in the M5GFX library but I dont understand How to call it in
canvas.setFont()
function....I need to display 4 digit in 7 seg style with a dot in the middle (es: 25.10) as big as possible...
tnks in advance...