Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. Steve1
    S
    • Continue chat with Steve1
    • Start new chat with Steve1
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    Steve1

    @Steve1

    0
    Reputation
    10
    Posts
    709
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Steve1 Follow

    Posts made by Steve1

    • UI Flow cannot access local disk in Chrome

      My regular browser is Chrome under Ubuntu 22.04 and it is the latest version 106.0.5249.103. When I launch the web version of UI Flow under Chrome I cannot read or save m5f files to my local hard drive. I have no problems in downloading files from other websites. I tried using Firefox to use the web version of UI Flow and it works perfectly, saving and reading files as expected. Both browsers show the UI Flow version to V1.10.8 though the top bar is slightly different in that the Chrome version has a "Save as" button but the Firefoxx version doesn't.

      I have tried launching chrome with google-chrome --allow-file-access-from-files but still cannot access the local disk from the UI Flow website. I have tried altering the settings for flow.m5stack.com also without success.

      This seems to be a UI Flow/Chrome issue, rather than a Ubuntu issue, because the site works perfectly in Firefox under the same OS and I have no problems downloading other stuff in Chrome. I hope someone can help me because it doesn't seem right that I should need a separate browser just for the website flow.m5stack.com

      posted in UIFlow
      S
      Steve1
    • RE: Saving programs from UI Flow Web

      @ajb2k3 I am using Chrome version 106.0.5249.103, the latest version for my Ubuntu 22.0 OS. Maybe this is off topic but what Security and permissions tabs do I need to check to allow a website to read and write to my harddrive? I have tried adding "--allow-file-access-from-files" when launching google-chrome from the terminal, but that didn't work.

      posted in UIFlow
      S
      Steve1
    • RE: Saving programs from UI Flow Web

      @steve1 I have just tried the UI Flow web application https://flow.m5stack.com/ in Firefox (I was using Chrome up until now) and I can save my work by clicking on the "Floppy" icon. So it seems this is a Chrome problem.

      posted in UIFlow
      S
      Steve1
    • RE: Saving programs from UI Flow Web

      @holofloh Clicking on the Floppy doesn't do anything in my setup, no downloads to the downloads directory. By the way I am using Chrome under Ubuntu Linux.

      posted in UIFlow
      S
      Steve1
    • RE: Saving programs from UI Flow Web

      I have given it a name in the bo top-right where the default is "Main" but I think you must mean something else. Would you be so kind as to walk me through building a program using Blockly and then saving it where I can reload it for further work another day.

      I am more used to programming with the Arduino IDE and the UI-Flow web app does not seem intuative to me

      posted in UIFlow
      S
      Steve1
    • Saving programs from UI Flow Web

      I can connecr my M5Stack Fire and CoreInk to the web Ui Flow app and upload Blockly programs to the devices and run those programs on the devices. What I cannot do is save those programs to use again another day. Clicking on the "Save" or "Save as" does absolutely nothing. How can I save the apps I develop using blockly on the UI Flow Web app?

      posted in UIFlow
      S
      Steve1
    • Ultrasonic range finder unit not working.

      I recently bought an "M5Stack Ultrasonic Unit (RCWL-9600) Distance Sensor I2C Grove" and cannot get it to work at all. I have tens of M5Stack units and always start of by using the sample codes from the Wiki. Unfortuately neither the UI Flow code nor the Arduino code from the Wiki work in the case of the ultrasonic range finder. With the UI Flow code the sensor is recognized as being connected to I2C but delivers the distance of 7958.04mm and never changes. With the Arduino code the distance is always around the 500mm mark no matter how far away the obstruction is.

      Do I have a faulty unit or are there known issues with this unit?

      posted in Units
      S
      Steve1
    • RE: Using IR Remote sensor with PbHub

      Thanks, but I still cannot read the Serial.read() from "porthub.hub_a_read_value(HUB_ADDR[2]);"

      posted in General
      S
      Steve1
    • Using IR Remote sensor with PbHub

      I have been exprimenting with using sensors on an M5Stack fire via a PaHub and a PbHub. Here is simple working example for a button module:
      *// Important! Set Tools-PSRAM to Disabled otherwise M5Stack display hangs.

      #include <Wire.h>
      #include "ClosedCube_TCA9548A.h"
      #include <M5Stack.h>
      #define PaHub_I2C_ADDRESS 0x70
      ClosedCube::Wired::TCA9548A tca9548a;
      #include "porthub.h"

      #define X_OFFSET 10
      #define Y_OFFSET 18

      PortHub porthub;
      uint8_t HUB_ADDR[6] = {HUB1_ADDR, HUB2_ADDR, HUB3_ADDR, HUB4_ADDR, HUB5_ADDR, HUB6_ADDR};

      void setup() {

      M5.begin();
      M5.Power.begin();
      delay(50);
      Serial.begin(115200); // Initialize serial communications with the PC
      Wire.begin(); // Initialize I2C
      uint8_t returnCode = 0;
      uint8_t channel = 0;
      tca9548a.address(PaHub_I2C_ADDRESS);
      returnCode = tca9548a.selectChannel(channel);
      Serial.print("returnCode = ");
      Serial.println(returnCode);
      //Wire.beginTransmission(channel);
      //returnCode = Wire.endTransmission();

      M5.Lcd.clear(BLACK);
      M5.Lcd.setTextColor(YELLOW);
      M5.Lcd.setTextSize(2);
      M5.Lcd.setCursor(30, 0); M5.Lcd.println("Button/Hub example");
      Serial.println("Button/Hub example: ");
      M5.Lcd.setTextColor(WHITE);
      }

      /*
      Description: Read the button status of BUTTON Unit and display it on the screen
      */
      #include <M5Stack.h>

      int last_value_A = 0;
      int cur_value_A = 0;
      int last_value_B = 0;
      int cur_value_B = 0;

      void loop() {
      cur_value_A = porthub.hub_d_read_value_A(HUB_ADDR[2]);// read the value of A-BUTTON
      cur_value_B = porthub.hub_d_read_value_B(HUB_ADDR[2]);// read the value of B-BUTTON

      M5.Lcd.setCursor(0, 25); M5.Lcd.print("Status A: ");
      M5.Lcd.setCursor(0, 45); M5.Lcd.print("Value A: ");
      M5.Lcd.setCursor(0, 65); M5.Lcd.print("Status B: ");
      M5.Lcd.setCursor(0, 85); M5.Lcd.print("Value B: ");
      if (cur_value_A != last_value_A) {
      Serial.print("A = ");
      Serial.print(cur_value_A);
      M5.Lcd.fillRect(110, 25, 100, 25, BLACK);
      M5.Lcd.fillRect(95, 45, 100, 25, BLACK);
      if (cur_value_A == 0) {
      M5.Lcd.setCursor(110, 25); M5.Lcd.print("pressed"); // display the status
      M5.Lcd.setCursor(95, 45); M5.Lcd.print("0");
      Serial.println("Button Status: pressed");
      Serial.println(" value: 0");
      }
      else {
      M5.Lcd.setCursor(110, 25); M5.Lcd.print("released"); // display the status
      M5.Lcd.setCursor(95, 45); M5.Lcd.print("1");
      Serial.println("Button Status: released");
      Serial.println(" value: 1");
      }

      last_value_A = cur_value_A;
      

      }

      if (cur_value_B != last_value_B) {
      Serial.print("B = ");
      Serial.print(cur_value_B);
      M5.Lcd.fillRect(110, 65, 100, 25, BLACK);
      M5.Lcd.fillRect(95, 85, 100, 25, BLACK);

      if (cur_value_B == 0) {
        M5.Lcd.setCursor(110, 65); M5.Lcd.print("pressed"); // display the status
        M5.Lcd.setCursor(95, 85); M5.Lcd.print("0");
        Serial.println("Button Status: pressed");
        Serial.println("       value:  0");
      }
      else {
        M5.Lcd.setCursor(110, 65); M5.Lcd.print("released"); // display the status
        M5.Lcd.setCursor(95, 85); M5.Lcd.print("1");
        Serial.println("Button Status: released");
        Serial.println("       value:  1");
      }
      
      last_value_B = cur_value_B;
      

      }
      M5.update();
      }*

      I have got several simple M5Stack sensors working this way. I canor however get the IR Remote module to work even just via the PbHub. The problem is that when connected directly the sketch normally reads pin 36 by including "int IR_RECEIVE_PIN = 36;" in the sketch. But my problem is how to do this via the PbHub? I have tried "int IR_RECEIVE_PIN="porthub.hub_a_read_value(HUB_ADDR[i2):" and other commands from porthub.h but then the address is read only once.

      How can I use PbHub and porthub.h to acheive the same effect I get from connecting directly to pin 36?

      posted in General
      S
      Steve1