Navigation

    M5Stack Community

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

    Posts made by BricoMS

    • RE: How to Generate a Beep?

      @akaf24

      Well.. so sorry... you are right!
      I was certain i took the code from there but i was wrong. It is on the main m5stack library
      check here:
      https://github.com/m5stack/M5Stack/tree/master/examples/Basics/Speaker

      If i dont remember wrong (again) it worked for me.

      Sorry again.

      posted in Core 2
      B
      BricoMS
    • RE: How to Generate a Beep?

      @akaf24
      The arduino library examples folder has a beep demo fore Core2

      posted in Core 2
      B
      BricoMS
    • RE: [M5Core] empty UIFlow firmware

      What i am doing right now, is just work with the uiflow firmware but i unload from memory the modules for uiflowmenu on my main.py and then i load what i want. It does load the UIFLOW menu at the beginning but just for a second. Then blank canvas to work. I use either rshell when allowed or Thonny.

      posted in Features Wish List
      B
      BricoMS
    • RE: Multicore programming for M5Stack

      @iamashish
      This guy shows how to use 2 cores with arduino

      https://youtu.be/9vvobRfFOwk

      posted in Cores
      B
      BricoMS
    • RE: Core2 Esptool.py flash fail

      @barbiani
      I am blank now.
      If anyone has an idea can step in now :)

      posted in Core 2
      B
      BricoMS
    • RE: Newbie question - how to get started?

      @marcvl
      Hello,
      Besides the "auto align" of the uiflow interface, you would need to make that by programming. By programming i am refering to either pure code or BLOCKS)

      For example: (And i do not have the right numbers or functions at hand)

      if your screen is 320x180
      then the center of the screen would be 160x90
      If your button (or any object) is 20w x 10h... how would you put it at center?

      myX= 160-10
      myY= 90-5
      button1 = M5Btn(text='Button', x=myX, y=myY, w=20, h=10)

      So you sustract the half of the size of your object from the half size of your screen.
      And you can do that with relation to any object or any kind of reticle.

      Some objects like buttons have properties like width height, x and y.
      so if you ask for button1.w or button1.h (you have to check the real properties of your object, it could be button1.width or button1.height, check the documentation.) This way you can re arrenge your ui programatically asking for an object size and position.

      like this:(its just an example i dont think it works)
      button1 = M5Btn(text='Button', x=0, y=0 w=20, h=10)
      button1.x = myScreen.width - (button1.w / 2)
      button1.y = myScreen.height - (button1.h / 2)

      And from this you get into more complex reticles. A good advice is to plan your interface ahead of time and think of this aligments from the start.
      You will get a hang of that with time and will discover more easy ways to do it or more efficent ones.

      I recommend you search for tutorials on programming UI interfaces and aligning them. Most of the time i do not use the UI composition screen, i just drop the elements and i align them programatically.

      Maybe.. there is a way to do it easy on UIFLOW, but if you really want to have control of your elements and interface, you need to know by code where your objects are in relation to one another.

      Hope i did not confuse you too much.

      posted in Micropython
      B
      BricoMS
    • RE: Core2 Esptool.py flash fail

      Hmmm, ok my next suspicion is either your USB cable or the version or how you are running esptool.

      How is your set up?
      are you using windows, linux mac?
      Have you updated your platform drivers ?
      Have you tried another USB cable?
      Are you using a USB hub in between?

      My last suspicion is your core2.

      posted in Core 2
      B
      BricoMS
    • RE: Newbie question - how to get started?

      if you do import module "m5stack"

      import m5stack

      and do a:

      dir(m5stack)

      ['__class__', '__name__', '__file__', 'btn', 'btnA', 'btnB', 'btnC', 'decoder', 'display', 'espidf', 'gc', 'lvesp32', 'machine', 'rtch', 'touch', 'power', 'rtc', 'lv', 'get_png_info', 'open_png', 'binascii', 'Axp192', 'i2c_bus', 'i2c', 'lcd', 'disp_buf1', 'buf1_1', 'buf1_2', 'disp_drv', 'indev_drv', 'button', 'time_ex', 'timEx', 'timeSchedule', 'timerSch', 'BM8563', 'Speaker', 'speaker', 'Rgb_multi', 'rgb', 'node_id', 'psram_init', '_remote_init', 'remoteInit']

      you will see one of those methods is called: lcd
      if you go again and do a

      dir(m5stack.lcd)

      ['__class__', 'clear', 'print', 'BLACK', 'BLUE', 'BMP', 'BOTTOM', 'CENTER', 'COLOR_BITS16', 'COLOR_BITS24', 'CYAN', 'DARKCYAN', 'DARKGREEN', 'DARKGREY', 'FONT_7seg', 'FONT_Comic', 'FONT_Default', 'FONT_DefaultSmall', 'FONT_DejaVu18', 'FONT_DejaVu24', 'FONT_DejaVu40', 'FONT_DejaVu56', 'FONT_DejaVu72', 'FONT_Minya', 'FONT_Small', 'FONT_Tooney', 'FONT_Ubuntu', 'GREEN', 'GREENYELLOW', 'HSPI', 'ICON_App', 'ICON_AppIcon', 'ICON_AppMenu', 'ICON_Cloud', 'ICON_Eath', 'ICON_Key', 'ICON_ListOFF', 'ICON_ListON', 'ICON_Machine', 'ICON_Retry', 'ICON_SetMenu', 'ICON_Setup', 'ICON_USB', 'ICON_Url', 'ICON_Wifi', 'ICON_WifiBig', 'JPG', 'LANDSCAPE', 'LANDSCAPE_FLIP', 'LASTX', 'LASTY', 'LIGHTGREY', 'M5STACK', 'MAGENTA', 'MAROON', 'NAVY', 'OLIVE', 'ORANGE', 'PINK', 'PORTRAIT', 'PORTRAIT_FLIP', 'PURPLE', 'RED', 'RIGHT', 'SPRITE_16BIT', 'SPRITE_1BIT', 'SPRITE_8BIT', 'VSPI', 'WHITE', 'YELLOW', 'arc', 'attrib7seg', 'circle', 'clearwin', 'compileFont', 'drawCircle', 'drawLine', 'drawPixel', 'drawRect', 'drawRoundRect', 'drawSwitchBtn', 'drawTriangle', 'ellipse', 'fill', 'fillCircle', 'fillRect', 'fillRoundRect', 'fillScreen', 'fillTriangle', 'font', 'fontSize', 'getCursor', 'get_bg', 'get_fg', 'hsb2rgb', 'image', 'image_buff', 'line', 'lineByAngle', 'orient', 'pixel', 'polygon', 'println', 'qrcode', 'rect', 'resetwin', 'restorewin', 'roundrect', 'savewin', 'screensize', 'setColor', 'setCursor', 'setRotation', 'setTextColor', 'set_bg', 'set_fg', 'setwin', 'sprite_create', 'sprite_delete', 'sprite_deselect', 'sprite_drawGrayMap', 'sprite_select', 'sprite_show', 'text', 'textClear', 'textWidth', 'text_x', 'text_y', 'tft_deselect', 'tft_readcmd', 'tft_select', 'tft_setspeed', 'tft_writecmd', 'tft_writecmddata', 'triangle', 'winsize']

      it will show you the methods for that.
      one of them being "clear"
      so...
      if you do:

      m5stack.lcd.clear()

      you will clear screen.

      AN alternative for dir() is to type the name of the module then a period "." and TAB key
      like this:

      m5stack.TABkey

      I could have just told you to do:

      import m5stack
      m5stack.lcd.clear()

      But i did all that so you can find more interesting stuff by yourself. Remember to check out some basic python tutorials.

      About your error of core2 rebooting... yes that is the RTOS rebooting for a wrong memory access.

      posted in Micropython
      B
      BricoMS
    • RE: Newbie question - how to get started?

      I wanted to add that you should NOT be intimidated by all this micropython, repl, etc.
      It will be coming to you step by step. You are in the right direction by getting your hands dirty and going beyond uiflow.

      Things to take in consideration about your core2:

      • It is based on ESP32 microcontroller
      • Uiflow runs on micropython.
        With just those 2 things you can find a whole lot of answers online. In fact most of my programming time is spend reading forums looking for answers for my questions.

      and of course a lot of this community is eager to help "newbies" so our community grows. So ask away.

      posted in Micropython
      B
      BricoMS
    • RE: Newbie question - how to get started?

      Well...
      I am no pro either but you can start by learning a bit of python. There are tons of videos and books online to get you started.

      For the lcd.clear() i think you have to import lcd or m5stack modules. You can see a list of loadable modules with:

      help('modules')

      and to see a list of already loaded modules you can try:

      dir()

      to load a module you go like this:

      import modulename

      I dont know about MU but give Thonny a try. When running thonny you need to select the interpreter in the options menu as Esp32 generic... i think.

      If some code is trying to access some illegal address or function the rtos will make a reboot of the whole system. That is why you need to learn a bit more about python so you understand how modules are loaded.

      Be patient, read a lot. and ask questions like this one but more precise, that way more people will help you out. The above list is kind of vague and could require a pretty long long answer.

      posted in Micropython
      B
      BricoMS
    • RE: Works with Chromebook?

      And i just tested with the offline UIFLOW Desktp IDE with an intel based Chromebook and it works on linux beta.
      You only need to install libnss3

      posted in UIFlow
      B
      BricoMS
    • RE: Works with Chromebook?

      Yes! the browser version of UIflow (web/cloud) does work on my chromebook.

      What you might experience problems is with the m5burner.
      If you have intel based chromebooks you will be able to run it on crostini/linux beta.

      posted in UIFlow
      B
      BricoMS
    • RE: Separate firmware from M5burner

      @scottknight Hey hi,
      I just changed my chromebook to an Intel based one. But the ARM one did not even run M5Burner.

      So yes... if your CHromebook is Intel processor based, you can run m5burner.

      Thanks for the listing of directories for using the firmware directly with esptool

      posted in UIFlow
      B
      BricoMS
    • RE: Core2 Esptool.py flash fail

      @barbiani
      If you are using this command line:
      esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 460800 write_flash -z 0x1000 esp32-20190125-v1.10.bin

      Change baud 460800 to 115200

      posted in Core 2
      B
      BricoMS
    • RE: Core2 Esptool.py flash fail

      @barbiani
      Try 115200 baud setting with esptool. This should fix it. Flashing will be slower but won't fail.

      posted in Core 2
      B
      BricoMS
    • RE: uPy Module Programming contest?

      Thanks

      posted in General
      B
      BricoMS
    • uPy Module Programming contest?

      I have seen the contests that m5stack has made, the latest i think a photography one.

      Would be great to have a contest to see who comes first with the Micropython Modules so needed for the devices. Like the m5core2 LCD one at least.

      This would increase the code base needed to attract more developers to this platform.

      I was willing to give some gift cards from famous online store or m5stack store credit to anyone coming up with a basic set of modules for the Core2. That would be AXP192, the LCD, SD card, and the Speaker and Mic.

      I do not know if this would be allowed to do by m5stack. Or if the community would be interested

      Please let me know.

      posted in General
      B
      BricoMS
    • RE: can UIFlow export code to arduino code

      Hey! hi,

      No. UIFLOW works with Micropython.

      In fact you are better off doing it from the beginning on Arduino, that is because the libraries are ready available there. And the code runs pretty fast because you dont load all UIFLOW api.

      Think of UIFLOW as a platform to make a proof of concept pretty fast, or to test something on the fly.
      UIFLOW is pretty cool for what it is, but has lots of constrains and not everything is implemented as of now. Also the cloud stuff is pretty mixed up.

      posted in UIFlow
      B
      BricoMS
    • RE: How to do debugging (no screen) ?

      Also you can establish a UART connection with a serial terminal using the UART BLOCKS. There is a UART write block. This is the way I used to debug in arduino.

      posted in General
      B
      BricoMS
    • RE: How to do debugging (no screen) ?

      I would make the led blink different or another color. I do not know if atom lite led is rgb.
      Also maybe the REPL can help.

      posted in General
      B
      BricoMS