🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Arduino on linux with m5Stack

    Arduino
    4
    5
    11.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mwieder
      last edited by

      There are good how-to docs for Windows and OSX, but not for linux, so...

      Finally got around to starting to play with that m5stack thing I picked up at the last Maker Faire. Since my main system is linux Mint 19.1 I figured this would be straightforward.
      Not exactly. No docs for linux, so I'm on my own.

      So... since linux isn't supported (and the EasyLoader program is Windows-only) I've been carefully cobbling together a system to deal with it.

      The actual url to install in Additional Boards Manager URLs is
      https://dl.espressif.com/dl/package_esp32_index.json

      There's a linux usb-to-serial driver here:
      https://docs.m5stack.com/#/en/quick_start/m5core/m5stack_core_get_started_MicroPython

      After running make the file seems to compile properly.
      Then after reading the CP210x_VCP_Linux_4.x_Release_Notes.txt file I see I need to install the driver separately. Compiling and running the example file also seems to work properly using the port at /dev/ttyUSB0. So far so good.

      The M5Burner on that same web page does work, but I'm still having problems with the Arduino IDE. Compiling code errors out with the messages

      File "/home/mwieder/.arduino15/packages/esp32/tools/esptool_py/2.6.1/esptool.py", line 37, in <module>
      import serial
      ImportError: No module named serial
      Multiple libraries were found for "SD.h"
      Used: /home/mwieder/.arduino15/packages/esp32/hardware/esp32/1.0.2/libraries/SD
      Not used: /home/mwieder/Downloads/arduino-1.8.9/libraries/SD

      OK - turns out that enabling verbose debug messages in Preferences also shows

      Pyserial is not installed for /usr/bin/python. Check the README for installation instructions.Traceback (most recent call last):

      ...and thus my introduction to python wheels. So downloading the latest pyserial wheel and then

      pip install wheel
      pip install pyserial-3.4-py2.py3-none-any.whl

      resulted in a successful compilation and upload in the Arduino IDE.

      Hope this helps someone out.

      ajb2k3A 1 Reply Last reply Reply Quote 2
      • ajb2k3A
        ajb2k3 @mwieder
        last edited by

        @mwieder Thank you for shareing this.

        UIFlow, so easy an adult can learn it!
        If I don't know it, be patient!
        I've ether not learned it or am too drunk to remember it!
        Author of the WIP UIFlow Handbook!
        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

        1 Reply Last reply Reply Quote 0
        • T
          Trackskills
          last edited by

          Thank you so much !

          1 Reply Last reply Reply Quote 0
          • lukasmaximusL
            lukasmaximus
            last edited by

            thanks @mweider and sorry you had to struggle so much. I've had a linux setup tutorial for uiflow I made a while ago which wasn't complete sitting around on my desktop for a while, some things are a little out of date on it but I'll try to get it up at some point for the sake of others.

            I wanted to check with you whether you had to add the device to the dialout group with this command:

            sudo usermod -a -G dialout $USER

            I was told it was necessary, didn't work for me. Even though I had installed the drivers
            and run this command, I still had to chmod the /dev/tty directory before I could connect to the device over serial. Perhaps we could set up a seperate forum board specifically for linux users. What do you think?

            1 Reply Last reply Reply Quote 0
            • ajb2k3A
              ajb2k3
              last edited by

              Scratches Head and gets a splinter
              Is the install creating the symlink device?
              Sometimes I had issues with hardware in ubuntu and raspbian and had to manually create the link which then links back to ttyUSB0.

              UIFlow, so easy an adult can learn it!
              If I don't know it, be patient!
              I've ether not learned it or am too drunk to remember it!
              Author of the WIP UIFlow Handbook!
              M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post