This was caused by a missing double quotation mark in a file name in an "Execute code" block.....
Best posts made by wsanders
-
RE: UIFlow "Invalid Syntax"?
-
RE: M5STACK STATION PORT CONNECTORS
You want UNbuckled "Grove" connectors to fit all M5Stack devices. For example, the M5StickC-Plus will accept both unbuckled and bucked connectors, but the Core2 will only accept an unbuckled connector. If you have the buckled type, you can always cut the clip off so it will fit.
Generically, these connectors are called "HY2.0-4P" although nearly all vendors sell them as "Grove".
There's no standard for the Vcc and logic levels! So make sure your devices match. M5Stack devices supply 5V on the red conductor, but the logic levels are 3.3V.
-
RE: M5StickC-Plus Buzzer not working
Using //https://101010.fun/iot/m5stickc-plus-firststep.html
for inspiration, we can upload this program:#include <M5StickCPlus.h>
void setup() {
M5.begin();
M5.Lcd.setTextSize(3);
M5.Lcd.setRotation(3);
M5.Lcd.setTextColor(TFT_ORANGE);
}void loop() {
M5.update();
soundTest();
}void soundTest() {
for (int tone=100; tone < 4000; tone=tone+50) {
M5.Lcd.fillScreen(BLACK);
M5.Lcd.setCursor(80, 50);
M5.Lcd.printf("%d", tone);
M5.Beep.tone(tone);
M5.Beep.update();
delay(200);
}
}According to my ears there is a definite peak about 2500 Hz, with frequencies under 250 Hz and over 3000 not audible. Your ears may vary .....
-
RE: How to use "pushToSprite" in Core2
Isn't the method called pushSprite?
On a M5StickC-Plus, I use:
setup():
TFT_eSprite sgraph = TFT_eSprite(&M5.Lcd);
...
sgraph.createSprite(GRAPHW, GRAPHH);
...loop():
...
sgraph.pushSprite(TEXTW, 0);
.... -
UIFlow: How to try/except for "Connect to Wifi"?
I am trying to get the program to ignore failure to connect to WiFi. I tried to place a Wifi Connect block inside a try/except (with a bogus SSID/password):
Instead, the program hangs, before the LED comes on, because the python that gets generated places the wifiCfg.doConnect up at the top of the program (line 20):
and the try/except block is empty, much later in the program at line 87:
Is there a way to create an exception for WiFi failure to connect?
I also notice that UIFlow does not have a "pass" block. I just put a wait() in mine - ???
-
RE: UIFlow: How to try/except for "Connect to Wifi"?
@wsanders SOLUTION: Use "Original Network Function" blocks instead.
Latest posts made by wsanders
-
RE: Has anyone gotten MP3 streaming to work on Core2?
I got the sketches to work, They will be posted to the above repo shortly. The key changes from some of the existing code out there that does not work anymore:
After WiFi connects, the delay must be increased to at least 1 sec:
while ( !WiFi.isConnected() ) delay(100); delay(1000);
Preallocating the source buffer seems to be essential:
const int preallocateBufferSize = 128*1024; const int preallocateCodecSize = 85332; // AAC+SBR codec max mem needed void *preallocateBuffer = NULL; void *preallocateCodec = NULL; ... // Don't forget to malloc the buffers preallocateBuffer = malloc(preallocateBufferSize); preallocateCodec = malloc(preallocateCodecSize); ... srcbuf = new AudioFileSourceBuffer(file, preallocateBuffer, preallocateBufferSize); ... // Preallocating the MP3 generator doesn't seem to be essential //gen = new AudioGeneratorMP3(preallocateCodec, preallocateCodecSize);
You must call M5.begin with the 6th argument false to disable the M5.Speaker code. With this argument, the skeptch will produce audio, but at half speed and half pitch:
M5.begin(true, false, true, true, kMBusModeOutput, false);
My M5Core2 library version is 0.1.9. I have 2.0.9 of the M5 board. definitions.
-
Has anyone gotten MP3 streaming to work on Core2?
I'm about ready to give up after three days of trial and error. Has anyone gotten MP3 streaming to work on Core2?
Yesterday, I was able to stream a low-bandwidth station but today even that doesn't work. I posted some examples of what I have tried, in https://github.com/wsanders/M5Core2-Audio-Is-Broken. The sketch WSWebRadio-broken.ino was working yesterday for a low-bandwith (32k) stream, but produced broken distorted audio from a 192k stream. Today none of the programs in my repo produce any audio.
I haven't seen any posts about working MP3 streaming sketches less than a couple years old, which seems to hint that it just doesn't work. Maybe everyone has switched to MicroPython?
I am using Arduino IDE, M5Core2 library 0.1.9, ESP8266Audio 1.9.7.
-
RE: Which is more current, M5Unified of M5Core2?
@teastain I posted an issue in the library repo, perhaps the ambiguous comment will be clarified. M5Core2 was updated last Jan 29, latest update to M5Unified was 3 days ago.
-
Which is more current, M5Unified of M5Core2?
The main class M5Core2 in the file M5Core2.h Arduino IDE library version 0.1.9, contains the following attribute:
class M5Core2 { public: M5Core2(); [[deprecated( "It is recommended to use M5Unified Lib, which will be discontinued " "soon.")]] void
That comment makes no sense in English translation. Of course one would not want to recommend a library that will be discontinued.
Should we all be using M5Unified now?
Maybe if M5Core2 is deprecated it should be removed from the Arduino IDE library database?
-
RE: Problem accessing https://uiflow2.m5stack.com
Working for me at Tue Jun 4 06:18:11 PM UTC 2024
-
RE: problem with TFT_eSprite
You don't show what Y is, or what your screen orientation is set to. If I remember correctly, if any part of a sprite gets pushed offscreen, the sprite will be truncated. So make sure the bounds of the sprite are within the 320 x 240 pixels of the LCD when you push it. The paramaters to pushSprite are the "upper left corner" of where you want the sprite to be placed.
Look through the examples at https://github.com/m5stack/M5Stack/tree/master/examples/Advanced/Display/Sprite to failiarize yourself.
-
RE: Is UIFlow 2.0 a dead project?
So you are saying you need the UIFlow 2 firmware to use the UIFlow2 web workflow? Fair enough.
Anyway, I accomplished my sketch using the old UIFlow. I will try to get UIFlow 2 to work later, but my next task is to see if I can get the Adruino IDE to work again. (It's been a few months since I used it, and along the way something, probably a Fedora upgrade, broke it.)
-
RE: Is UIFlow 2.0 a dead project?
I don't have an Atom, I have a Core 2.
And I'm not sure what you mean by "binded", I have the 8 hex character API key, but I don't see anywhere to enter it.
Nothing wrong with my setup, I can upload sketches to the Core 2 using UIFlow 1 using Wifi just fine.
-
RE: Older Core2 - v2.0.1-CORE2 won't install but v1.13.2 will.
Computer is Fedora 39 linux. I just upgraded to 39 and the Arduino IDE was working fine for my M5 devices under 38. The 39 upgrade did somehow cause the Arduino IDE to "lose" pyserial, presumably because pyserial seems to have been part of the python "core" pre-39 but now it is a separate package. I had to install the "official" Fedora pyserial 3.5-6 package to ge the IDE to work right after I upgraded
The IDE works fine with Arduinos.
I think I am just going to wipe my Arduino IDE and install the 2.0 one. I am assuming the M5Stack libraries work with it.
-
RE: Is UIFlow 2.0 a dead project?
I started a project and the device type defaulted to an AtomS3. When I try to change the device to a Core 2, all "USB Devices" except the AtomS3 are greyed out. All the links to "My Device" just go to the store. "Shared Devices" ask for a 32-character token. All I have is a 8-charcater hex API key. Do I need to install v2.0.1-CORE2 firmware to get a 32-character key?
If so, I'm stuck, because when I try to burn the v2.0.1-CORE2 firmware on my Core 2 it semi-bricks my device.