Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Feather M0 Express!
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Feather M0 Express!

by rpflaum on Wed Apr 26, 2017 9:13 pm

I am seeing the same on my Windows 10 PC on which I installed the Adafruit serial drivers. The Feather M0 Express does not show up as a FEATHERBOOT drive but does show up as a COM port. On a Windows 7 PC THE board shows up as FEATHERBOOT when resetting into boot loader mode.

rpflaum
 
Posts: 6
Joined: Sun Apr 16, 2017 7:01 pm

Re: Feather M0 Express!

by adafruit2 on Wed Apr 26, 2017 9:19 pm

rpflaum, we've found and smooshed a bug on windows with the uf2 bootloader, on your win7 machine where FEATHERBOOT appears, please follow the update procedure

https://learn.adafruit.com/adafruit-fea ... oader-mode

adafruit2
Site Admin
 
Posts: 19395
Joined: Fri Mar 11, 2005 7:36 pm

Re: Feather M0 Express!

by jerryn on Thu Apr 27, 2017 4:31 pm

When I try to download the bootloader update I get:

Code: Select all | TOGGLE FULL SIZE
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>9CEA27943DEB1600</RequestId>
<HostId>
L0Daed3QGnjM7hGFMCcYtRboDoH7yUQriySRBsf/ZJKfKayZ/CrvxC2OkZl+UIVtFjnPMd40tWk=
</HostId>
</Error>

jerryn
 
Posts: 1312
Joined: Sat Sep 14, 2013 9:05 am

Re: Feather M0 Express!

by tannewt on Thu Apr 27, 2017 4:52 pm

Oops! Looks like we have a bug. I uploaded the file here too: <removed see below>

tannewt
 
Posts: 1830
Joined: Thu Oct 06, 2016 8:48 pm

Re: Feather M0 Express!

by jerryn on Thu Apr 27, 2017 7:18 pm

Thanks! The new link worked fine as did the new bootloader.

jerryn
 
Posts: 1312
Joined: Sat Sep 14, 2013 9:05 am

Re: Feather M0 Express!

by rpflaum on Thu Apr 27, 2017 7:21 pm

Okay I updated the boot loader on my wife's Windows 7 machine to the latest v1.2. I then loaded circuit python and tried the blinks demo code. This all worked fine on Windows 7 PC. I then took it to my Windows 10 desktop. I do see the python blinks code executing but I do not see a CIRCUITPY drive. Also when I enter the boot loader mode I do not see a FEATHERBOOT drive.
This is the PC that has the Adafruit Serial drivers and all the Arduino package installed.
I then tried a friends Windows 10 PC with nothing special installed and the Feather M0 Express worked just like it did on my wife's Windows 7 PC. Not good yet!!

rpflaum
 
Posts: 6
Joined: Sun Apr 16, 2017 7:01 pm

Re: Feather M0 Express!

by adafruit2 on Thu Apr 27, 2017 7:27 pm

rpflaum - weird!

well, only thing we can suggest right now is to send you another feather m0. maybe that will help? email support@adafruit a new feather m0 express

adafruit2
Site Admin
 
Posts: 19395
Joined: Fri Mar 11, 2005 7:36 pm

Re: Feather M0 Express!

by dhalbert on Thu Apr 27, 2017 9:30 pm

I think I'm seeing what rpflaum is seeing. I have two Feather M0 Express boards, both originally fine. I had updated both with the first updated bootloader attached to the post here: viewtopic.php?f=57&t=115911&p=580474&hilit=arm7tdmi#p580474. That bootloader worked fine.

Now I just tried <link removed; see below> as given above on one of the M0 Express boards, and the board is hosed in apparently the same way as rpflaum's: no drives appear whether single or double-clicking. There is an "Adafruit Feather M0 (COM3)" in the Device Manager. I tried bossac to upload CircuitPython and it cannot find the port by auto-scan. When I specify COM3 it says "No device found on COM3".

The bootloader you attached and the 1.20.0 one compare as quite different.

