I have some brand new itsy bitsy boards and none of them seem to act like circuitpython is installed. Can I expect to get one of these boards up without terminal connection? I just want to make some leds light for now. So far i have downloaded 10.0.3 and a matching lib and dragged it to the D. It copies, the D window pops up, the dotstar flicks a red/yellow 3 times and then goes away and the R13 starts fast flashing. I can always get into itsyboot mode. Any help will be appreciated. I am new to this platform. I normally use PBP for my simple projects
#itsy bitsy never shows me a circuitpy drive. I see D
1 messages · Page 1 of 1 (latest)
are you dragging the UF2 to ITSYBOOT or something else?
which board is it, and what is the exact name of the UF2?
Dragging it to the D once I enter boot
I cannot find a clear description of the dotstar and R13
adafruit-circuitpython-itsybitsy_m0_express-en_US-10.0.3 (2).uf2
itsy bitsy M0 Express
I'm not sure what you mean by R13. Do you mean the red LED next to the reset button?
yes
On Windows, a number of utility programs can interfere with copying to the BOOT drive. See https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting#windows-explorer-locks-up-when-accessing-boardnameboot-drive-2999180 and following to see if you have anything installed that might be interfering. If you have a non-Windows machine (even a Raspberry Pi), you could try that. Or try some other Windows machine, assuming they don't have the same utility programs.
Samsung Magician is a common problem.
I have a MS surface. no 3rd party antivirus or odd ball things. Mostly used for Fusion
I did plug it into a win7 machine with the same result. But I did not try installing cirpy on that one
If the LED is fast flashing, that usually means the bootloader thinks there is a problem with the USB connection.
The boards don't come with CircuitPython installed. They have an Arduino test program, probably one that makes swirly colors on the DotStar.
adafruit advertises they are installed with circuitpython
I haven't gotten a new one in years, so maybe 🙂
I did just install 10.0.3 succesfully on one of mine
I have a second board of the same type that does a two blink red on the dotstar and no red led. same everything but different board
make sure the UF2's you downloaded are OK. Check the sizes of what you have. It looks like you have 3 copies of the UF2
does a COM port appear after copying the UF2?
yha I have been fighting this all week. Downloaded several times. Tried to use chat and grok. They are clueless
do I need to use a terminal with this for simple applications?
no, but a terminal is very helpful to figure out what is going on. I like the Tera Term terminal emulator.
look in Device Manager -> Ports and see if a COM port appears
the com always shows after I do the drag. Pops up as D
what pops up as D?
after uf2 drag and drop
what is the name of the D: drive?
No name I have never seen circuitpy
but there is a D: drive?
yep
or is it just ITSYBOOT again?
no D with lib and 2 other files
then you have CIRCUITPY, the name is just not visible. What editor are you planning to use?
it has installed. There is a really old test program on the board that is not compatible with 10.0.3
in particular, the libs in /lib are too old and will fail to import
you are succeeding
MU
I am at 10.3.0
10.0.3 is incompatible with what came on the board from the fatory
just erase that program and start fresh
in the terminal window, you can type:
>>> import storage
>>> storage.erase_filesystem()
There itsy bitsy M0 Express is linked to 10.3.0
that will clear out what's there and give you a "Hello World" program
so they are pushing a bad version from the itsy bitsy page
no, it's not bad at all, it's just way newer than the version that the board came with
it's like 5 years newer
wow I just ordered these!
what's on the board is just a test program, written in like CircuitPython 1 or 2 or 3
we don't update the testers every time we update CircuitPython
I don't have Mu installed yet. So I will do that
just forget about what's there, it's not important. You already installed a newer version.
so I am good there?
yes, I don't know why CIRCUITPY is not showing, but it might show up after you do the storage.erase_filesystem() above
ok I will do so in the morning and let you know how it goes. Thank you so much for taking time!
Try this really simple program in the morning:
import board
import digitalio
import time
led = digitalio.DigitalInOut(board.LED)
led.switch_to_output()
while True:
led.value = not led.value
time.sleep(0.5)
When D pops up on the one board that Mu detects I see this
i put your test in a doc using new text document and I removed the e from the existing python file so it would be ignored and I get the blinking red light of death
I guess they have some code in Thonny thats included. I have not looked into that.
The program blinks the red LED every half second, so maybe you are seeing the program working
the board is double blinking the dotstar red every 5 seconds. Changing the .5 value in your test code did not effect the led
I did not realize you were using Thonny. There is a bad interaction between Thonny and SAMD21 boards which can cause crashes. See https://github.com/adafruit/circuitpython/issues/8038. Try Mu instead.
Thats how the boards were delivered. I was removing that file and making a text file called code.py but it breaks it everytime
This could also be due to an error in the program. What do you see in the Serial window?
it will give you error messages and line numbers
Did you see the guy retired Mu? Still availible but unsupported. The version I got for Win does not have the easy buttons. I guess I need to learn scripts or something?
which version did you install? It's retired, but it still works. There should be a "Serial" button. You can also use Tera Term or Putty. I like Tera Term better: it reconnects after disconnects.
I am beginning to feel that itsy bitsy is a loser. Is there a more reliable hardware for me to learn and use? I need something small like itsy bitsy. I am going to mate it with a custom pcb.
Remember your helping a dummy 🙂 I don't know where to start with the terminal. This is what I see
what happens when you "Press Any key"? You should see a >>> prompt. You can press ctrl-D at that point to re-run code.py. What is printed when that happens?
Use screenshots or copy/paste the text. The latter is a little easier because we can copy/paste parts of it back.
You might find this video helpful: https://www.youtube.com/watch?v=1rkM0Ow8Pkc&t=107s
it's old but mostly still relevant
I plugged in a 3rd new itsy with yet a different result. Above is how windows handled the device. I do not get a drive letter or name popup
I have watched this. The problems I am encountering seem not to be standard.
Here is how the device was configured by windows11.
Device SWD\MMDEVAPI\MIDII_395E647D.P_0000 was configured.
Driver Name: c_swdevice.inf
Driver Package ID: c_swdevice.inf_amd64_845d51425d14f98b
Class GUID: {62f9c741-b25a-46ce-b54c-9bccce08b6f2}
Driver Date: 06/21/2006
Driver Version: 10.0.26100.1
Driver Provider: Microsoft
Driver Section: SoftwareDevice
Driver Rank: 0xFF3000
Matching Device ID: SWD\GenericRaw
Outranked Drivers:
Device Updated: false
Parent Device: USB\VID_239A&PID_8012&MI_04\8&386ef02e&0&0004
reboot itsy and something different happens,
The board presents as HID, MIDI, etc. I am wondering if you have a stray driver on Windows that is sometimes causing issues. But we need to try some things with me giving you instructions. When you are in front of the computer with the board, let me know.
start up the board and get into Mu and start the terminal window in Mu
I am here now
I am using a 3rd virgin board from adafruit. It behaves the same on a win 11 and a win 10 machine. Mu sees a new python board but will not communicate with it
yes
ok, so when the fresh board is plugged in, what do you see? Did you already try to load CircuitPython on the board/
or is it absolutely fresh?
It is a board preloaded with circuitpy. I bought 10 or 15 from adafruit for a project I am working on. The board in connected a to windows 11 surface. The dotstar is fading green pulse
it took a few reboots of itsy and now this shows in Mu,
This was no connecting on first couple boots
ok, that is an anicent version of CircuitPython. double-click to get the ITSYBOOT drive.
i am following along on a Win11 machine with an Isty plugged in
I wonder why they shipped such old stuff? I just purchased these a couple weeks ago from adafruit
we don't update the board testers everytime we update CircuitPython. These may have been manufactured and bagged some time ago.
Will they be reliable for me to learn on? BTW, my dotstar is now full RGB. kinda a bright whitish purplish color solid
yes, they will be fine. The CircuitPython on the board is just a test program for factory test
so double-click reset to get ITSYBOOT. I see
I suggest you turn on "Show Filename extensions" in Windows Explorer
is this Win10 or Win11?
(from an Internet image)
(dont' turn on "Item check boxes")
copy the 10.0.3 UF2 to the ITSYBOOT drive
win11
Forgive me, I am not knowledgeable with this. I was of the impression itsys was shipped with circuitpython ready to roll? Why do I have to install it again? And why not the 10.3.0 they link to on the page?
(it's 10.0.3, not 10.3.0). We update CircuitPython every few weeks, and there are major versions about every year or more frequently. We don't set up boards before shipping. They are tested when manufactured and then bagged and placed in stock.
just like your cellphone or tablet might be one or more versions behind
Are you part of Adafruit?
ahh! Cool! Explains your patience with boneheads like me! haha thank you
I am coming from a PBP world and I am not a supper coder with basic haha. I do make things work but am not high level. Always learning. I am hoping this enviorment will allow me to do more things without the heavy lift of asm and C.
what is pbp
Its a basic compiller for the microchip pics.
ok, got it 🙂
I have done some DC motor controls and timer stuff for products and equipment I design for a music company.
I am just lost when it comes to deep windows and scrips ect;
Well, I suggest you show file extensions because it makes it a lot easier to understand the actual filename of a filename.
It's the first change I suggest for any windows user
Got it
could you take a screen shot of the left sidebar of an explorer window that shows C: and D: drives?
ok, great, so drag the 10.0.3 UF2 file to the ITSYBOOT drive
I guess Mu gets disconnected when boot mode is active?
right
so did you drag the first uf2 to ITSYBOOT?
yes
ok, now in that window, at the >>> prompt, type
import storage
storage.erase_filesystem()
I should get rid of Thonny
do not have Thonny open
the board will reset itself and restart. Unplug it and plug it back in, just to make things fresh.
we erased CIRCUITPY and re-created it fresh.
do you have like a guide for dummies that shows the basic commands and their purpose? I do not know about these calls or whatever we are doing. circuitpy for dummies?
no, more related to the basics needed to get any of the adafruit boards up and going. I do know know command prompt and script stuff. The terminal scares me
which terminal, the terminal in Mu?
I get the basic idea of circuitpython and think its awesome for what I want to accomplish. I just don't understand what I have been doing . I have boards that all boot differently in the same machine. If I bricked them can I recover?
they are not brickable, in general
just do with the other boards what you just did here. Double-click to ITSYBOOT, copy the UF2, then do the
import storage
storage.erase_filesystem()
in the terminal window, type ctrl-C if necessary, or type "any key" to get to the >>> prompt to type that
you are typing Python at the >>> prompt. YOu might want to install "regular" desktop Python and play with it, and maybe go through a Python tutorial.
is those considered scripts? or command lines? where is the import source for that above?
storage is built into CircuitPython. It is not a library you need to put on the board. import can import something "native" to CircuitPython, or can import code files.
I suggest you familiarize yourself with regular Python a bit and then move on to CircuitPython.
Depending on your learning style, you may want to read a book and try its examples, do an online course, watch videos, etc.
so the entire circuitpython and any libs I copy all live in some memory and can be loaded into the working memory of the micro by using the commands you are showing me? Or did I totally fubar that? haha
Is it a stretch to believe I can do come simple programs for itsy without deep diving?
CircuitPython is "just another program" that is installed on the micro. It presents the "Read Eval Print Loop", which is the >>> prompt. It also runs a program called code.py on startup
try following along with the video I pointed you to. DId you read the the "Welcome to CircuitPython" guide? There is going to be a learning curve, but you can handle it.
besides what is built into circuitpython itself, you write programs that are .py files. you can import those: they get compiled into "bytecodes" and run by the CircuitPython interpreter that is part of CircuitPython. .mpy files are compiled versions of .py files. Libraries are usually .mpy files
Please read the Welcome guide carefully.
ok
i think ti would be worth starting with regular Python so you get the hang of basic Python syntax, print statements, etc.
i gave you a link above, and some websearching for python tutorials, etc. will give you a wealth of choices.
there are probably plenty of books at hte library, too. Make sure they are for Python 3, not Python 2
You have been generous with your time! Thank you. I have never been a dos guy or hammering C using notepad like some of the smart friends 🙂 I believe I understand what I have studied regarding the simple code.py examples I looked at on the web. I just don't get the overall structure under the who thing. I honestly was hoping not to have to go into that place 🙂 In thorey if I have a healthy itsy board prepared as you have shown me I could make a simple code.py file with a text editor or in Mu and make lights blink. Is that reasonble? And then longer term learn up some on Python for a more endepth learn.
Here is a really simple program I posted above that you can put in code.py that will blink the red LED:
import board
import digitalio
import time
led = digitalio.DigitalInOut(board.LED)
led.switch_to_output()
while True:
led.value = not led.value
time.sleep(0.5)
the Welcome guide will tell you how to enter and save this program
this will do a Copy of the text in in the box:
hover over the box
I was able to copy/past
yha it copies but does not paste outside discord
you can also just type that into the repl
humm
try copying twice
why don't you try typing it. That will get you learning the names
the tab key will indent. Note that indentation is necessary in Python for things in if and while statements.
Oh, should my itsy now be slow blinking green on the dotstar?
yes, that is correct, a short blink every 5 seconds or so.
it tells you CIrcuitPython is alive
ctrl-C stops a running program and gets you back to the >>>
it that part of the loader or is that running from code,py copied onto my itsy?
>>> is part of CircuitPython.
regular Python has the same thing. That's why I encourage you to get familiar with desktop Python. All intros to Python will explain that.
Try 2+2 at the >>> prompt
try print("Hello")
i have to stop soon
4!
whew 🙂
so thats the itsys micro doing the compu?
yes, CIrcuitPython takes the "2+2", compiles it, runs it, and prints the result
this is not like PBP where you are writing code in an editor on the host and it spits out and loads machine code on the micro. This is running on the micro
yes
brain just exploded
Wish I had started this when i was young! Harder for us old farts to get the brain focused
you can learn it! just find the best materials for your learning style
Honestly the marketing presentation on Adafruit strongly implies this is a easy lift into programming microcontrollers and now it looks a little misleading in its presentation 🙂 Have you read the sales pitch?
it's easier than arduino
It does literally suggest just edit the code.py file and run your own sode. When I plugged in my first itsy I feel deep into failure world :/
if you were used to regular BASIC instead of PBP I think it would seem familiar.
don't give up, you'll get it
i have to go to lunch
I do basically get the python syntax. But how the enviorment needs to work is confussing to me. like you point out, PBP is pretty much right out on the table to see. So long as the chip flashes thru MPLABS proprietary programmed it all works.
thanks again sir!
looking at the simple blink code. I would think it loops forever but it runs to the end according to Mu message
So Dan! You manage to get me at a point now where I can change your example blink rate. Thank you. From here a parallel journey starts for me.
I am also curious if I can simply drag new libs into the D:/LIB Like for DotStar use
yes, see this page about adding libraries: https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries and also https://learn.adafruit.com/welcome-to-circuitpython/library-file-types-and-frozen-libraries
a library may be a single .mpy file, or it may be a folder containing multiple other files. If it's a folder, drag the whole folder into lib. Do not take the .mpy files out of the folder.
what is the trick if after dropping the uf2 onto the drive and calling import storage
storage.erase_filesystem() I can no longer connect with Mu serial?
It may have switched to a different serial port or realized it lost the connection. Try choosing the board in the lower right margin of Mu, or restart Mu. Or just try clicking the Serial icon to close the window, and then click again to reopn
The likelyhood of me bricking one of these?
What should the lib folder contain at minimum for using gpio and dotstar hardware? My lib folder is empty.
wondering how the blind program works without adafruit_io.mpy?
I am confused as to why the button on the Itsy M0 page takes me to v 10.1.0 and you have me use 10.0.3?
The page https://circuitpython.org/board/itsybitsy_m0_express/ has a stable release and an unstable development release.
digitalio.DigitalInOut is built in. it does not need something in lib/. On the board page linked above, see "Modules included in this download".
for dotstar, you need adafruit_dotstar.mpy. adafruit_pixelbuf is already built in (there is a python version and a built-in version. Most boards have the built-in version.) See https://learn.adafruit.com/introducing-itsy-bitsy-m0/circuitpython-dotstar for an example.
i don't know what the "blind program" you mean is. adafruit_io.mpy is for IoT, which this board can't do (no wifi).
sorry blink, not blind
got it, so anyway, you don't need adafruit_io.mpy. That's not general IO, it's for https://io.adafruit.com
Why do I get sent to 10.1.0 from the itsy M0 link? I just need to understand how to know compatibility with the different adafruit boards.
I also am having a issue with the REPL not working anymore once I have blink working.
That is the same page I am looking at. Use the download link for 10.0.3, not 10.1.0-beta.0.
When the program is running, you can't use the REPL at the same time. You can interrupt the program with ctrl-C in the Serial window
I have been reading thru the documentation on Aadafruit. Some of these details seem not to be mentioned. Or I am missing them perhaps? ctrl certainly fixed that issue! Thanks
I should always use the latest stable version I guess?
If there's something useful in the development version, you can use it. Usually it is not horribly broken, especially if it's a beta, as opposed to an alpha.
but it's fine to use the stable version too. Use the dev version if you need something new in it, or you feel like testing.