Adafruit QT Py Created by Kattni Rembor

Total Page:16

File Type:pdf, Size:1020Kb

Adafruit QT Py Created by Kattni Rembor Adafruit QT Py Created by Kattni Rembor Last updated on 2021-09-27 12:13:36 PM EDT Guide Contents Guide Contents 2 Overview 8 Pinouts 12 Power Pins 12 Input/Output Pins 12 General Purpose / Analog Inputs 12 I2C Pins 13 Hardware Serial Pins 13 SPI Pins 13 Onboard Neopixel pins 13 Capacitive touch pins 13 Analog output pin 13 Analog input pins 14 PWM output pins 14 I2S pins 14 SWD Debug Pins 14 Reverse Side SPI FLASH 14 About STEMMA QT 16 What is CircuitPython? 17 CircuitPython is based on Python 17 Why would I use CircuitPython? 17 CircuitPython 19 Set up CircuitPython Quick Start! 19 Installing Mu Editor 22 Download and Install Mu 22 Using Mu 22 Creating and Editing Code 24 Creating Code 24 Editing Code 26 Your code changes are run as soon as the file is done saving. 27 1. Use an editor that writes out the file completely when you save it. 27 2. Eject or Sync the Drive After Writing 28 Oh No I Did Something Wrong and Now The CIRCUITPY Drive Doesn't Show Up!!! 28 Back to Editing Code... 29 Exploring Your First CircuitPython Program 30 Imports & Libraries 30 Setting Up The LED 30 Loop-de-loops 31 What Happens When My Code Finishes Running? 31 What if I don't have the loop? 32 More Changes 33 Naming Your Program File 33 Connecting to the Serial Console 34 Are you using Mu? 34 Setting Permissions on Linux 35 Using Something Else? 36 Interacting with the Serial Console 37 The REPL 41 © Adafruit Industries https://learn.adafruit.com/adafruit-qt-py Page 2 of 214 Returning to the serial console 44 CircuitPython Libraries 45 Installing the CircuitPython Library Bundle 46 Example Files 47 Copying Libraries to Your Board 48 Example: ImportError Due to Missing Library 48 Library Install on Non-Express Boards 49 Updating CircuitPython Libraries/Examples 50 Frequently Asked Questions 51 I have to continue using an older version of CircuitPython; where can I find compatible libraries? 51 Is ESP8266 or ESP32 supported in CircuitPython? Why not? 51 How do I connect to the Internet with CircuitPython? 52 Is there asyncio support in CircuitPython? 53 My RGB NeoPixel/DotStar LED is blinking funny colors - what does it mean? 54 What is a MemoryError? 55 What do I do when I encounter a MemoryError? 55 Can the order of my import statements affect memory? 56 How can I create my own .mpy files? 56 How do I check how much memory I have free? 56 Does CircuitPython support interrupts? 56 Does Feather M0 support WINC1500? 57 Can AVRs such as ATmega328 or ATmega2560 run CircuitPython? 57 Commonly Used Acronyms 57 Troubleshooting 58 Always Run the Latest Version of CircuitPython and Libraries 58 I have to continue using CircuitPython 5.x, 4.x, 3.x or 2.x, where can I find compatible libraries? 58 CPLAYBOOT, TRINKETBOOT, FEATHERBOOT, or GEMMABOOT Drive Not Present 58 You may have a different board. 59 MakeCode 59 MacOS 59 Windows 10 59 Windows 7 or 8.1 59 Windows Explorer Locks Up When Accessing boardnameBOOT Drive 60 Copying UF2 to boardnameBOOT Drive Hangs at 0% Copied 61 CIRCUITPY Drive Does Not Appear 61 Device Errors or Problems on Windows 61 Serial Console in Mu Not Displaying Anything 62 CircuitPython RGB Status Light 62 ValueError: Incompatible .mpy file. 63 CIRCUITPY Drive Issues 64 Easiest Way: Use storage.erase_filesystem() 64 Old Way: For the Circuit Playground Express, Feather M0 Express, and Metro M0 Express: 64 Old Way: For Non-Express Boards with a UF2 bootloader (Gemma M0, Trinket M0): 66 Old Way: For non-Express Boards without a UF2 bootloader (Feather M0 Basic Proto, Feather Adalogger, Arduino Zero): 66 Running Out of File Space on Non-Express Boards 67 Delete something! 67 Use tabs 67 MacOS loves to add extra files. 67 Prevent & Remove MacOS Hidden Files 68 Copy Files on MacOS Without Creating Hidden Files 68 © Adafruit Industries https://learn.adafruit.com/adafruit-qt-py Page 3 of 214 Other MacOS Space-Saving Tips 69 Device locked up or boot looping 70 Uninstalling CircuitPython 72 Backup Your Code 72 Moving Circuit Playground Express to MakeCode 72 Moving to Arduino 73 Welcome to the Community! 76 Adafruit Discord 76 Adafruit Forums 77 Adafruit Github 78 ReadTheDocs 79 CircuitPython Essentials 81 CircuitPython Pins and Modules 82 CircuitPython Pins 82 import board 82 I2C, SPI, and UART 83 What Are All the Available Names? 84 Microcontroller Pin Names 85 CircuitPython Built-In Modules 86 CircuitPython Built-Ins 87 Thing That Are Built In and Work 87 Flow Control 87 Math 87 Tuples, Lists, Arrays, and Dictionaries 87 Classes, Objects and Functions 87 Lambdas 87 Random Numbers 88 CircuitPython Digital In & Out 89 Find the pins! 90 Read the Docs 92 CircuitPython Analog In 93 Creating the analog input 93 get_voltage Helper 93 Main Loop 93 Changing It Up 94 Wire it up 94 Reading Analog Pin Values 97 CircuitPython Analog Out 98 Creating an analog output 98 Setting the analog output 98 Main Loop 98 Find the pin 99 CircuitPython Audio Out 103 Play a Tone 103 Play a Wave File 105 Wire It Up 107 CircuitPython PWM 112 PWM with Fixed Frequency 112 Create a PWM Output 113 Main Loop 113 PWM Output with Variable Frequency 114 Wire it up 115 © Adafruit Industries https://learn.adafruit.com/adafruit-qt-py Page 4 of 214 Where's My PWM? 119 CircuitPython Servo 121 Servo Wiring 121 Standard Servo Code 124 Continuous Servo Code 124 CircuitPython Cap Touch 126 Create the Touch Input 126 Main Loop 126 Find the Pin(s) 127 CircuitPython Internal RGB LED 131 Create the LED 132 Brightness 132 Main Loop 132 Making Rainbows (Because Who Doesn't Love 'Em!) 133 Circuit Playground Express Rainbow 134 CircuitPython NeoPixel 136 Wiring It Up 136 The Code 137 Create the LED 138 NeoPixel Helpers 139 Main Loop 139 NeoPixel RGBW 139 Read the Docs 141 CircuitPython DotStar 142 Wire It Up 142 The Code 143 Create the LED 145 DotStar Helpers 146 Main Loop 146 Is it SPI? 147 Read the Docs 147 CircuitPython UART Serial 149 The Code 150 Wire It Up 151 Where's my UART? 154 Trinket M0: Create UART before I2C 155 CircuitPython I2C 157 Wire It Up 157 Find Your Sensor 160 I2C Sensor Data 161 Where's my I2C? 162 CircuitPython HID Keyboard and Mouse 164 CircuitPython Keyboard Emulator 164 Create the Objects and Variables 166 The Main Loop 166 CircuitPython Mouse Emulator 167 Create the Objects and Variables 169 CircuitPython HID Mouse Helpers 169 Main Loop 170 CircuitPython Storage 171 Logging the Temperature 173 CircuitPython CPU Temp 176 CircuitPython Expectations 177 © Adafruit Industries https://learn.adafruit.com/adafruit-qt-py Page 5 of 214 Always Run the Latest Version of CircuitPython and Libraries 177 I have to continue using CircuitPython 3.x or 2.x, where can I find compatible libraries? 177 Switching Between CircuitPython and Arduino 177 The Difference Between Express And Non-Express Boards 178 Non-Express Boards: Gemma, Trinket, and QT Py 178 Small Disk Space 178 No Audio or NVM 178 Differences Between CircuitPython and MicroPython 178 Differences Between CircuitPython and Python 179 Python Libraries 179 Integers in CircuitPython 179 Floating Point Numbers and Digits of Precision for Floats in CircuitPython 179 Differences between MicroPython and Python 179 Arduino IDE Setup 180 https://adafruit.github.io/arduino-board-index/package_adafruit_index.json 181 Using with Arduino IDE 183 Install SAMD Support 183 Install Adafruit SAMD 184 Install Drivers (Windows 7 & 8 Only) 185 Blink 187 Successful Upload 188 Compilation Issues 189 Manually bootloading 189 Ubuntu & Linux Issue Fix 190 NeoPixel Blink 191 Adapting Sketches to M0 & M4 192 Analog References 192 Pin Outputs & Pullups 192 Serial vs SerialUSB 192 AnalogWrite / PWM on Feather/Metro M0 193 analogWrite() PWM range 194 analogWrite() DAC on A0 194 Missing header files 194 Bootloader Launching 195 Aligned Memory Access 195 Floating Point Conversion 195 How Much RAM Available? 196 Storing data in FLASH 196 Pretty-Printing out registers 196 M4 Performance Options 197 CPU Speed (overclocking) 197 Optimize 198 Cache 198 Max SPI and Max QSPI 198 Enabling the Buck Converter on some M4 Boards 199 UF2 Bootloader Details 200 Entering Bootloader Mode 201 © Adafruit Industries https://learn.adafruit.com/adafruit-qt-py Page 6 of 214 Using the Mass Storage Bootloader 203 Using the BOSSA Bootloader 204 Windows 7 Drivers 204 Verifying Serial Port in Device Manager 205 Running bossac on the command line 207 Using bossac Versions 1.7.0, 1.8 207 Using bossac Versions 1.9 or Later 207 Updating the bootloader 208 Getting Rid of Windows Pop-ups 209 Making your own UF2 210 Installing the bootloader on a fresh/bricked board 211 Downloads 212 Files 212 Schematic & Fabrication Print 212 © Adafruit Industries https://learn.adafruit.com/adafruit-qt-py Page 7 of 214 Overview What a cutie pie! Or is it... a QT Py? This diminutive dev board comes with our favorite li'l chip, the SAMD21 (as made famous in our GEMMA M0 and Trinket M0 boards). This time it comes with our favorite connector - the STEMMA QT (https://adafru.it/HMB), a chainable I2C port that can be used with any of our STEMMA QT sensors and accessories (https://adafru.it/NmD). © Adafruit Industries https://learn.adafruit.com/adafruit-qt-py Page 8 of 214 OLEDs (https://adafru.it/NB-)! Inertial Measurment Units (https://adafru.it/NC0)! Sensors a- plenty (https://adafru.it/NC1). All plug-and-play thanks to the innovative chainable design: SparkFun Qwiic (https://adafru.it/Fpw)-compatible STEMMA QT (https://adafru.it/Ft4) connectors for the I2C bus so you don't even need to solder! Just plug in a compatible cable and attach it to your MCU of choice, and you’re ready to load up some software and measure some light.
Recommended publications
  • SCIS Boardman Labs User Manual Version5
    SCIS Common Use Labs in Boardman Hall USER MANUAL Note: The instructions in this manual assume students walking into the labs are first-time users of the labs and are complete novices in using the machines. Table of Contents Page I. Access to Boardman Hall SCIS Labs for Computer Science and New Media Students A. Services Provided 2 B. Gaining Access to Lab Rooms and Computers 3 II. SCIS Common Use Lab (Room 138 Boardman) A. Services Provided 3 B. Use of iMacs on Tables 4 C. Use of Large Table Monitor for Sharing Among Table Group 4 D. Use of Overhead Projector 5 E. Use of Laser Printer (8 ½ by 11” Prints) 6 F. Use of Large Format Plotter 7 G. Software Available on Computers in Room 138 7 H. Equipment Available for Checkout from Room 138 Lab Monitors 8 III. Combined Focus Ring and Stillwater Labs (Rooms 127 and 129 Boardman) A. Services Provided 8 B. Use of iMacs on Tables 9 C. Use of Cybertron PC for AI and VR D. Use of … E. Software Available on Computers in Rooms 127 and 129 F. Equipment Checkout Procedure G. Equipment Available for Checkout from Rooms 127 and 129 Lab Monitors IV. SCIS Student Lounge and Project Work Room (Room 137 Boardman) A. Services Provided B. Use of Large Screen by Students APPENDICES Appendix A. Laptop Computer Recommendations for Computer Science Students Appendix B. Laptop Computer Recommendations for New Media Students Appendix C. Convenient Web Resources for Development of Computer Code Note: On SCIS web site all of the above topics will link to anchors at the same topics below.
    [Show full text]
  • Programming Environments
    Programming Environments Presenter: Steve Baskauf [email protected] CodeGraf landing page • vanderbi.lt/codegraf What is an environment? vanderbi.lt/codegraf Coding environment • The definition of "environment" is a bit murky • We can consider an environment to include: • the value of defined variables • functions available to be used in our code • knowledge about position in file directory structure and other computer-wide parameters Accessing via the shell • Python example • R example Integrated development environment (IDE) What is an integrated development environment (IDE)? • An IDE is a graphical user interface (GUI) for developing code • An IDE includes: • a code editor • a shell • An IDE might include: • tools for examining the environment • formatting help and syntax checking • mechanisms for debugging code • a package manager Thonny example • Thonny is a simple Python IDE Spyder IDE for Python RStudio IDE for R Literate programming with Jupyter notebooks Literate programming • Programming paradigm for making code understandable to humans • Mix text, images, links with code. • Implementable in a primitive fashion with comments (#) • Implementable in a robust way with Jupyter notebooks and R Markdown Example: Jupyter notebooks • Formerly known as "iPython notebooks" (.ipynb file extension) • Now usable with Python, R, and other programming languages • Runnable in a browser when connected to a server • Viewable in GitHub (but not runnable) Functions Functions argument parameter • A function defines a block of code. • We pass arguments into functions: • functionName(argument1, argument2, ...) • It’s good to name functions by what they do. returned Example: value my_latte = make_latte(beans, milk, water) • Functions can be: • built-in • defined by you in your code • defined by somebody else in a module Image: Nykamp DQ, “Function machine f.” From Math Insight.
    [Show full text]
  • Research Manual
    MOBILE FORENSICS APPLICATION Research Manual Student: Connor Scanlan – C00226867 Supervisor: James Egan Cybercrime & IT Security – CW_KCCYB_B Institute of Technology Carlow Table of Contents Abstract .................................................................................................. 3 Introduction ............................................................................................. 3 Research ................................................................................................. 4 The need for better Mobile Forensics tools ......................................................... 4 Use of mobile phones to store and transmit sensitive information ........................... 4 Online transactions .................................................................................. 5 Law Enforcement and Criminals ................................................................... 5 Mobile Data as Evidence ............................................................................... 6 Definition of Digital Evidence ...................................................................... 6 Principles of Electronic Evidence .................................................................. 6 Framework of Mobile Forensics....................................................................... 8 Mobile Forensics System Structure ................................................................ 8 Mobile Forensics Processes ......................................................................... 9 Mobile Data Collection
    [Show full text]
  • Instalación Wxpython Y Pyo En Thonny
    Instalaci´on wxPython y pyo en Thonny Inform´aticaIII ISM - UNL [email protected] updated: 29 ago 2018 ´Indice 1. Introducci´on 2 2. Instalaci´onen Windows 7/8.1/10 (32 y 64 bits) 3 2.1. Reconocer arquitectura del Sistema Operativo . .3 2.2. Instalar paquetes de MS Visual C++ . .3 2.3. Instalar wxPython con Thonny .........................................4 2.4. Instalar pyo en Thonny . .5 2.5. Instalaci´onde wxFormBuilder .........................................6 3. Instalaci´onen Linux (Ubuntu 16.04 64 bits) 8 3.1. Prerrequisitos . .8 3.2. Instalar wxPython en Thonny .........................................8 3.3. Instalar pyo en Thonny . 10 3.4. Instalaci´onde wxFormBuilder ......................................... 12 4. Instalaci´onen MacOSX (Sierra 10.12 - 64 bits) 13 4.1. Instalar wxPython con Thonny ......................................... 13 4.2. Instalar pyo con Thonny ............................................ 14 4.3. Instalaci´onde wxFormBuilder ......................................... 16 1. Introducci´on En este documento se intentar´adar los pasos para la instalaci´onde wxPython y pyo en la interfaz Thonny. wxPython (https://wxpython.org) es un conjunto de librer´ıasgr´aficaspara Python que permite la interacci´on entre el usuario y componentes GUI (Graphical User Interface) de manera tal que se pueda programar ventanas, botones, listas, menu´es,facilitando as´ıla interacci´onentre el usuario y los programas. Por otro lado, pyo (http://ajaxsoundstudio.com/software/pyo) es un m´odulode Python dise~nadopor Olivier Belanger (PhD en Composici´onElectroac´usticadel Ajax Sound Studio, de Montreal, Canad´a)para procesamiento digital de se~nales(o DSP - Digital Signal Processing) que se utilizar´apara sintetizar, filtrar y generar efectos de audio utilizando Python.
    [Show full text]
  • Portable Opengl (ES) Jamie Madill / July 31, 2019
    ANGLE Portable OpenGL (ES) Jamie Madill / July 31, 2019 ANGLE is an OpenGL driver that.. ● Translates OpenGL to native commands on multiple major OSes. ● Gives portable OpenGLby working around driver bugs. ANGLE has billions of users! ● Several popular browsers use ANGLE for Code is like a layer cake. Application Entry Points GL Validation GL Context ANGLE Front-End (State Tracking) GL Back-End Vk Back-End D3D Back-End Validation Vulkan LVL Debug Runtime Driver GL Driver Vulkan Driver D3D Driver Slicing the layers angle::Result Buffer::bufferData(Context *context, BufferBinding target, const void *data, Entry Points GLsizeiptr size, BufferUsage usage) { GL Validation GL Context ANGLE_TRY(mImpl->setData(context, target, data, size, usage)); Front-End (State Tracking) mIndexRangeCache.clear(); mState.mUsage = usage; mState.mSize = size; GL Back-End Vk Back-End D3D Back-End onStateChange(angle::SubjectMessage::SubjectChanged); return angle::Result::Continue; } Slicing the layers angle::Result BufferVk::setData(const gl::Context *context, gl::BufferBinding target, Entry Points const void *data, size_t size, gl::BufferUsage usage) GL Validation GL Context { ContextVk *contextVk = vk::GetImpl(context); Front-End (State Tracking) if (size > static_cast<size_t>(mState.getSize())) { // Release and re-create the memory and buffer. GL Back-End Vk Back-End D3D Back-End release(contextVk); VkBufferCreateInfo createInfo = { /* ... */ }; ANGLE_TRY(mBuffer.init(contextVk, createInfo, kMemoryPropertyFlags)); } if (data && size > 0) { ANGLE_TRY(setDataImpl(contextVk, data, size, 0)); } return angle::Result::Continue; } What’s next: Android ○ Vendors must supportlegacy GL drivers. ○ They also must support theVulkan API. Vendor “A” Vendor “B” Vendor “C” Vendor “D” What’s next: Android ○ Focus on high quality Vulkan drivers with GL emulation.
    [Show full text]
  • Stronger NYC Communities Organizational Digital Security Guide
    Stronger NYC Communities Organizational Digital Security Guide For Trainers and Participants Build Power - not Paranoia! NYC Stronger Communities | Toolkit 1 Creative Commons Attribution-ShareAlike 4.0 International, July 2018 This work supported by Mozilla Foundation, the NYC Mayor’s Office of Immigrant Affairs, NYC Mayor’s Office of the CTO, and Research Action Design. CREDITS Project designed and lead by Sarah Aoun and Bex Hong Hurwitz. Curriculum lead writing by Rory Allen. Workshops, activities, and worksheets were developed by Nasma Ahmed, Rory Allen, Sarah Aoun, Rebecca Chowdhury, Hadassah Damien, Harlo Holmes, Bex Hong Hurwitz, David Huerta, Palika Makam (WITNESS), Kyla Massey, Sonya Reynolds, and Xtian Rodriguez. This Guide was arranged and edited by Hadassah Damien, and designed by Fridah Oyaro, Summer 2018. More at: https://strongercommunities.info NYC Stronger Communities | Toolkit 2 Table of Contents ORGANIZATIONAL DIGITAL SECURITY GUIDE This guide provides tools and ideas to help organizational digital security workshop leaders approach the work including a full facilitator’s guide with agendas and activities; for learners find a participant guide with homework, exercises, and a resource section. 01 03 INTRODUCTION ............................................ 4 PARTICIPANT WORKBOOK ........................................ 110 • Organizational Digital Security Right Now Introduction to the Stronger Communities • Roadmap Workshop series Self-assessment: Digital • Workshop Overview Security Bingo • Series Story • How to coordinate and plan a Stronger Workshop Participant Guides Communities workshop series • Design and facilitation tools 1. Stronger NYC Communities Workshop: • Evaluate and assess Our work is political. • Handout and activity glossary 2. Stronger Communities Workshop: Our work is both individual and collective. 3. Stronger Communities Workshop: Our 02 work is about learning from and taking care of each other.
    [Show full text]
  • Python Intro #1
    Python Intro #1 Python is a popular programming language. It was created by Guido van Rossum, and released in 1991. It is used for: • web development (server-side), • software development, • mathematics, • system scripting. What can Python do? • Python can be used on a server to create web applications. • Python can be used alongside software to create workflows. • Python can connect to database systems. It can also read and modify files. • Python can be used to handle big data and perform complex mathematics. • Python can be used for rapid prototyping, or for production-ready software development. Why Python? • Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc). • Python has a simple syntax similar to the English language. • Python has syntax that allows developers to write programs with fewer lines than some other programming languages. • Python runs on an interpreter system, meaning that code can be executed as soon as it is written. This means that prototyping can be very quick. • Python can be treated in a procedural way, an object-orientated way or a functional way. Good to know • The most recent major version of Python is Python 3, which we shall be using in this tutorial. However, Python 2, although not being updated with anything other than security updates, is still quite popular. • In this tutorial Python will be written in a text editor. It is possible to write Python in an Integrated Development Environment, such as Thonny, Pycharm, Netbeans or Eclipse which are particularly useful when managing larger collections of Python files. • Python Syntax compared to other programming languages • Python was designed for readability, and has some similarities to the English language with influence from mathematics.
    [Show full text]
  • Getting Started with Opengl ES 3+ Programming
    Getting Started with OpenGL ES 3+ Programming Learn Modern OpenGL Basics Hans de Ruiter Getting Started with OpenGL ES 3+ Programming Hans de Ruiter Version 1.1 – 5 April 2017 Copyright © 2017 by Kea Sigma Delta Limited, all rights reserved. Distribute the Link, Not the Book It takes a lot of time and effort to produce resources like this, and we think it’s great when people find it useful and want to share. However, please share the following link instead of distributing (illegal) copies. That way they get a legitimate copy and we’re able to continue producing quality content: https://keasigmadelta.com/gles3-sdl2-tutorial We’ve done everything we can to make the contents of this book as accurate as possible. However, due to the complex nature of the topics and possible human error, we cannot guarantee absolute accuracy. Also, continual research and development means that things are ever changing. No liability is assumed for losses or damages due to the information provided. You are responsible for your own choices, actions, and results. 2 Table of Contents Introduction..............................................................................................................................................5 Who is this For?...................................................................................................................................5 Why OpenGL ES 3+ and SDL2?........................................................................................................5 How to Get the Most Out of These Tutorials......................................................................................6
    [Show full text]
  • Minecraft Pi DEVELOPED by D-LEARN & CCSDE Minecraft Pi Is a Version of Minecraft, with Minimal Features, Developed for Raspberry Pi
    Reviving hands-on educational play for learning skills of tomorrow MODULE 1 PROJECT N° 2019-1-UK01-KA201-061466 Minecraft Pi DEVELOPED BY D-LEARN & CCSDE Minecraft Pi is a version of Minecraft, with minimal features, developed for Raspberry Pi. Pi edition is intended as an educational tool for novice programmers, allowing users to enjoy the game and learn programming at the same time. This resource presents the most important and practical guidelines for Minecraft Pi, such as how to control the player, manually build with blocks and use the Python interface to manipulate the world around you. It is meant for educational purposes and is considered a quick but all-inclusive manual for introducing a new player to Minecraft Pi. Once you follow this module you will be able to: • Access Minecraft Pi and create a new world • Navigate around Minecraft Pi • Know how to place and destroy a block, and navigate through different types of blocks in the in-game inventory • Connect Python to Minecraft Pi • Use the Python programming interface • Manipulate blocks using Python scripts • Make Minecraft interact with the physical world through the Raspberry Pi GPIO • Introduction to Minecraft Pi basic functions • Minecraft Pi elements and gameplay • Controlling Minecraft Pi with Python • Interaction of Minecraft Pi with the physical world through the Raspberry Pi’s GPIO: Connecting LEDs, buttons and switches Create electronic kits to interact with Minecraft Pi Once you have followed this topic you will be able to: • Know the basics before running Minecraft Pi • Run Minecraft Pi on your Play2Learn computer • Navigate around Minecraft Pi • Use the controls on your mouse and keyboard Playing Minecraft Pi for the first time: Your Play2Learn computer contains everything that you need to run Minecraft Pi in terms of software.
    [Show full text]
  • Effective Opengl 5 September 2016, Christophe Riccio
    Effective OpenGL 5 September 2016, Christophe Riccio Table of Contents 0. Cross platform support 3 1. Internal texture formats 4 2. Configurable texture swizzling 5 3. BGRA texture swizzling using texture formats 6 4. Texture alpha swizzling 7 5. Half type constants 8 6. Color read format queries 9 7. sRGB texture 10 8. sRGB framebuffer object 11 9. sRGB default framebuffer 12 10. sRGB framebuffer blending precision 13 11. Compressed texture internal format support 14 12. Sized texture internal format support 15 13. Surviving without gl_DrawID 16 14. Cross architecture control of framebuffer restore and resolve to save bandwidth 17 15 Building platform specific code paths 18 16 Max texture sizes 19 17 Hardware compression format support 20 18 Draw buffers differences between APIs 21 19 iOS OpenGL ES extensions 22 20 Asynchronous pixel transfers 23 Change log 24 0. Cross platform support Initially released on January 1992, OpenGL has a long history which led to many versions; market specific variations such as OpenGL ES in July 2003 and WebGL in 2011; a backward compatibility break with OpenGL core profile in August 2009; and many vendor specifics, multi vendors (EXT), standard (ARB, OES), and cross API extensions (KHR). OpenGL is massively cross platform but it doesn’t mean it comes automagically. Just like C and C++ languages, it allows cross platform support but we have to work hard for it. The amount of work depends on the range of the application- targeted market. Across vendors? Eg: AMD, ARM, Intel, NVIDIA, PowerVR and Qualcomm GPUs. Across hardware generations? Eg: Tesla, Fermi, Kepler, Maxwell and Pascal architectures.
    [Show full text]
  • Android Versions in Order
    Android Versions In Order Mohamed remains filmiest after Husein idolatrized whereby or urbanising any indulgences. Barret mums his hammals curves saprophytically or bellicosely after Ware debilitates and overweights henceforward, fuzzier and Elohistic. Satyrical Brinkley plumb inquietly. Link ringcomapp will automatically begin downloading the correct version for. Cupcake was the obvious major overhaul of the Android OS. Incompatible with beta versions of OSes. Which phones will get Android 10 update? It also makes your Realm file slightly larger, to lest the index. Adjustandroidsdk This type the Android SDK of GitHub. When our, native code should render appropriate public Java API methods. Remember our switch if your live stream key in production. This tells GSON to dental this database during serialization. These cookies do not quarrel any personal information. Cordova's CLI tools require cold environment variables to be set in police to. Privacy is a tall piece for Google given especially the company makes money and. Similar note the displays the Galaxy S20 is myself being used as a clip for Samsung's improved camera tech. Major version in order will be careful not go on to combine multiple user switches to black and audio option depending on their devices will use. Set in android versions for managing telephone videos, with multiple cameras and restore for a layer window, and voicemails across mobile app is used apps. This grass had very helpful to keep through the dependency versions together, as previously required. Android and choose to drop using dessert names to century to the version of its mobile operating systems. We use in order to insert your version in which you when the versions of.
    [Show full text]
  • 2018Dec Buffalo Python Meetup
    Tim Poulsen Software Engineer R&D Team ACV Labs RASPBERRY PI Overview & Examples Board components Basic setup Python dev Libraries Resources https://github.com/skypanther/PiLit https://www.timpoulsen.com/2018/pi-birdcam.html Camera controller board PyImageSearch blog www.pyimagesearch.com/2015/05/25/basic-motion-detection-and- tracking-with-python-and-opencv/ PI 3B+ Micro SD slot (back side) Power in (micro-USB) HDMI GPIO, I2C, serial CSI camera Stereo audio out Broadcom BCM2837B0, Cortex-A53 (ARMv8) 64-bit SoC @ 1.4GHz 1GB LPDDR2 SDRAM 2.4GHz and 5GHz IEEE Gigabit 802.11.b/g/n/ac 4 x USB 2.0 Ethernet Bluetooth 4.2, BLE OS OPTIONS • Raspbian (customized Debian distro) • NOOBs - an installer, not an OS • Third-party provided Ubuntu, Windows 10 IoT Core, RISC OS, etc. OS SETUP • Download OS “image” .img file • Copy to SD card • Insert in Pi and boot Etcher app - https://www.balena.io/etcher/ DEV ENVIRONMENT • Python 2.x / 3.x • Ruby • C • Wolfram language • C++ • SonicPi • Java • Git • Scratch IDEs Pre-installed: Installable: • Thonny (Python) • VS Code - https:// • Geany (multiple) code.headmelted.com/ • BlueJ (Java) • Spyder • Greenfoot (Java) • Ninja-IDE • Mathematica • • Node-RED Lazarus • Scratch • lots more… PYTHON LIBRARIES Pre-installed: Installable: • Any Python-only library • RPi.GPIO • Or, any that will compile for • GPIO Zero ARM • www.piwheels.org - • PiCamera precompiled packages • e.g. OpenCV, Tensorflow, WiringPi, etc. GPIO BASICS from gpiozero import LED from time import sleep red = LED(17) while True: red.on() sleep(1) red.off() sleep(1) GPIO / I2C / SERIAL https://pinout.xyz/ SERIAL OVER USB import serial # open serial port ser = serial.Serial('/dev/ttyUSB0') # write a string ser.write(b'hello') # close port ser.close() PICAMERA from picamera import PiCamera from time import sleep camera = PiCamera() camera.resolution = (1024, 768) camera.start_preview() # Camera warm-up time sleep(2) camera.capture('foo.jpg') THANKS! • timpoulsen.com • github.com/skypanther • @skypanther • www.linkedin.com/in/timpoulsen.
    [Show full text]