About Circuit Playground Express

From Interaction Station Wiki
Jump to navigation Jump to search

Microcontrollers

Computer and processor are generic terms for anything that can run a program, basically.
A controller or microcontroller usually refers to a simple processor that does only one task, like listening to sensors.
In explaining microcontrollers, we’ll distinguish them from computers, which contain more powerful processors that can run an operating system.

Arduino

what is an Arduino?

Arduino is an open source physical computing platform based on a simple input/output (I/O) board and a development environment that implements the Processing language. Arduino can be used to develop standalone interactive objects or can be connected to software on your computer.

Arduino is composed of two major parts: the Arduino board, which is the piece of hardware you work on when you build your objects;
and the Arduino IDE, the piece of software you run on your computer. You use the IDE to createa sketch (a little computer program)
that you upload to the Arduino board. The sketch tells the board what to do.

In the meantime, HERE you can find ANYTHING about Arduino, including download the software

find a detailed introduction here [[1]]

Arduino-uno.png
The pins on your Arduino are the places where you connect wires to construct a circuit (probably in conjunction with a breadboard and some wire. They usually have black plastic ‘headers’ that allow you to just plug a wire right into the board. The Arduino has several different kinds of pins, each of which is labeled on the board and used for different functions.

Adafruit Circuit Playground Express & Blue Fruit

How's that different?


The Circuit Playground Express & Blue Fruit, produced by Adafruit, are microcontrollers, just like the Arduino Uno, but designed for wearable projects.

Thus, is a little different from the normal boards from the hardware side, since the pins go out to those big wide sewable pads, instead of normal pin headers (like on the Uno)

because Circuit Playground Express running on a faster processor compared to Arduino Uno. We can also use it for audio-based projects.
Da1d-ADA-3333-1-0-2-1000x667.jpg4333-10 1024x1024.jpg

CircuitPython & MU Editor

Circuitpython circuit playground adafruit blinka computer.png 17850097.png

Python is the fastest-growing programming language. And CircuitPython is based on Python language but designed to run on microcontroller boards.

CircuitPython is designed with education in mind.

It's easy to start learning how to program and you get immediate feedback from the board.


Before we start we all have to do this to set up:

1. Install or update CircuitPython!

https://learn.adafruit.com/adafruit-circuit-playground-express/circuitpython-quickstart

*1. Click the link below and download the latest UF2 file:
https://circuitpython.org/board/circuitplayground_express/
*2. Plug your Circuit Playground Express into your computer via a (data)USB cable.
*3. Double-click the small Reset button in the middle of the CPX(short for circuit playground express).
 you will see all of the LEDs turn green. If they turn all red, check the USB cable, try another USB port, etc.
 (If double-clicking doesn't do it, try a single-click!)
*4. You will see a new disk drive appear called CPLAYBOOT
  Drag the adafruit-circuitpython-etc...uf2 file onto it.
*5. The CPLAYBOOT drive will disappear and a new disk drive will appear called CIRCUITPY

That's it! You're done :)

2. Installing Mu Editor

Download Mu from(if you are using computers from school, the Mu Editor is already installed)

https://codewith.mu

Circuitpython mu-front-page.png


The first time you start Mu, you will be prompted to select your 'mode' -

you can always change your mind later. For now please select CircuitPython!


Circuitpython Screen Shot 2017-12-24 at 2.55.02 PM.png


Mu attempts to auto-detect your board, so please plug in your CircuitPython device and make sure it shows up as a CIRCUITPY drive before starting Mu

Circuitpython Screen Shot 2017-12-24 at 3.16.23 PM.png

Interacting to the Serial Console

The REPL

The other feature of the serial connection is the Read-Evaluate-Print-Loop, or REPL.

The REPL allows you to enter individual lines of code and have them run immediately.

It's really handy if you're running into trouble with a particular program and can't figure out why.

It's interactive so it's great for testing new ideas.

To use the REPL, you first need to be connected to the serial console.

Once that connection has been established, you'll want to press Ctrl + C.

If there is code running, it will stop and you'll see Press any key to enter the REPL. Use CTRL-D to reload.

Follow those instructions, and press any key on your keyboard.

https://learn.adafruit.com/adafruit-circuit-playground-express/the-repl

Hello world