Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. wsanders
    3. Posts
    W
    • Continue chat with wsanders
    • Start new chat with wsanders
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by wsanders

    • 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 .....

      posted in Arduino
      W
      wsanders
    • RE: What is this card you mailed me?

      Do these work at 13.56? How are they formatted? I cannot get my iPhone 11 to read them.

      posted in PRODUCTS
      W
      wsanders
    • RE: M5StickC-Plus Buzzer not working

      I'm not sure what is connected to it, probably some tiny piezo speaker, but pin G2 is the "buzzer" pin.

      There is a way to set up PWM on a pin at a desired frequency. Also, sometimes these speakers are resonant, so much louder at a particular frequency.

      Example using the API, below:

      posted in Arduino
      W
      wsanders
    • "Download the file to the M5" doesn't work anymore?

      IIRC "Download the file to the M5" used to download a copy of the Python code to the /flash/app directory on the device. This allowed you to give your new app a name other than "temp.py", and you could run more than one app from the AppList menu. Now you have to use ampy or something to upload a renamed file. And the current UIFlow file seems to go into the /flash directory rather than /flash/apps. Also there are two copies of the app in /flash, main.py and temp.py. Which copy is more current?

      posted in Bug Report
      W
      wsanders
    • More fonts in Core2 UIFlow "Graphic"

      For some reason only FONT_Default is available in the "Graphic -> Font" block for the Core2. Lots more fonts are available for other hardware.

      posted in Bug Report
      W
      wsanders
    • Custom Colors in UIFlow "Graphics".

      Either more than 70 colors in the fixed palette or the ability to use an int would be nice.

      posted in Features Wish List
      W
      wsanders
    • RE: Sample code for Thermal Unit and Core2?

      Thanks for the hint. That code won't compile: 'MLX90640_BadPixelsCorrection' was not declared in this scope. If you comment out the reference to MLX90640_BadPixelsCorrection it compiles and works OK. In the meantime I got a UIFlow version working more or less. Download from https://github.com/wsanders/WSThermalCore2Cam/blob/main/thermtest1.m5f. It's pretty crude but it autoranges OK if the temperature differences aren't too bad. Using ASCII art pixels because it's faster than drawing two rectangle (you STILL can't draw a borderless rectangle in UIFlow!)

      Sorry - I deleted my previous post accidentally. It was full of errors anyway.

      posted in Units
      W
      wsanders
    • RE: Thermal unit MLX90640 with Core2

      Bump. Me too! I can't find an M5 copy of MLX90640_API.cpp and MLX90640_I2C_Driver.cpp. After commenting out calls to MLX90640_BadPixelsCorrection() I tried using Sparkfun's version, but the .ino file has calls to interpolate_image() and get_point() which the Sparkfun library does not have.

      I tried using Blockly but the data returned by the calls to unit.get(unit.THERMAL, unit.PORTA) objects return garbage data. Well, not quite garbage - it's data but it is not corrected and interleaved in a way I can figure out.

      Micropython might be a better bet but I don't know how to get the Unit libraries. I don't have a spare Arduino to test on either.

      posted in Modules
      W
      wsanders
    • RE: Saving programs from UI Flow Web

      I have the exact problem: Chrome 107.0.5304.110 on Fedora 35. All buttons in the UI (label, button, line, etc) are nonfunctional as well as the "load", "save" etc buttons. UIFlow is completely unusable with Chrome. I can reproduce this in Konqueror also.

      The buttons seem to work in Firefox though.

      posted in UIFlow
      W
      wsanders
    • RE: Help with RTC block in UIFlow / Blocks

      You have to do it one character at a time, using “first letter” and “last letter”. For example (in the if/do/else block):0_1653428551357_838F761A-6860-49E0-99BC-4B4F3A38EC39.png

      In C or Python code of course you’d just use sprintf() or the equivalent.

      posted in UIFlow
      W
      wsanders
    • NeoHEX 37 RGB LED Board: Are all three connectors Grove format?

      Are all three connectors on the Neo HEX 37 RGB LED Board Grove (2mm pitch) format?

      Thanks.

      posted in Units
      W
      wsanders
    • RE: Cannot use UIFlow with Atom Lite

      @ahorner IIRC I received this error on an M5StickC Plus when the firmware version and UIFlow version did not match.

      posted in General
      W
      wsanders
    • RE: switches from USB mode to app mode

      Also, if your sketch has any code that uses Wifi, your device will disconnect from UIflow. It will not reconnect when your sketch is finished. To work around this I keep the M5Burner open; when you click on "configure" it will reset the device via USB. Even then, your device will not connect right away, so go down to the lower left corner of the UIFlow window and clock on "Reconnect".

      "App Mode" and "Download" are most useful when you are done testing your code.

      posted in UIFlow
      W
      wsanders
    • RE: M5Stick C Plus - Using button A to wakeup the device?

      I tried calling machine.deepsleep(xxx) in UIFlow and all it did was lock up the device, so tightly that even the power/reset button did not work. It might work from other IDEs , if you could succeed in setting up all the interrupts before putting it to sleep.

      posted in M5 Stick/StickC
      W
      wsanders
    • RE: UIFlow places WiFi connection code in the wrong place

      @slartibartfast Hate to bump an old topic but this is a problem for me still. The "Original Network Function" blocks place the calls to the wlan class correctly but they don't actually work. This is UIFlow 1.9.6 now. It makes it impossible to use the program except in the coverage area of the SSID hard coded into the program.

      For a workaround, you can manually relocate the call to doConnect inside the loop or function where you want it. You can save that, and when you upload the program to the device it seems to send the modified python.

      posted in Bug Report
      W
      wsanders
    • RE: Monitor serial output in Uiflow

      @dave17 There are a few options avaiable to you in UIFlow, none of which I can help with because I have never used them in UIFlow. These are all in the "advanced" section:

      • "Socket": Looks like it supports UDP but not TCP. That would be your best option if you could deal with an occasional dropped packet.
      • "HTTP": Is is a client only, but you could pass information in custom HTTP headers, or in the request itself.
      • "MQTT: Never used it, but this is a protocol for IoT device to exchange messages with a central server, maybe one you set up yourself.

      Good luck!

      posted in UIFlow
      W
      wsanders
    • RE: Has anyone gotten machine.lightsleep to work from UIflow?

      @wsanders I got the program to run with lightsleep, but only in "Internet Mode" and not "App Mode". Battery life was no different with lightsleep than with wait, about 2 hr. (Wait is probably is just a call to lightsleep, just in a more organized manner.)

      It appears that in 1.9.6 Wifi doesn't come back up after lightsleep, I seem to remember the above callback function worked in 1.9.5 even after lightsleep. Now it hangs.

      Back to square one. I think the best way is to have two separate programs, one to sync the watch to NTP, and one to run the clock with the time from the RTC (so I can still use the watch outside of my home wifi network.)

      posted in UIFlow
      W
      wsanders