I will not attempt the update on my second M0, but I could wire up the SWD pins and reload with openocd or my Segger.
Last edited by dhalbert on Fri Apr 28, 2017 8:16 am, edited 1 time in total.

dhalbert
 
Posts: 401
Joined: Tue Feb 17, 2015 6:18 pm

Re: Feather M0 Express!

by dhalbert on Thu Apr 27, 2017 9:57 pm

Update on my previous post: The problem as rpflaum thought does seem to be due to the Adafruit serial driver.

I tried the M0 Express on Linux and FEATHERBOOT appears. I tried it on a Windows 10 machine without any Arduino or Adafruit drivers installed, and FEATHERBOOT appears. Then I went back to my development machine. In Device Manager, I looked at the COM3 port mentioned above. It was the Adafruit driver. I removed it:

1. Right click on the COM port and choose Uninstall Device.
2. When the uninstall dialog appears, check the box that says "Delete the driver software for this device." and click "Uninstall".

You might remove and replace the USB plug again. Now I get a new COM port that just says "USB Serial Device", using the Microsoft driver. And FEATHERBOOT is back again.

rpflaum, try that.

dhalbert
 
Posts: 401
Joined: Tue Feb 17, 2015 6:18 pm

Re: Feather M0 Express!

by adafruit2 on Thu Apr 27, 2017 10:13 pm

here is another zip of the uf2 bootloader updater for feather m0 in case ya need it. fresh compiled!
Attachments
updateuf2.zip
(7.5 KiB) Downloaded 69 times

adafruit2
Site Admin
 
Posts: 19395
Joined: Fri Mar 11, 2005 7:36 pm

Re: Feather M0 Express!

by dhalbert on Thu Apr 27, 2017 10:37 pm

here is another zip of the uf2 bootloader updater for feather m0 in case ya need it. fresh compiled!


That latest one seems OK. FEATHERBOOT appears regardless of whether or not the Adafruit serial driver is installed. The v1.20.0 one Scott linked to above has a repeatable problem when the Adafruit driver is installed. The driver info says "Adafruit Industries LLC", 11/15/2007, version 5.1.2600.0. (The actual driver is still usbser.sys)

dhalbert
 
Posts: 401
Joined: Tue Feb 17, 2015 6:18 pm

Re: Feather M0 Express!

by tannewt on Fri Apr 28, 2017 3:07 am

Sorry about that folks. I'm not sure why the updater I posted didn't work. I've removed it so others don't use it.

It is important to note that after updating the bootloader you need to reflash CircuitPython. ladyada also did a good livestream about it tonight: https://www.youtube.com/watch?v=WxCuB6jxLs0

tannewt
 
Posts: 1830
Joined: Thu Oct 06, 2016 8:48 pm

Re: Feather M0 Express!

by jerryn on Fri Apr 28, 2017 7:01 am

Just a piece of information. All of the boot loader versions worked on my Raspberry Pi and on my Mac.

I did have a problem on the Mac with recognizing the bootloader drive FEATHERBOOT until I removed the HRNDIS driver which I installed a long time ago, but was not working anyway. Once removed all of the bootloaders worked fine. I have had mixed results with the MAC in the past and this driver may have been why.

jerryn
 
Posts: 1312
Joined: Sat Sep 14, 2013 9:05 am

Re: Feather M0 Express!

by nis_ on Sun Jul 09, 2017 9:02 am

Telemetry.

In the Feather M0 Express.

The NeoPixel is configured to flash messages using differing cadences and different colours, to signal the various system states, alert the user to errors of syntax in their code, and what-have-you.

May I turn that feature off semi-permanently?

I would like to see a .config type file that has an entry to disable the semaphore system presently utilizing the NeoPixel.

That said, since I cannot turn it off, it has, in fact, informed me well, and several times so. It is useful. It's just that I am working on a project, in CircuitPython, that is already visually intensive.


Hadn't once looked at any form of Python, until 30 hours ago.

I was surprised to learn so much in so little time. Now it's fun for me, for a different reason than I had planned (which was essentially to continue to use the Feather M0 Express as an Arduino M0 Pro).

