I'll use MSC USB drive support for user-writable config file

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
dhalbert
 
Posts: 401
Joined: Tue Feb 17, 2015 6:18 pm

I'll use MSC USB drive support for user-writable config file

Post by dhalbert »

One reason I'm excited about CircuitPython is its USB MSC (mass storage controller) support, which makes the microcontroller board appears as a disk drive when plugged in to a computer. Of course, this makes development very fast, since the program appears as a regular file: no prep or explicit download is required.

But another thing I really like is that it is now very easy to add configuration files which are read by the main program and can be altered by the user. For example, I'm building a box for someone that will map foot-switch presses to mouse and keyboard events. Ideally, these mappings shouldn't be hardwired into the program: the user should be able change and add to them. I could implement some tedious UI via the buttons to do this. Or the main Python program itself could be changed. But instead the Python program will just read a simple local text file describing the mappings. My end user will be able to edit that file easily because of the MSC support, and won't need to know any Python to change the mappings. And I won't have to implement anything extra to make this user configuration possible.

I encourage you to think along these lines if you have not already. Make your Neopixel timing settings be settable, or the text you're displaying be changeable, or whatever. You can embed those settings in the program, but you can also read them from a separate file, and then they're even easier to change.

User avatar
tannewt
 
Posts: 3304
Joined: Thu Oct 06, 2016 8:48 pm

Re: I'll use MSC USB drive support for user-writable config

Post by tannewt »

Sounds like a great idea! Let me know if you need any additional support for it.

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”