Navigation

    M5Stack Community

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

    brvus76

    @brvus76

    0
    Reputation
    6
    Posts
    817
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    brvus76 Follow

    Posts made by brvus76

    • Save file on cloud (Gdrive, Dropbox)

      Good evening.
      Is there the possibility to acquire some data, save it on an SD card and send it to an external storage service, such as GDrive or Dropbox?
      Could be possible to do it with UIFlow?
      I have a Core2 system.
      Thank you very much and best regards

      posted in UIFlow
      B
      brvus76
    • ADS1100 Hat with Core2

      Dear all,
      I need a better resolution for a project and I have seen that the internal ADC of the ESP32 is really noisy. So I ordered an ADS1100 for my Core2.
      In the meantime I tried to connect an ADS1100 hat (that I bought for an M5Stick).
      I connected it to the Port A of my Core2
      0_1643454725284_IMG_8803.jpg
      Here the code:

      from m5stack import *
      from m5stack_ui import *
      from uiflow import *
      import time
      import unit
      screen = M5Screen()
      screen.clean_screen()
      screen.set_screen_bg_color(0xFFFFFF)
      adc_0 = unit.get(unit.ADC, unit.PORTA)
      label0 = M5Label('Text', x=126, y=113, color=0x000, font=FONT_MONT_14, parent=None)
      while not (btnA.isPressed()):
      label0.set_text(str(adc_0.voltage))
      wait_ms(1)

      When I upload I read:
      ADC unit maybe not connect

      Any suggestion?
      Thank you!

      posted in UIFlow
      B
      brvus76
    • UDP data transmission

      Happy new year to everyone!
      I am working with UIFlow (and uPython) to allow an UDP communication with a software on my PC.
      I need to send a certain string over my network and this is the code that I wrote:

      from m5stack import
      from m5stack_ui import
      from uiflow import
      import wifiCfg
      import socket
      from easyIO import
      screen = M5Screen()
      screen.clean_screen()
      screen.set_screen_bg_color(0xFFFFFF)
      wifiCfg.doConnect('NET', 'PSW')
      udpsocket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
      udpsocket.connect(('', 52790))
      while True:
      udpsocket.sendto(str((analogRead(36))), ('255.255.255.255', 52791))
      wait_ms(1)

      Everything works, but the communication is really slow, less than 50 messages per second.
      When I use Arduino IDE, I can do the same at a sample rate of 500 messages per second.
      Is this a limitation of uPython or do I commit an error?

      Thank you very much and best regards

      posted in Micropython
      B
      brvus76
    • Save on SD

      Good morning.
      I am using the dual core function on my Stack 2, so I cannot use UIFlow, but Arduino.
      I need to save on SD with one core and read with the other.
      Is there an example on how to write (and read) on an SD card with M5Stack2.h library?
      Thank you

      posted in Arduino
      B
      brvus76
    • RE: USB communication

      Dear felmue,
      At first thank you very much for your answer. I apreciate this.
      I tried. It works (!) but I have some problems. First of all, the data transmission is really slow. I tried to modify the row:
      print((str(((str(((str(((str('{XYPLOT|DATA|Analog Measurements|') + str(tt)))) + str('|')))) + str((adc0.read()))))) + str('}')))
      with
      print("{XYPLOT|DATA|Analog Measurements|}, tt, "|", adc0.read(), "}")
      but without success.
      Another problem is that when I open the USB communication from my software on the PC the M5 has a reset...
      Could you help me?
      Thank you!

      posted in Lessons and Guides
      B
      brvus76
    • USB communication

      Dear All,
      I like UIFlow but I am not an expert of Python. I have always programmed through the standard Arduino IDE.
      I need to interface my M5Stack Core 2 with MegunoLink. This can be easily done if I use the standard IDE, but I am not able to do it with UIFlow.
      Basically I need to send to my PC through the USB a set of strings such as: {XYPLOT|DATA|Name|x|y}
      Could you help me?
      Thank you very much
      Bruno

      posted in Lessons and Guides
      B
      brvus76