Navigation

    M5Stack Community

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

    Nestor89

    @Nestor89

    0
    Reputation
    8
    Posts
    146
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Nestor89 Follow

    Posts made by Nestor89

    • function returning accel values of MPU6886 is buggy x and Z values are alwas identical

      Hi,
      in my previous post https://community.m5stack.com/topic/5561/imu-getaccel-returns-gyro-values I pointed out that UIFLOW2 repectively the phython code generated by blockly returns in case of my Atom S3 the wrong values, namely:

      Imu.getGyro() returns accel values
      and
      Imu.getAccel() returns gyro values.

      I noticed a further bug:
      the accel values returned by Imu.getGyro() for x and z are always identical. If I tap on the device or move it around the x and the z values are always identical.

      I assume that the library has a bug. However I can not rule out that the the mpu6886 is wrongly wired to the esp32.

      Could you please check whether the library is the cause for this strange behaviour.

      Best regards,
      Nestor

      posted in UiFlow 2.0
      N
      Nestor89
    • RE: Imu.getAccel() returns gyro values ???

      Hi I figured out that Imu.getGyro() returns a tuple of 3 values and that a tuple can be considered as a list. The following code works to seperate the tuple:

      def loop():
      global label0, label1, label2, label3, label4, label5, highscorebeschl, beschly, beschlx, beschltuple, beschlz
      M5.update()
      beschltuple = Imu.getGyro()
      beschlx = beschltuple[0]
      beschly = beschltuple[1]
      beschlz = beschltuple[2]
      label3.setText(str(beschlx))
      label4.setText(str(beschly))
      label5.setText(str(beschlz))

      in blockly the block in list ... get # ... can be used
      However blockly counts from 1 to 3 while the generated phython code counts from 0 to 2.

      So in the end the question remains why Imu.getGyro() and Imu.getAccel() return the values of the other function.

      Best regards,
      Nestor

      posted in UiFlow 2.0
      N
      Nestor89
    • RE: Imu.getAccel() returns gyro values ???

      I have to correct myself.
      I work with an atom S3 right now.

      Imu.getAccel() returns values between -1 and 1 depending on the inclination of the atom S3.
      Imu.getGyro() returns values at least up to 30 depending on the velocity of movement of the atom S3.

      It looks like the functions each return the value for the other function. Are the functions implemented incorrectly or is the sensor wired incorrectly?

      Furthermore how can i access the x,y,z values? The blocks do not seem to have a parameter (There were blocks in uiflow 1 for x,y,z each) Are the values returned as a triple which needs to get sperated somehow?

      Best regards,
      Nestor

      posted in UiFlow 2.0
      N
      Nestor89
    • Imu.getAccel() returns gyro values ???

      Hi,

      there was a similar question 4 years ago realting to uiflow1 under the following URL:
      https://community.m5stack.com/topic/1672/imu-get-acc-reports-gyro

      There are 2 blocks in IMU for accel and gyro! IMU get accel and IMU get gyro.

      It seems that the returned values in both of both functions are gyro values. UIFlow generates the following code, and in the variables beschlx and beschly are identical values, namely gyro values. Furthermore it seems that the function does not return sperate values for x,y,z. Or is the return value a triple and I have to split the values somehow?

      def loop():
      global label0, label1, label2, label3, label4, label5, beschlx, beschly, beschlz
      M5.update()
      beschlx = Imu.getAccel()
      beschly = Imu.getGyro()
      beschlz = Imu.getAccel()
      label3.setText(str(beschlx))
      label4.setText(str(beschly))
      label5.setText(str(beschlz))

      Best regards,
      Nestor

      posted in UiFlow 2.0
      N
      Nestor89
    • How to enter properties of UI-items in UIFlow2?

      In UIFlow 1 one can rightclick on the item and enter the properties in a context menu. Rightclick on Item does not seem to work in UIFlow2. Ist there a solution?
      Best regards,
      Nestor

      posted in UiFlow 2.0
      N
      Nestor89
    • How to delete UI item such as label in UIFlow2?

      Hi,

      In UIFLow 1 one can drag an ui-item to the trash bin. How can I delete an Item in UIFLOW2?

      Best regards,
      Nestor

      posted in UiFlow 2.0
      N
      Nestor89
    • UIFLOW, Core2, PIR-Sensor Blockly wrongfully assuems that the PIR-Sensor is connected to PORTB

      Hi,

      there is kind of a bug in uiflow on core2. if you connect the pir sensor the template code generated by blockly does not work.

      the generated phython code looks like that:
      from m5stack import *
      from m5ui import *
      from uiflow import *
      import unit

      setScreenColor(0x000000)
      pir0 = unit.get(unit.PIR, unit.PORTB)

      BVlockly assumes that the sensor is connected to PORTB. However the Port of Core 2 is named PORTA. If you change the value to PORTA, the code works. However oyu cant switch beack to blockly because blockly wants to habve the value as PORTB. Can this be fixed in uiflow2?

      Best regards,
      Nestior

      posted in UIFlow
      N
      Nestor89
    • Core2 UiFlow

      Hi,

      I defined with blockly a touch button. If the touch button ist pressed first the screen shall become red and then a filled circle shall be drawn on the background. In python the code looks like that:

      def touch_button0_pressed():
      global z_schwelle
      screen.set_screen_bg_color(0xff0000)
      wait_ms(1)
      lcd.circle(160, 120, 30, fillcolor=0xffffff)
      wait(2)
      pass
      touch_button0.pressed(touch_button0_pressed)

      Strangely, however, when the code is executed, the circle is drawn first and then the screnn is colored, with the circle disappearing. Why is the code executed in the wrong order? How can I prevent this? The wait commands I have inserted have not helped.

      Best regards,
      Torsten

      posted in UIFlow
      N
      Nestor89