CPX IDEs - Is this right? [RESOLVED]

Play with it! Please tell us which board you're using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
UncleMoki
 
Posts: 63
Joined: Thu Nov 03, 2016 8:12 pm

CPX IDEs - Is this right? [RESOLVED]

Post by UncleMoki »

Working with the CPX for a few hours and I think I finally got it working with both the MakeCode and Arduino IDEs because I'm able to upload Arduino sketches and udf2's from MakeCode. However, the CPX doesn't seem very stable and I suspect some kind of driver issue because after just about every upload from either IDE, I lose connectivity to the CPX - the CPX doesn't show on any COM ports and the CPLAYBOOT drive disappears. Doesn't always happen but happens often. Sometimes I get a Widows notification message about a problem with the last USB device connected. Sometimes, I can double-click reset on the CPX to get the green-ring and then the CPLAYBOOT drive and COM ports appear again. But sometimes, I double-click reset on the CPX and get a red-ring and have to reboot the computer or move the CPX to a different USB port to get the CPX to show-up again. I know CPX is still a work in progress so I wanted to ask ... is this normal?

Environment
  • Win10 Ent, 64-bit, Intel i5, 4GB RAM
  • Arduino IDE 1.8.3 (not from the Windows Store)
Board Packages
  • Arduino AVR Boards 1.6.19
  • Arduino SAMD Boards (32-bits ARM Cortex-M0+) 1.6.15
  • Adafruit SAMD Boards 1.0.18 (I select CPX from this board package)
Libraries
  • Adafruit Circuit Playground 1.6.8
  • Adafruit SleepyDog Library 1.1.1
Notes:
  • My CPClassic works fine.
  • I tried installing the adafruit_drivers but it did't help so i removed them.
  • Device Manager is clear.
  • I removed two libraries from C:\Program Files(x86)\Arduino that seemed to be getting in the way during compile ... the verbose compiler had found multiple Adafruit_CircuitPlayground.h and was opting to use these instead of the ones I had placed in the libraries folder in my sketchbook location. Not sure if the libraries were important or why the Arduino IDE kept using them when the ones I wanted were in my sketchbook location. The two libraries were...
    ...arduino_791528
    ...arduino_879456
Last edited by UncleMoki on Tue Aug 01, 2017 12:19 am, edited 1 time in total.

User avatar
UncleMoki
 
Posts: 63
Joined: Thu Nov 03, 2016 8:12 pm

Re: CPX IDEs - Is this right?

Post by UncleMoki »

Gave it another shot and it looks like I just misunderstood how the CPX (Circuit Playground Express) works. Hopefully this follow-up helps someone:
  • "Boot Loader" Mode Is Normal - green NeoPixels and red pulsating LED means the CPX is waiting to be programmed.
  • Double-click the reset button to put it into "boot loader" mode.
Arduino IDE
  • On each upload, the board enters "boot loader" mode automatically.
  • The CPX only appears as a drive for the brief time I'm in boot loader mode. The drive disappears after upload completes.
  • If I try to manually enter boot loader mode before upload, the CPX moves to a different COM port.
Thanks to these videos from Tony D, I get how Makecode and CircuitPython work with CPX ... and I think I'm going to like Circuit Python better than Arduino IDE, at least for CPX ... the interactive aspect is great for experimenting, debugging, etc.:
Circuit Playground Express & Windows 10: Make Code & CircuitPython usage with Tony D!
https://www.youtube.com/watch?v=FD5lkDypVSo
Makecode
  • In "boot loader" mode, CPX shows as a drive called "CPLAYBOOT". Copy "uf2" file to this drive to program.
  • After program uploads, your program runs. You are no longer in "boot loader" mode and the "CPLAYBOOT" drive disappears.
Circuit Python (on Windows 10)
  • Visual Studio Code is a good editor (looks like it might have a serial monitor debugging extension ... interesting)
  • Use Putty terminal to interact with CPX
  • Windows S users will have a hard time finding useful editor and serial terminal app in the App Store.
CircuitPython & ChromeOS: Introduction to Circuit Playground Express with Tony D!
https://www.youtube.com/watch?v=B-PfKv7DCbc
  • Used this video to see the CircuitPython demo since the demo in the previous video didn't work.
  • Slight change to syntax to get it to work: button_a.switch_to_input(pull=digitalio.Pull.DOWN)

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

Return to “Circuit Playground Classic, Circuit Playground Express, Circuit Playground Bluefruit”