Navigation

    M5Stack Community

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

    Serge

    @Serge

    2
    Reputation
    18
    Posts
    1461
    Profile views
    1
    Followers
    0
    Following
    Joined Last Online

    Serge Follow

    Posts made by Serge

    • NEW : UIFlow and M5Stack tutorial on youtube channel

      A long time i haven't post here.
      I made a youtube channel dedicated to M5stack basic core, UIFlow, and sciences experiments. As i m a physic teacher.
      There will be some nice stuff (as a graph plotter while time passing ; using SD card, temperature control with a relay, the project made by my students)

      https://www.youtube.com/watch?v=w88vSC4plXc

      I m sorry i had to chose : i speak english too badly ... but i can write quite correctly.
      So i made text comments in english, and i ll add soon voice comments in french.

      posted in Lessons and Guides
      S
      Serge
    • RE: Units CO2/TVOC

      hi,
      don't know why but if you set that line n°31 in comment, it seems to work

      "# tvoc0.set_iaq_baseline(35187, 35502)
      while True:

      you may try to use the sample loop that you find in UIflow_Unit TVOC.

      As you can see on the picture below, TOVC/eCO2 can be use in a classroom context and it works fine
      I initialized it outside the window and came inside after

      0_1623533101105_Mesures5.png

      posted in Units
      S
      Serge
    • RE: Still need help for 3 basic stuff : matter of pin : digital/analog output/input ?

      Yes. Maybe that kind of sheet already exists somewhere ? M5-Core-Schematic(20171206).pdf
      GPIO 37 38 39 are for buttons A, B C. for example ?

      I guess aviable GPIOs are only those with male or female connexions as shown on picture above so they re the only one we can really use.

      posted in UIFlow
      S
      Serge
    • RE: Still need help for 3 basic stuff : matter of pin : digital/analog output/input ?

      Hi, thanks, there s a lot a reading there.
      I ve just understand the association on the picture below. Maybe it is too obvious or i am a ?**!@&0_1622285897944_m5_rear_no_s2.png

      posted in UIFlow
      S
      Serge
    • Still need help for 3 basic stuff : matter of pin : digital/analog output/input ?

      I really like M5Stack ; i use UIFlow. With demos about some sensors i managed to make a few things.
      Some bugs with previous version have disapeared with 1.6 and 1.7, and that s really nice.

      But i still need help :
      can someone tell me how to :

      • make a 3 colored traffic light with 3 LEDs as we find each time for arduino ? What pins can i use for a DIGITAL OUTPUT and how can i set them HIGH or LOW?
      • what pin can i use for de ANALOG OUTPUT and make for example a voltage ramp or a sinus signal ?
      • make a connexion with a pH-meter or a conductivity-meter or any science measurement apparatus with a 0-5V output ? what pins can i use for a ANALOG INPUT ?

      if someone can help me for those basic stuff ? Thanks a lot.

      posted in UIFlow
      S
      Serge
    • RE: IDE crashes after startup and webIDE cannot connect to device (Upload code failed, maybe your device is offline check it and retry)

      Hi, i m new too on M5Stack... May I ask you if you installed Firmware with M5Burner ? If not you must do it. Chose 1.4 or 1.5 and fill the entry for your WIFI .
      Then just on the right of [Disconnected] you have a refresh button, try it , and again ..

      posted in Bug Report
      S
      Serge
    • I2C error when GOPlus servo + Grove Ultrasonic sensor

      Hi
      i try to use servo connected to GOPlus module and UtraSonic sensor SR 04.

      The SR04 with the classical 4 pins (trig and echo) works well alone (pin 21 and 22 )
      When a servo is connected : it doesn't work anymore : i2Cbus error 110 (detail : File I2c-bus.py line 41 in write_U8 OSError 110.

      I thought first it was a problem with SR04 connexion on pin 21 and 22.
      So i wanted to try the grove US sensor. But i didn't find a unit block.
      (see https://forum.m5stack.com/topic/1907/uiflow-and-unit-grove-ultrasonic-distance-sensor)

      But i ve found this morning :
      The I2C Error 110 occurs when Grove US sensor is connected on Port A and the servo stopped.
      There is no similar error when Grove US sensor is connecter to port PB1 on GOPLUS module

      Why ?

      posted in Modules
      S
      Serge
    • RE: UIFlow and unit grove ultrasonic distance sensor

      Thank you.You re right, i send that post after i tried that module. That HCSR-04 module isn't for Grove, it use 4 pins (VCC, ground, trigger pin, echo pin) . It works very well but..
      This is my project : i have a mini-robot made with arduino (Uno, motor shield, ultrasonic sensor, servo) and i want to make it again in M5Stack and micropython context. So i bought the GOPlus element that provides controls for 4 servos connexions, 2 independant motors, 3 more grove ports.
      The problem is : when i use at the same time 1 servo and the basic 4 pins Ultrasonic function, the Echo Pin creates an ERROR on the M5Stack .

      That s why i wanted to try the grove Ultrasonic.
      But it s using only 1 pin for trigger and echo.

      posted in UIFlow
      S
      Serge
    • Tip : Writting data from sensors to SDCard : M5Stack > UIflow (micropython code)

      Hi, this is a script that works well for me.
      Context : during an experiment, you want to save data collected from sensors.
      You re doing many acquisitions so you need to save data in many files.
      Hope it will help.

      In this example, data (temperature and humidity) is generated by random numbers.

      from m5stack import *
      from m5ui import *
      from uiflow import *
      import os
      import time
      from random import randint
      
      last_time = 0
      Time_Interval = 5    #wait 5 seconds before the new data acquisition
      abscisse = []        # the data is collected in 3 lists  
      temperatures = []
      humidities = []
      label0 = M5TextBox(50, 140, "", lcd.FONT_DejaVu18,0xFFFFFF, rotate=0)
      
      # don't know why it s works without the sd_mount() instruction
      #sd_mount()
      
      # this function for a brand new screen
      def refresh_screen():
        setScreenColor(0x222222)
        lcd.font(lcd.FONT_DejaVu18)
        lcd.print("Welcome !", 10 , 20, 0xFFFFFF)
        lcd.print("Writing Data on SDCard", 10 , 40, 0xFFFFFF)
        lcd.print("Please Press Button B", 10 , 60, 0xFFFFFF)
        lcd.print("         to save file", 10 , 80, 0xFFFFFF)  
        lcd.print("Current File length", 10 , 100, 0xFFFFFF)  
        wait(0)
      
      # test if a file is already existing  
      def file_exists(fname):
        try:
          with open(fname):
            pass
          return True
        except OSError:
           return False
      
      refresh_screen()
      t0 = time.ticks_ms()
      
      while True:
        if  (time.ticks_ms()-last_time) >= Time_Interval*1000:
          last_time = time.ticks_ms()
          new_time = (time.ticks_ms()-t0) // 1000
          # when it s time, you can collect a new data from a sensor
          # some kind of env.get_temperature, works here with numbers
          temp = randint(200,300) / 10  # random number for temperature in °C
          humi = randint(40,60)         # random number for humidity in %
          abscisse.append(new_time)     # writing new value in each list
          temperatures.append(temp)
          humidities.append(humi)
          label0.setText(str(len(abscisse)))
          wait(0.1)
      
        if btnB.isPressed():
            file_path = "/sd/MeasuresTH0.txt"
            while file_exists(file_path):   # create a new file name if several acquisitions
              file_path = file_path.replace("/sd/MeasuresTH"," ")
              file_path = file_path.replace(".txt"," ")
              file_path = file_path.strip()
              file_path = int(file_path) + 1
              file_path = "/sd/MeasuresTH"+str(file_path)+".txt"
            f1 = open(file_path, 'w+', encoding="utf-8") # the file operations for writing     on SDcard all the data in the same file
            f1.write("{} \n".format(abscisse))
            f1.write("{} \n".format(temperatures))
            f1.write("{} \n".format(humidities))
            f1.close()
            label0.setText("Saved in \n" + file_path)   
            wait(2)
            # reset all stuff and do it again
            t0 = time.ticks_ms()
            last_time = 0
            abscisse = []
            temperatures = []
            humidities = []
            setScreenColor(0x222222)
            refresh_screen()
      posted in Lessons and Guides
      S
      Serge
    • RE: UIFlow and unit grove ultrasonic distance sensor

      Thanks Lukasmaximus, i ve seen before your page with the grove one, but you use arduino library. I ve already seen the libraries from Seeedstudio.
      I tried the one called "grove_ultrasonic_ranger.py" but something called GPIO is missing when i run the example program.

      Shall i install the whole "grove.py" library ? Well i don't know yet how to do that.

      posted in UIFlow
      S
      Serge