Skip to main content

Captain's Log: Progress Report

Learning Python Log

So I can see how I grow because the code doesn’t always show everything I’ve done

Wed 11/11/20

My first day starting to learn Python. Just watched a few intro to Python lectures on YouTube.

Thurs 11/12/20

https://learn.adafruit.com/adafruit-pybadge?view=all#overview

Went through the introductory website for the PyBadge. Got Mu working after I couldn’t figure out Sublime Text Editor. Figured out how to update the firmware and load MakeCode games. Loaded up the intro code to blink the LED. “Hello World”. See 1_One.mp4. Learned what libraries and neopixels are. Found some introductory codes within the libraries: led_animation_rainbow_animations.py was very helpful. See 2_Two.mp4. I managed to get the Neopixels working and I could control the PyBadge through Mu. But I didn’t get any of the buttons working. Created RainbowChase1.py

11/12/20 Notes

  • To get into bootloader mode, hit the hard reset button on the back of the PyBadge.
  • Neopixels are at D8 on the Pybadge
  • Learn more about the NeoPixel coding here = https://learn.adafruit.com/adafruit-neopixel-uberguide/python-circuitpython.

Friday 11/13

Today’s goal was to get the buttons working. I tried using the PyBadge Conference Badge project code: https://learn.adafruit.com/pybadge-conference-badge-multi-language-unicode-fonts/setup. Then I wanted to get and Start and Select working doing something. Needs neopixel.mpy library. Looked over the code a lot to figure out how the Neopixels worked alongside the button pressing. Took the LED parts of the PyBadge Conference Badge code and turned it into Rainbow Chase 2 (RainbowChase2.py). Tried to use this to help: https://learn.adafruit.com/blinka-jump-pybadge-game/coding-the-pybadge. But it was confusing for my current level of knowledge

Figured out

  • lines 31-35 are variables
  • lines 78-105 was studied a lot to understand how the neopixels turn on and how the buttons work
  • Added lines 106-111. Figured out how to alter NEOPIXEL_COUNT and figured out that it’s a variable.

But then was really struggling how to limit the issues. I didn’t know how to set a limit and kept getting a “list index out of range solution” error. Tried a bunch of fancy ways to limit the variable. Figured out that I could just use the limits on lines 102 and 104....only after I realized that “speed” and “brightness” were also variables being controlled. Created RainbowChase2.py. Watch 3_Three.mp4.