I'm able to change environments simply by dragging and dropping the UF2 file

adafruit-circuitpython-feather_m0_express-1.0.0-rc.4.uf2

When I start Arduino IDE, and upload, it just works. To get back into CircuitPython, I drag and drop the UF2. That's it! Nothing else to attend to, to context-switch.

This thing was well thought-out.

Whatever is written to the SPI flash stays there, in either environment.

The UF2 modifies only the SAMD21G18A 256Kb flashROM:

Code: Select all | TOGGLE FULL SIZE
$1D20 41 64 61 66 72 75 69 74 20 49 6E 64 75 73 74 72   Adafruit Industr
$1D30 69 65 73 00 46 65 61 74 68 65 72 20 4D 30 00 00   ies.Feather M0..
$1D40 00 00 00 00 20 1D 00 00 34 1D 00 00 12 01 00 02   .... ...4.......
$1D50 EF 02 01 40 9A 23 1B 00 01 42 01 02 00 01 00 00   ...@.#...B......
$1D60 3C 21 64 6F 63 74 79 70 65 20 68 74 6D 6C 3E 0A   <!doctype html>.
$1D70 3C 68 74 6D 6C 3E 3C 62 6F 64 79 3E 3C 73 63 72   <html><body><scr
$1D80 69 70 74 3E 0A 6C 6F 63 61 74 69 6F 6E 2E 72 65   ipt>.location.re
$1D90 70 6C 61 63 65 28 22 68 74 74 70 3A 2F 2F 61 64   place("http://ad
$1DA0 61 66 72 75 2E 69 74 2F 33 34 30 33 22 29 3B 0A   afru.it/3403");.
$1DB0 3C 2F 73 63 72 69 70 74 3E 3C 2F 62 6F 64 79 3E   </script></body>
$1DC0 3C 2F 68 74 6D 6C 3E 0A 00 55 46 32 20 42 6F 6F   </html>..UF2 Boo
$1DD0 74 6C 6F 61 64 65 72 20 76 31 2E 32 31 2E 30 20   tloader v1.21.0
$1DE0 53 46 48 52 0D 0A 4D 6F 64 65 6C 3A 20 46 65 61   SFHR..Model: Fea
$1DF0 74 68 65 72 20 4D 30 0D 0A 42 6F 61 72 64 2D 49   ther M0..Board-I
$1E00 44 3A 20 53 41 4D 44 32 31 47 31 38 41 2D 46 65   D: SAMD21G18A-Fe
$1E10 61 74 68 65 72 2D 76 30 0D 0A 00 EB 3C 90 55 46   ather-v0....<.UF
$1E20 32 20 55 46 32 20 00 02 01 01 00 02 10 00 3E 1F   2 UF2 ........>.
$1E30 F8 20 00 01 00 01 00 00 00 00 00 00 00 00 00 00   . ..............
$1E40 00 29 EF BE AD DE 46 45 41 54 48 45 52 42 4F 4F   .)....FEATHERBOO
$1E50 54 46 41 54 31 36 20 20 20 00 00 00 49 4E 46 4F   TFAT16   ...INFO
$1E60 5F 55 46 32 54 58 54 00 C9 1D 00 00 49 4E 44 45   _UF2TXT.....INDE
$1E70 58 20 20 20 48 54 4D 00 60 1D 00 00 43 55 52 52   X   HTM.`...CURR
$1E80 45 4E 54 20 55 46 32 00 00 00 00 00 00 00 00 08   ENT UF2.........

I can access the FAT16 filesys in the Arduino platform, and from CircuitPython (one way or the other) and don't have to re-upload any source code (or datalogger output files, or anything else). The system is well-behaved.

That said, I'm accessing the filesystem out-of-band -- using nautilus under Linux, and using vim:

Code: Select all | TOGGLE FULL SIZE
 $ rvim -n /media/wa1tnr/CIRCUITPY/code.py

Like that. In a shell (no GUI at all). I use nautilus
Code: Select all | TOGGLE FULL SIZE
#!/bin/sh

  exec /usr/bin/nautilus --no-desktop "$@" >/dev/null 2>&1 &

... to go ahead and mount the Feather M0 Express, in the first place.

Then I ignore nautilus and use the shell (the Feather M0 mounts just as expected, on /media/mylogin/CIRCUITPY when the regular-use environment is installed).

Workflow seems optimal.

. . .

Code follows (really, unrelated to the purpose of this post -- a nice side-effect of having to make a post, for me).

Thanks for your consideration.

73, de ARS WA1TNR
https://github.com/wa1tnr
Code: Select all | TOGGLE FULL SIZE
# pulse width modulation -- fader -- LED D13 (PA17)

# Adafruit Feather M0 Express -- Circuit Python 2017 July

# Make a Light-Emitting Diode glow in a constantly-changing
# pattern: from bright to dim, and then again, from dim to bright,
# following a sinusoidal waveform function and utilizing pulse
# width modulation techniques to accomplish the task.

# The attached LED is an emitter of light, but has no control
# circuitry inside its package -- it is not a smart device, and may
# be illuminated simply by passing a DC current through it.

# This program makes up for that, by providing modulation.

# The device is monochromatic -- no provision is made to affect
# the colour, as the device is fixed in (colour) frequency.

# Feather M0 Express

# WA1TNR

# based on materials published by Adafruit.

import digitalio
import board
import time
import neopixel
import math
import pulseio

print('')
print('PROGRAM RUNNING')

np = neopixel.NeoPixel(board.NEOPIXEL, 10) # changing this from 10 to 8 does no harm?
np.fill((5,0,5)) # magenta
np.write()

time.sleep(1)

np.fill((0,0,0)) # dark/black
np.write()

print('Use Ctrl C to break the loop.  Use Ctrl D to reload.')

print('')

# ------------------- pseudo-ADSR -------------------

pwm = pulseio.PWMOut(board.D13)     # output on D13

dimmer = 128 # multiplier

attack = 10 # 10 produces least asymmetrical output

def pulse(t, decay, sustain, fade, halla):
    fades = fade * dimmer
    for i in range(20 * decay):
        pdc = int(math.sin(i / (attack * decay) * math.pi) * fades + fades)
        # if (pdc == 13):
        if (i == 821):
            # --------------
            print(pdc)
            # --------------
            pwm.duty_cycle = 1 # darken the LED
            time.sleep(halla)  # extend the dark time just a bit
 
        pwm.duty_cycle = int(math.sin(i / (attack * decay) * math.pi) * fades + fades)

        if ((i / 10) == int(i / 10)): # to print samples at 1:10 ratio
            jb = 1 # noop

            # --------------
            # print(i, pdc)
            # --------------

        # if (pdc == 65266):
        if (i == 275):
            time.sleep(sustain) # keep the LED on a bit longer at peak brightness

        time.sleep(t) # loop base delay - always present, even in the simplest version of this program

while True:
    # def pulse(t, decay, sustain, fade, halla):
    pulse(0.0001, 55, 1.5001,  255, 2.31)

#        t: time base -- the loop's base-delay (in seconds of civil time)
#    decay: respiration rate (blink rate)
#  sustain: hang time - at apogee (zenith)
#     fade: brightness of LED - gamma - makes the LED much more dim (throughout the cycle)
#    halla: extends excursion to nadir (perigee) that much the longer - longer dark time


nis_
 
Posts: 12
Joined: Mon Feb 13, 2017 9:28 pm

Re: Feather M0 Express!

by tannewt on Sun Jul 09, 2017 2:24 pm

I'm glad you are liking it nis_! When you say you'd like the status pixel off semi-permanently, when would you like it on and when would you like it off? Its pretty easy to turn off with a custom build but I haven't exposed any long-lasting configuration for it yet from CircuitPython.

Thanks!
~Scott

tannewt
 
Posts: 1830
Joined: Thu Oct 06, 2016 8:48 pm

Please be positive and constructive with your questions and comments.