Navigation

    M5Stack Community

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

    crami25

    @crami25

    3
    Reputation
    41
    Posts
    868
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    crami25 Follow

    Posts made by crami25

    • RE: Maximum recursion depth?

      @dclaar
      See https://www.geeksforgeeks.org/python-handling-recursion-limit/ :
      by default, the value normally is 10^4.

      posted in Micropython
      C
      crami25
    • RE: I2C bus already used error

      @dwarrenku
      Adafruit is using a programmed microcontroller in their stemma lines (Arm line) in order to interface different sensors to an i2c bus. M5Stack is using the same approach using the Atmel328 (Arduino line) microcontroller eg in their PbHub, servo controller, Makey etc. For the PbHub you can use the library provided or use the pure I2C blocks from the flow advanced sections. Using the I2C blocks I was able to read analog values from the PbHub, which is described in their unit data sheet, but the function is not provided as a flow block.

      Adafruit doesn't provide the details in their documents for their STEMMA Soil Sensor. But I probably found a solution described in following forum
      https://elixirforum.com/t/adafruit-stemma-soil-sensor-i2c/25990/2

      I think you are facing 2 problems:
      - timing problem ( you have to wait for for the sensor)
      - in the Stemma line, you can change the I2C adress of the sensors writing the values into ??? register !

      Because I don't have the STEMMA sensor, I can't try it out. But in my opinion, you don't need to include the seesaw STEMMA library (which may have the wrong timing for the M5Stack), but you can read the moisture values using M5Stack I2C blocks:

      0_1588021594822_a4627e8f-809e-46be-bcdd-1a36f4b063d9-image.png

      and translated into micropython:

      0_1588021744584_6abea805-c9ff-44be-8a06-778bb8850703-image.png

      posted in Micropython
      C
      crami25
    • RE: How to record audio from the internal microphone then play it through the speaker?

      @somedude
      The M5GO/Fire Battery Bottom has got a microphone + a MAX4466 built in. According the schematics it is connected to GPIO 34 of the M5Stack core.

      posted in General
      C
      crami25
    • RE: M5StickC and 18650C endurance

      @Pepsi @Kees
      Here is a tutorial on battery cells for the ESP32 and ESP8266:
      https://www.youtube.com/watch?v=heD1zw3bMhw.

      An AA LiFePO4 cell has approximatly the same size as the M5Stick. You can feed the voltage directly into the 3.3V port.

      posted in M5 Stick/StickC
      C
      crami25
    • RE: lcd.print disappears with rotate 270 and Y > 104

      @dclaar
      The M5stack grey has a built-in gyroscope, the black one hasn't. Use the gyroscope data determining at which angle your text shall be displayed. In Blockly you can define different labels for the different angles and display them accordingly. If you write the program in Blockly/Python you won't be able to save it. In that case I put the Python line into a Blockly exec code calling the exec code with a subroutine. That way your block code can be stored in a *.m5f file. You can even pass global variables into your exec code (eg the x,y position of your text on the display and the rotation angle.

      posted in Micropython
      C
      crami25
    • RE: M5StickC and 18650C endurance

      @Kees
      My Skross (and other powerbanks) work fine with the M5Stick (and Atom matrix), they don't switch off. Maybe you got an old style one. The newer ones are made that you also can charge earplugs (with batteries smaller than the M5Stick) without shutting off. Never mind the power loss. Modern step up and step down have a power loss < 5% . Maybe you want to use a cheap 18650 from Bangood (I got 4 of them marked 5000mAh !) as a backup power. I will stick to my powerbanks. You probably will loose 4-5 hours of run time (of 48). By the way, the IP5306 used for the power management in the M5Stick according to the data sheet (http://www.datasheetcafe.com/ip5306-datasheet-battery-ic/) supports a 2.1A charging current. So it should be no problem charging a 18650.

      posted in M5 Stick/StickC
      C
      crami25
    • RE: Combining files?

      @dclaar
      I'm using 2 techniques:

      1. Use Notepad++ as an editor. If you name your program *.py, it will highlite the code as in Blockly/Python. You can then copy and paste the code into UIflow (but you cant save them there). So if the code works, I copy and paste the code back into Notepad++ and save it as a *.py file.
      2. Using the standard editor programming ESP32 and ESP8266 in microphyton: yPyCraft or Thonny (https://randomnerdtutorials.com/getting-started-micropython-esp32-esp8266/). The UIFlow Python editor probably is a clone of one of these. With these editors you can even do a simple code/syntax check, then copy and paste back and forth as I described with Notepad++.
      posted in UIFlow
      C
      crami25
    • RE: M5StickC and 18650C endurance

      @Kees
      The simplest thing is to use a powerbank: The square ones mostly are powered by a18650. Today most powerbanks are designed pass through, so you can charge them and at the same time powering a device as the cellphone, the M5Stack, -stickc or the atom (matrix). I mostly hock up my M5Stack devices to a powerbank instead of an USB wall plug charger when programming them over WiFi with an API Key. My M5Stack runs up to 48 hours on an 3500 mAh power bank. I'm also using a nice square one 100x50x10mm from SKROSS (3 Reload) which fits nicely with the M5Stack.
      0_1587383542626_25097b67-85ca-4701-ad68-a128dcc0f9c4-image.png .
      THat way, you don't have to solder or fiddle around with the M5Stack battery charger.

      posted in M5 Stick/StickC
      C
      crami25
    • RE: Adding a microphone to the Core+Watch kit

      Hook it up to an AD input of the M5Stack (ESP32).
      Watch : https://www.youtube.com/watch?v=DffZVyksYi4
      I will use one as a spectrum analyzer recording the sound of bees.

      posted in Cores
      C
      crami25
    • RE: lcd.print disappears with rotate 270 and Y > 104

      Every time you call SetScreenColor(0xff0000) in your loop the display is completly erased and then your text is displayed again. So the annoying flashing is due to your programming style ! If you rotate a label, you mostly will have to rearrange its position. If you rotate a label at the bottom of the screen simply by changing the rotate value for your text in python to eg. 90 it will fall of the bottom of the screen. If you keep your programming strictly to Blockly, you can see what happens.

      posted in Micropython
      C
      crami25