Navigation

    M5Stack Community

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

    Posts made by crami25

    • RE: 4Relay Module UIFlow

      @domi
      Are you using the "4Relay module" or the "4Relay unit" or the "2Relay module" ?

      If you still get an error, try to make a simple Uiflow programm scanning the i2c bus with the 4Relay connected:
      0_1675006853542_cfe4a152-de11-4d5b-8158-f44191defe28-image.png
      You should get the number [38, 117] displayed as Label0, 38 is the decimal for 0x26.
      If you get 37 you have another firmware than I have (I2C address 0x25).
      If you only get [117] your 4Relay module is not connected to the M5Stack core. 117 (0x75) is the I2C address of the battery management chip.

      posted in Review
      C
      crami25
    • RE: COM.X LTE (4G) Module Example UIFLOW/Phython

      @ajb2k3 A deaktivated PIN code doesn't mean that the SIM card is deactivated. SIM Cards are normally designed for cell phones and the provider gives you a new SIM Card locked with a PIN code and a PUK Code. (3-5 times entering a wrong PIN code blocks the SIM card and you have to enter the correct PUK code to unlock the SIM card. Entering a wrong PUK code several times will brick your SIM card and you have to get a new SIM card). Putting the SIM card into a cell phone the first time you will have to enter the SIM card PIN in order to unlock and to have access to the the SIM card. You can also use a PIN locked SIM card in an M5Stack GPRS/LTE module sending the right AT-command with the PIN required to unlock the SIM card. An easier way is to deactivate entering the PIN every time at startup with a cellphone: Put the new SIM card (per default locked with a PIN provided by the SIM card provider) in a cell phone, enter the PIN in order to access the SIM card. Then, in the cell phone setup menu: allow using the SIM card without entering the PIN code when you turn on the cell phone . (You normally protect the cell phone with a separate PIN code, so you don't want to enter 2 PIN codes every time you turn on your cell phone) . Now the "PIN-unlocked" SIM card can be used (and is active!) in an GPRS/LTE device without entering the PIN code. I have been using this routine regularly for the SIM-Cards I put in my GPRS/LTE WiFi mobile router, giving me internet access when I am away from home (I don't trust public [sniffing] WiFi networks ...).
      PS: Putting the SIM Card into a cell phone also allows you to change the PIN code provided with the SIM card eg. "1234" to "0000".

      posted in Modules
      C
      crami25
    • RE: 2-relay vs 4-relay

      @ajb2k3 You are talking about the 2Relay-UNIT ... with the black (analog/digital) grove port !!
      The M5Stack MODULE 13.2 we are talking about ( https://shop.m5stack.com/products/2-relay-13-2-module) has a STM32F030 controller acting as an I2C interface controlling the 2 relais : The I2C address according to their documentation is 0x25 (mentioned in the features section) or 0x26 (according to their arduino or blockly section). The firmware is +/- the same as with the 4Relay module and the 4Relay Unit (https://shop.m5stack.com/products/4-relay-unit with the red I2C grove port, I2C address 0x26).

      posted in Modules
      C
      crami25
    • RE: 2-relay vs 4-relay

      M5Stack have messed up with their xRelay modules and units. They are all adressed by I2C, but all require different commands depending on the firmware they have used, So using the proposed uiflow blocks won't work, you have to use the I2C blocks (See my forum post for the 4-relay module).

      For the 2-relay module the documents tell you that the I2C-Address is 0x26 (as for the 4-Relay Module). In the uiflow demo they are talking about address 0x25 ?? writing to control register 0xFF you can probaly change the I2C address of the module.
      So you have to try out which commands work for you ...

      posted in Modules
      C
      crami25
    • RE: I2C SHT31 Uiflow

      https://forum.m5stack.com/topic/1419/m5stickc-sensor-sht-31

      posted in Cores
      C
      crami25
    • RE: UIFlow .. multiple Weight Sensors with PaHUB?

      I don't think the PbHUB will work ... The PbHUB can only handle analog and digital signals (no clocks !). Reading values from the HX711 weight sensor needs a clock and a data line provided by the ESP32 GPIO Ports ... The UIFlow HX711 library only supports Port B.
      If you want to use several weight sensors on the M5Stack you will have to hook them up to different ports and do the programming either in Python or Arduino using the Expansion Port Module getting the additonal Ports C D and E.

      P.S: If you want to hook up multiple Weight Sensors to a M5Stack using port A you have to use HX711 devices which can be hooked up to the I2C bus. M5Stack has no such modules nor units, but you will find one made from DFRobot (https://wiki.dfrobot.com/HX711_Weight_Sensor_Kit_SKU_KIT0176). This sensor also has a grove I2C port and by modifying the I2C addresses you can hook up to 4 Weigh sensors to Port A. Using the PaHub I2C-extender you can even hook up 6 to 24 Weigh sensors ......

      posted in UIFlow
      C
      crami25
    • 4Relay Module UIFlow

      The M5Stack UIFlow libraries for 2Relay Module or the 4Relay Unit don't work for the 4Relay Module. So you have to use the I2C Master Blocks.

      Here is an example using the M5Stack Core toggling 3 Relays using the buttons A B C:

      0_1673535165986_4Relay.png
      0_1673535245682_Relais4.jpg

      UiFlow-Code (m5f): [https://forum.bastelgarage.ch/assets/files/2023-01-12/1673533548-943791-4relay6.zip)]

      posted in Review
      C
      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
    • RE: Display on during deep sleep?

      @m5er During deep sleep the LCD background led draws(a lot of) current. Also you have to refresh your screen 50 times per second
      The only solution to your problem would be adding an e-ink display which doesn't need any refresh during deep_sleep.

      posted in Cores
      C
      crami25
    • RE: Big screen compatible push6060

      @Carlos-De-Soto

      a stacking project ?
      look at https://github.com/m5stack/M5Stack_TFT_ILI9341
      You'll find different screens at waveshare.

      posted in FAQS
      C
      crami25
    • RE: Issues interfacing MFRC522 (RFID) with M5Stack

      @volatus

      I2C # SPI
      You forgot to use #include <SPI.h> in your arduino code. So the code compiled for I2C interface.

      Beware using the wrong pins for external SPI deviceon your M5Stack. You may brick your display. Interfacing to an external a SPI peripheral device you should use pins which are not in conflict with the pins used for M5Stack internals, as I already wrote in my comments on SPI Interfacing a few days ago:
      http://community.m5stack.com/topic/1845/micropython-spi/8
      You should keep it as they are saying on my spec sheet for the Heltec ESP32 LoRa board: "Pins used by on board OLED or LoRA must not be used for other purpose unless you know what you are doing !
      Accordingly, on the M5Stack you should only use the pins marked in blue.

      posted in Units
      C
      crami25