售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
About Packt
Why subscribe?
Packt.com
Contributors
About the author
About the reviewers
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Get in touch
Reviews
Getting started with MicroPython
What is MicroPython?
What is a microcontroller?
What is CircuitPython?
What is the Circuit Playground Express?
Where to buy
References
Flashing the microcontroller firmware
Getting ready
How to do it...
How it works...
There's more...
See also
Executing your first program
Getting ready
How to do it...
How it works...
There's more...
See also
Using screen to access the REPL
Getting ready
How to do it...
How it works...
There's more...
See also
Using Mu to access the REPL
Getting ready
How to do it...
How it works...
There's more...
See also
Executing commands in the REPL
Getting ready
How to do it...
How it works...
There's more...
See also
Using the auto-reload feature
Getting ready
How to do it...
How it works...
There's more...
See also
Updating the CircuitPython Library
Getting ready
How to do it...
How it works...
There's more...
See also
Controlling LEDs
The Adafruit Circuit Playground Express layout
Turning on the pin 13 LED
Getting ready
How to do it...
How it works...
There's more...
See also
Setting the brightness of the NeoPixel
Getting ready
How to do it...
How it works...
There's more...
See also
Controlling the color of a single NeoPixel
Getting ready
How to do it...
How it works...
There's more...
See also
Displaying an LED color using the RGB and hex code
Getting ready
How to do it...
How it works...
There's more...
See also
Setting an LED color using color names
Getting ready
How to do it...
How it works...
There's more...
See also
Setting all NeoPixels to the same color
Getting ready
How to do it...
How it works...
There's more...
See also
Setting a range of NeoPixels to one color
Getting ready
How to do it...
How it works...
There's more...
See also
Generating random NeoPixel LED colors
Getting ready
How to do it...
How it works...
There's more...
See also
Creating LED animations with random colors
Getting ready
How to do it...
How it works...
There's more...
See also
Creating LED animations with rainbow colors
Getting ready
How to do it...
How it works...
There's more...
See also
Creating Sound and Music
The Adafruit Circuit Playground Express layout
Making a beeping sound
Getting ready
How to do it...
How it works...
There's more...
See also
Controlling tone, frequency, and duration
Getting ready
How to do it...
How it works...
There's more...
See also
Playing a musical note
Getting ready
How to do it...
How it works...
There's more...
See also
Playing a melody
Getting ready
How to do it...
How it works...
There's more...
See also
Sounding the alarm
Getting ready
How to do it...
How it works...
There's more...
See also
Playing WAV files
Getting ready
How to do it...
How it works...
There's more...
See also
Converting MP3 files to WAV files
Getting ready
How to do it...
How it works...
There's more...
See also
Starting and stopping tones
Getting ready
How to do it...
How it works...
There's more...
See also
Interacting with Buttons
The Adafruit Circuit Playground Express layout
Detecting push button presses
Getting ready
How to do it...
How it works...
There's more...
See also
Controlling LEDs with push buttons
Getting ready
How to do it...
How it works...
There's more...
See also
Reading a slide switch
Getting ready
How to do it...
How it works...
There's more...
See also
Calling functions on the button state change
Getting ready
How to do it...
How it works...
There's more...
See also
Moving active LEDs with push buttons
Getting ready
How to do it...
How it works...
There's more...
See also
Playing a beep on the button press
Getting ready
How to do it...
How it works...
There's more...
See also
Detecting touch on a touchpad
Getting ready
How to do it...
How it works...
There's more...
See also
Monitoring the touchpad raw measurements
Getting ready
How to do it...
How it works...
There's more...
See also
Adjusting the touch threshold
Getting ready
How to do it...
How it works...
There's more...
See also
Reading Sensor Data
Circuit Playground Express sensors
Reading temperature readings
Getting ready
How to do it...
How it works...
There's more...
See also
Reading brightness levels from the light sensor
Getting ready
How to do it...
How it works...
There's more...
See also
Creating a light meter
Getting ready
How to do it...
How it works...
There's more...
See also
Reading data from the motion sensor
Getting ready
How to do it...
How it works...
There's more...
See also
Detecting a single or double tap
Getting ready
How to do it...
How it works...
There's more...
See also
Detecting a shake
Getting ready
How to do it...
How it works...
There's more...
See also
Beeping on a shake
Getting ready
How to do it...
How it works...
There's more...
See also
Button Bash Game
Technical requirements
Circuit Playground Express power
Creating a class to detect a button state change
Getting ready
How to do it...
How it works...
There's more...
See also
Creating your own Python modules
Getting ready
How to do it...
How it works...
There's more...
See also
Adding button interactions to the event loop
Getting ready
How to do it...
How it works...
There's more...
See also
Creating a generator to get pixel colors
Getting ready
How to do it...
How it works...
There's more...
See also
Showing scores with the ScoreBoard class
Getting ready
How to do it...
How it works...
There's more...
See also
Detecting winners with the ScoreBoard class
Getting ready
How to do it...
How it works...
There's more...
See also
Adding the ScoreBoard class to the event loop
Getting ready
How to do it...
How it works...
There's more...
See also
Fruity Tunes
Technical requirements
Circuit Playground Express touchpads
Creating a class to react to touch events
Getting ready
How to do it...
How it works...
There's more...
See also
Creating a function to enable speaker output
Getting ready
How to do it...
How it works...
There's more...
See also
Creating a function to play audio files
Getting ready
How to do it...
How it works...
There's more...
See also
Using the NeoPixel object to control pixels
Getting ready
How to do it...
How it works...
There's more...
See also
Creating a touch handler to play sounds
Getting ready
How to do it...
How it works...
There's more...
See also
Creating a touch handler to light up pixels
Getting ready
How to do it...
How it works...
There's more...
See also
Creating an event loop to handle all touch events
Getting ready
How to do it...
How it works...
There's more...
See also
Let's Move It, Move It
Technical requirements
DC motors
Servos
Adafruit CRICKIT
Where to buy
Tuning a servo to the correct pulse width
Getting ready
How to do it...
How it works...
There's more...
See also
Setting the actuation range of a servo
Getting ready
How to do it...
How it works...
There's more...
See also
Setting the angle of a servo
Getting ready
How to do it...
How it works...
There's more...
See also
Sweeping a servo
Getting ready
How to do it...
How it works...
There's more...
See also
Controlling servos with buttons
Getting ready
How to do it...
How it works...
There's more...
See also
Controlling multiple servos
Getting ready
How to do it...
How it works...
There's more...
See also
Turning on a DC motor
Getting ready
How to do it...
How it works...
There's more...
See also
Setting the speed and direction of a DC motor
Getting ready
How to do it....
How it works...
There's more...
See also
Controlling a DC motor with buttons
Getting ready
How to do it...
How it works...
There's more...
See also
Coding on the micro:bit
Technical requirements
The micro:bit
Using Mu to flash code onto the micro:bit
Getting ready
How to do it...
How it works...
There's more...
See also
Using Mu to get a REPL on the micro:bit
Getting ready
How to do it...
How it works...
There's more...
See also
Displaying a single character on the LED display
Getting ready
How to do it...
How it works...
There's more...
See also
Displaying a built-in image
Getting ready
How to do it...
How it works...
There's more...
See also
Displaying scrolling text
Getting ready
How to do it...
How it works...
There's more...
See also
Showing which button has been pressed
Getting ready
How to do it...
How it works...
There's more...
See also
Creating a countdown timer
Getting ready
How to do it...
How it works...
There's more...
See also
Controlling the ESP8266
Technical requirements
The Adafruit Feather HUZZAH ESP8266
Where can you buy these?
Using the REPL over a serial connection
Getting ready
How to do it...
How it works...
There's more...
See also
Scanning for available Wi-Fi networks
Getting ready
How to do it...
How it works...
There's more...
See also
Configuring settings for AP mode
Getting ready
How to do it...
How it works...
There's more...
See also
Connecting to an existing Wi-Fi network
Getting ready
How to do it...
How it works...
There's more...
See also
Using the WebREPL over Wi-Fi
Getting ready
How to do it...
How it works...
There's more...
See also
Transferring files with the WebREPL CLI
Getting ready
How to do it...
How it works...
There's more...
See also
Controlling the blue and red LEDs
Getting ready
How to do it...
How it works...
There's more...
See also
Interacting with the Filesystem
Technical requirements
Remounting the filesystem
Getting ready
How to do it...
How it works...
There's more...
See also
Listing files
Getting ready
How to do it...
How it works...
There's more...
See also
Removing files
Getting ready
How to do it...
How it works...
There's more...
See also
Creating a directory
Getting ready
How to do it...
How it works...
There's more...
See also
Reading a file's contents
Getting ready
How to do it...
How it works...
There's more...
See also
Writing a file's contents
Getting ready
How to do it...
How it works...
There's more...
See also
Calculating disk usage
Getting ready
How to do it...
How it works...
There's more...
See also
Networking
Technical requirements
Performing a DNS lookup
Getting ready
How to do it...
How it works...
There's more...
See also
Creating a function to wait for internet connectivity
Getting ready
How to do it...
How it works...
There's more...
See also
Performing an HTTP request using raw sockets
Getting ready
How to do it...
How it works...
There's more...
See also
Performing an HTTP request using the urequests library
Getting ready
How to do it...
How it works...
There's more...
See also
Fetching JSON data from a RESTful web service
Getting ready
How to do it...
How it works...
There's more...
See also
Creating an HTTP server
Getting ready
How to do it...
How it works...
There's more...
See also
Creating a web handler module
Getting ready
How to do it...
How it works...
There's more...
See also
Controlling LEDs through the web server
Getting ready
How to do it...
How it works...
There's more...
See also
Developing a RESTful API to control the LEDs
Getting ready
How to do it...
How it works...
There's more...
See also
Interacting with the Adafruit FeatherWing OLED
The Adafruit FeatherWing OLED
Where to buy it
Technical requirements
Detecting button presses with GPIO pins
Getting ready
How to do it...
How it works...
There's more...
See also
Connecting to the SSD1306 display
Getting ready
How to do it...
How it works...
There's more...
See also
Filling and clearing the display
Getting ready
How to do it...
How it works...
There's more...
See also
Setting pixels on the display
Getting ready
How to do it...
How it works...
There's more...
See also
Drawing lines and rectangles on the display
Getting ready
How to do it...
How it works...
There's more...
See also
Writing text on the display
Getting ready
How to do it...
How it works...
There's more...
See also
Inverting colors on the display
Getting ready
How to do it...
How it works...
There's more...
See also
Building an Internet of Things (IoT) Weather Machine
Technical requirements
Retrieving weather data from the internet
Getting ready
How to do it...
How it works...
There's more...
See also
Creating a function to get a city's weather
Getting ready
How to do it...
How it works...
There's more...
See also
Randomly selecting cities
Getting ready
How to do it...
How it works...
There's more...
See also
Creating a Screen object for text handling
Getting ready
How to do it...
How it works...
There's more...
See also
Creating a function to show a city's weather
Getting ready
How to do it...
How it works...
There's more...
See also
Providing visual feedback when fetching data
Getting ready
How to do it...
How it works...
There's more...
See also
Creating a function to display the weather for a random city
Getting ready
How to do it...
How it works...
There's more...
See also
Creating an IoT button to show the weather around the world
Getting ready
How to do it...
How it works...
There's more...
See also
Coding on the Adafruit HalloWing Microcontroller
The Adafruit HalloWing M0 Express
Where to buy
Technical requirements
Discovering I2C devices
Getting ready
How to do it...
How it works...
There's more...
See also
Reading data from the accelerometer using I2C
Getting ready
How to do it...
How it works...
There's more...
See also
Detecting board-flipping with the accelerometer
Getting ready
How to do it...
How it works...
There's more...
See also
Controlling screen brightness
Getting ready
How to do it...
How it works...
There's more...
See also
Displaying a bitmap image
Getting ready
How to do it...
How it works...
There's more...
See also
Listing all image files
Getting ready
How to do it...
How it works...
There's more...
See also
Creating a joke-telling machine
Getting ready
How to do it...
How it works...
There's more...
See also
Other Books You May Enjoy
Leave a review - let other readers know what you think
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