Random Values and Non Repeating Randoms in CircuitPython

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • In this lesson we explore the most useful functions in the Python random library, including randint, randrange, and choice. We'll use what we learn to randomly sparkle a CircuitPlayground using CircuitPython, and we'll then learn to use a while loop to prevent any values from being repeated. We'll end by showing how you can use the code you've just written to create a holiday ornament by adding just a few more low-cost parts.
    Part of Prof. John Gallaugher's STEMEducation curricula in his University Course: Physical Computing: Art, Robotics, and Tech for Good. For full playlist see: bit.ly/circuit...

Комментарии • 2

  • @christopherlyons7613
    @christopherlyons7613 Месяц назад

    Do you know any way to allow CircuitPython programming on an iPad? Adafruit does have a doc talking about iPad use but that only deals with sending code to a connected device (CPE I believe in the doc). It doesn't address actually programming it nor getting access to the REPL. Are you aware of any IDEs that run on the iPad that would allow direct programming with REPL I/O (most interested in CPB use to start)?

    • @profgallaugher
      @profgallaugher  Месяц назад +1

      It's possible to upload any file from an iPad to a CIRCUITPY board, but the problem as you say is getting a full IDE that can do things like code completion & error correction. There are web-based IDEs. You might try: urfdvw.github.io/circuitpython-online-ide-2/ which is a project by River Wang. There's also a beta of an Adafruit WebIDE but I haven't done anything with it: learn.adafruit.com/webide/overview I doubt anything will be as robust as you'd get with a computer-based IDE. Good luck!