element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Summer of Green Tech Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Summer of Green Tech Design Challenge
  • More
  • Cancel
Summer of Green Tech Design Challenge
Blog Cool Wave - Setting up the Seeeduino XIAO
  • Blog
  • Forum
  • Documents
  • Leaderboard
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Summer of Green Tech Design Challenge to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Alistair
  • Date Created: 17 Sep 2023 7:25 PM Date Created
  • Views 1676 views
  • Likes 8 likes
  • Comments 1 comment
  • summer of green tech design challenge
  • Xiao
Related
Recommended

Cool Wave - Setting up the Seeeduino XIAO

Alistair
Alistair
17 Sep 2023
Cool Wave - Setting up the Seeeduino XIAO

At the heart of the Cool Wave project will be using the Seeeduino XIAO microcontroller module (Seeed Studio XIAO SAMD21) as the main controller. This is not a device I have used before, but as a device that can run MicroPython or CircuitPython, and is smaller than 20mmx18mm, it has been on my “to play with” list, and this is a great opportunity to do just that.

For this project I intend to use MicroPython as I am experienced in using it for embedded projects, and it is familiar to many others wanting to use my code. As often happens with progress, the once great installation instructions become outdated and no longer work, and that is the case for the Seeeduino XIAO MicroPython installation instructions. As a result I had spent a while working through the issues and am documenting this how to for anyone else wanting to install MicroPython and the Thonny IDE.

  1. First download the latest MicroPython firmware. For the Seeeduino XIAO this can be downloaded from https://micropython.org/download/SEEED_XIAO_SAMD21/ . At the time of writing the latest release is v1.20.0 (2023-04-26) and this seems to work well. Download the DF2 file and have it ready for later.
  2. Next plug the Seeeduino XIAO and wait while your computer does it’s thing and install any drivers. Technically we do not need these drivers yet, but they will be needed eventually, and interrupting now can cause delays in the next step. Just chill for a half a minute and everything will be fine.

  3. When the device is plugged in and everything has settled down we first need to put the Seeeduino XIAO into DFU bootloader mode. Using a small length of wire we short out the two test pins next to the module’s USB connector twice. These are on the top and the opposite side of the connector to the LEDs. We just need to tap them a first time, and then quickly tap them again. If successful the green and orange LEDs will light and a new drive will appear on your computer. If not then just double tap again. I have made a video showing the process.
    You don't have permission to edit metadata of this video.
    Edit media
    x
    image
    Upload Preview
    image


  4. By magic a new drive should have appeared on your computer. Now copy the UF2 file to this new drive. After it has copied the Seeeduino XIAO will automatically reboot and install the firmware. This will take seconds and then the hardware is ready to use.

  5. I now recommend installing Thonny from https://thonny.org/. Other development IDEs are available, but this is a simple and well supported front end that will get you going. You can always migrate to something more substantial in the future. After installation select “Options…” form the “Tools” menu, and then select the “Interpreter” tab. Select “MicrPython (generic) for the interpreter and “<try to detect port automatically>” for the port.

  6. Now let's run some test code. Select “New” from the “File” menu, and copy this example code from the Seeed wiki).

    from machine import Pin, Timer
     
    led = Pin(18, Pin.OUT)
    Counter = 0
    Fun_Num = 0
     
    def fun(tim):
        global Counter
        Counter = Counter + 1 
        print(Counter)
        led.value(Counter%2)
     
    tim = Timer(-1)
    tim.init(period=500, mode=Timer.PERIODIC, callback=fun)


    Then select “Save as…” from the “File” menu and press the “MicroPython Device” button. You now need to enter a filename. “blink.py” would be a good choice. Once saved click the green play button and the blue LED should start flashing.

So, well done, you have a flashing LED. More importantly you have a working MicroPython environment that you can copy code into, or create your own.

  • Sign in to reply
Parents
  • ntewinkel
    ntewinkel over 1 year ago

    This is really good! People underestimate the importance of the flashing LED "hello, world!" type of application Slight smile

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • ntewinkel
    ntewinkel over 1 year ago

    This is really good! People underestimate the importance of the flashing LED "hello, world!" type of application Slight smile

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube