The Alpha Geek – Geeking Out

CircuitPython

Instructor, E-Mentor, STEAM, and Arts-Based Training

——

#DonLucElectronics #DonLuc #Instructor #E-Mentor #STEAM #ArtsBasedTraining #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

Instructor, E-Mentor, STEAM, and Arts-Based Training

——

Instructor, E-Mentor, STEAM, and Arts-Based Training

——

Instructor, E-Mentor, STEAM, and Arts-Based Training

——

Instructor, E-Mentor, STEAM, and Arts-Based Training

——

What do remote controllers, routers, and robots all have in common? These beginner-friendly microcontrollers are easy to use and program with just a computers or laptop, a USB cable, and some open-source software. All the projects, here we come. Whether you are looking to build some cool electronic projects, learn programming, or wanting to teach others about electronics, this a teaching session will help you figure out what microcontroller is right for your needs, goals, and budgets. Here is some helpful content to start you on your electronics journey. There are different microcontrollers and it can be daunting to get started, especially if you’re just getting into electronics.

  • Arduino Uno – R3, SparkFun RedBoard, Arduino Fio, LilyPad Arduino, FLORA, Adafruit METRO 328, Arduino Pro Mini 328, Adafruit Metro Mini 328, Adafruit Pro Trinket, Adafruit Feather 328P, Moteino, etcetera, is a microcontroller board based on the ATmega328 (5V/16MHz, 3.3V/8MHz).
  • SparkFun Pro Micro, SparkFun Fio V3, Adafruit ItsyBitsy 32u4, Adafruit Feather 32u4, Circuit Playground Classic, etcetera, is a microcontroller board based on the ATmega32U4 (5V/16MHz, 3.3V/8MHz).
  • Arduino Mega 2560 R3 is a microcontroller board based on the ATmega2560 (5V/16MHz).
  • Arduino Nano Every is a microcontroller board based on the ATMega 4809 (5V/20MHz).
  • Arduino Due is a microcontroller board based on the AT91SAM3X8E (3.3V/84MHz).
  • SparkFun RedBoard Turbo, SparkFun SAMD21 Mini Breakout, Adafruit METRO M0 Express, LilyPad Simblee BLE, etcetera, is a microcontroller board based on the ATSAMD21G18 ARM Cortex M0+ (3.3V/48MHz).
  • SparkFun Thing Plus – SAMD51, Adafruit Metro M4 Express, Adafruit Feather M4 Express, etcetera, is a microcontroller board based on the ATSAMD51 Cortex M4 (3.3V/120MHz).
  • SparkFun Thing Plus – ESP32 WROOM, Adafruit HUZZAH32 – ESP32 Feather Board, etcetera, is a microcontroller board based on the Espressif Xtensa® dual-core 32-bit LX6 (3.3V/240MHz).
  • Raspberry Pi 4 Model B is a microcontroller board based on the Broadcom BCM2711, quad-core Cortex-A72 (ARM v8) 64-bit SoC (5.1V/1.5GHz).
  • Raspberry Pi Zero W is a microcontroller board based on the Broadcom BCM2837B0 64-bit ARM Cortex-A53 Quad Core Processor SoC (5.1V/1GHz).
  • Etcetera…

At Don Luc Electronics I believe that an understanding of electronics is a core literacy that opens up a world of opportunities in the fields of robotics, Internet of Things (IoT), machine learning, engineering, fashion, medical industries, environmental sciences, performing arts and more. This guide is designed to explore the connection between software and hardware, introducing code and parts as they are used in the context of building engaging projects. The circuits in this guide progress in difficulty as new concepts and components are introduced. Completing each circuit means much more than just experimenting you will walk away with a fun project you can use and a sense of accomplishment that is just the beginning of your electronics journey. At the end of each circuit, you’ll find coding challenges that extend your learning and fuel ongoing innovation.

People can contact us: https://www.donluc.com/?page_id=1927

Technology Experience

  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
  • IoT
  • Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
  • Robotics
  • Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
  • Unmanned Vehicles Terrestrial and Marine
  • Machine Learning
  • RTOS
  • Research & Development (R & D)

Instructor and E-Mentor

  • IoT
  • PIC Microcontrollers
  • Arduino
  • Raspberry Pi
  • Espressif
  • Robotics

Follow Us

Luc Paquin – Curriculum Vitae – 2023
https://www.donluc.com/luc/

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/channel/UC5eRjrGn1CqkkGfZy0jxEdA
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/

Don Luc

Project #20: CircuitPython – Audio Out WAV – Mk02

——

#DonLucElectronics #DonLuc #METROM0Express #CircuitPython #Sound #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant

——

Audio Out WAV

——

Audio Out WAV

——

Audio Out WAV

——

Play a Wave File

You can use any supported wave file you like. CircuitPython supports mono or stereo, at 22 KHz sample rate, or less, and 16-bit WAV format. The METRO M0 Express boards support only mono. The reason for mono is that there’s only one analog output on those boards. The 22 KHz or less because the CircuitPython can’t handle more data than that, and also it will not sound much better, and the DAC output is 10-bit so anything over 16-bit will just take up room without better quality. Since the WAV file must fit on the CircuitPython file system, it must be under 2 MB.

HamletUMk01.wav -> 1316 KB

We’re going to play the wave file for 10 seconds, pause it, wait for a button to be pressed, and then resume the file to play through to the end. Then it loops back to the beginning and starts again. First we create the button object, assign it to pin A1, and set it as an input with a pull-up.

Now we will ask the audio playback system to load the wave data from the file HamletUMk01.wav and finally request that the audio is played through the A0 analog output pin. The audio file is now ready to go, and can be played at any time with play. Inside our loop, we start by playing the file.

DL2112Mk02

1 x Adafruit METRO M0 Express
1 x SparkFun Audio Jack Breakout
1 x Audio Jack 3.5mm
1 x Hamburger Mini Speaker
1 x Tactile Button
1 x 10K potentiometer
1 x Knob
1 x 100uF 16V Electrolytic Capacitors
1 x SparkFun Cerberus USB Cable

Adafruit METRO M0 Express

AUD – Analog A0
BUT – Analog A1
VIN – +3.3V
VIN – +5V
GND – GND

code.py

"""
***** Don Luc Electronics © *****
Software Version Information
Project #20: CircuitPython – Audio Out WAV – Mk02
12-02
DL2112Mk02
code.py
1 x Adafruit METRO M0 Express
1 x SparkFun Audio Jack Breakout
1 x Audio Jack 3.5mm
1 x Hamburger Mini Speaker
1 x Tactile Button
1 x 10K potentiometer
1 x Knob
1 x 100uF 16V Electrolytic Capacitors
1 x SparkFun Cerberus USB Cable
"""
# Module
import time
import board
import digitalio
# audiocore -> WaveFile
from audiocore import WaveFile

try:
    from audioio import AudioOut
except ImportError:
    try:
        from audiopwmio import PWMAudioOut as AudioOut
    except ImportError:
        # Not always supported by every board.
        pass  

# Button A1
button = digitalio.DigitalInOut(board.A1)
button.switch_to_input(pull=digitalio.Pull.UP)

# William Shakespeare - Hamlet
wave_file = open("HamletUMk01.wav", "rb")
wave = WaveFile(wave_file)
# audio -> A0
audio = AudioOut(board.A0)

while True:
    # Play
    audio.play(wave)

    # This allows you to do other things while the audio plays.
    t = time.monotonic()
    # -> 10 second
    while time.monotonic() - t < 10:
        pass

    audio.pause()
    print("Waiting for button press to continue.")
    while button.value:
        pass
    # Resume    
    audio.resume()
    while audio.playing:
        pass
    # Done    
    print("Done")

People can contact us: https://www.donluc.com/?page_id=1927

Technology Experience

  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc...)
  • IoT
  • Robotics
  • Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
  • Unmanned Vehicles Terrestrial and Marine
  • Research & Development (R & D)
  • Desktop Applications (Windows, OSX, Linux, Multi-OS, Multi-Tier, etc...)
  • Mobile Applications (Android, iOS, Blackberry, Windows Mobile, Windows CE, etc...)
  • Web Applications (LAMP, Scripting, Java, ASP, ASP.NET, RoR, Wakanda, etc...)
  • Social Media Programming & Integration (Facebook, Twitter, YouTube, Pinterest, etc...)
  • Content Management Systems (WordPress, Drupal, Joomla, Moodle, etc...)
  • Bulletin Boards (phpBB, SMF, Vanilla, jobberBase, etc...)
  • eCommerce (WooCommerce, OSCommerce, ZenCart, PayPal Shopping Cart, etc...)

Instructor and E-Mentor

  • IoT
  • PIC Microcontrollers
  • Arduino
  • Raspberry Pi
  • Espressif
  • Robotics
  • DOS, Windows, OSX, Linux, iOS, Android, Multi-OS
  • Linux-Apache-PHP-MySQL

Follow Us

J. Luc Paquin – Curriculum Vitae - 2021 English & Español
https://www.jlpconsultants.com/luc/

Web: https://www.donluc.com/
Web: https://www.jlpconsultants.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/channel/UC5eRjrGn1CqkkGfZy0jxEdA
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/

Don Luc

Project #20: CircuitPython – Metro M0 Express Blink – Mk01

——

#DonLucElectronics #DonLuc #AdafruitMETROM0Express #CircuitPython #Project #Programming #Electronics #Microcontrollers #Consultant

——

Metro M0 Express Blink

——

Metro M0 Express Blink

——

Metro M0 Express Blink

——

Metro M0 Express Blink

——

Metro is our series of microcontroller boards for use with the Arduino IDE. This new Metro M0 Express board looks a whole lot like our original Metro 328, but with a huge upgrade. Instead of the ATmega328, this Metro features a ATSAMD21G18 chip, an ARM Cortex M0+. It’s our first Metro that is designed for use with CircuitPython. CircuitPython is our beginner-oriented flavor of MicroPython, and as the name hints at, its a small but full-featured version of the popular Python programming language specifically for use with circuitry and electronics.

Not only can you use CircuitPython, but the Metro M0 is also usable in the Arduino IDE.

At the Metro M0’s heart is an ATSAMD21G18 ARM Cortex M0 processor, clocked at 48 MHz and at 3.3V logic, the same one used in the new Arduino Zero. This chip has a whopping 256K of FLASH and 32K of RAM. This chip comes with built in USB so it has USB-to-Serial program and debug capability built in with no need for an FTDI-like chip.

  • Power the METRO with 7-9V polarity protected DC or the micro USB connector to any 5V USB source. The 2.1mm DC jack has an on/off switch next to it so you can turn off your setup easily. The METRO will automagically switch between USB and DC.
  • METRO has 25 GPIO pins, 12 of which are analog in, and one of which is a true analog out. There’s a hardware SPI port, hardware I2C port and hardware UART. Logic level is 3.3V
  • Native USB, there’s no need for a hardware USB to Serial converter as the Metro M0 has built in USB support. When used to act like a serial device, the USB interface can be used by any computer to listen/send data to the METRO, and can also be used to launch and update code via the bootloader. It can also act like a keyboard, mouse or MIDI device as well.
  • Four indicator LEDs and one NeoPixel, on the front edge of the PCB, for easy debugging. One green power LED, two RX/TX LEDs for data being sent over USB, and a red LED connected. Next to the reset button there is an RGB NeoPixel that can be used for any purpose.
  • 2 MB SPI Flash storage chip is included on board. You can use the SPI Flash storage like a very tiny hard drive. When used in Circuit Python, the 2 MB flash acts as storage for all your scripts, libraries and files. When used in Arduino, you can read/write files to it, like a little datalogger or SD card, and then with our helper program, access the files over USB.
  • Easy reprogramming, comes pre-loaded with the UF2 bootloader, which looks like a USB storage key. Simply drag firmware on to program, no special tools or drivers needed. It can be used to load up CircuitPython, PXT/MakeCode or Arduino IDE (it is bossa-compatible)

DL2112Mk01

1 x Adafruit METRO M0 Express

Adafruit METRO M0 Express

VIN – +3.3V
VIN – +5V
GND – GND

code.py

"""
***** Don Luc Electronics © *****
Software Version Information
Project #20: CircuitPython – Metro M0 Express Blink – Mk01
12-01
DL2112Mk01
code.py
1 x Adafruit METRO M0 Express
"""
# Module
import board
import digitalio
import time

# Red LED Connected
led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT

# Blink
while True:
    led.value = True
    time.sleep(1.5)
    led.value = False
    time.sleep(1.5)

People can contact us: https://www.donluc.com/?page_id=1927

Technology Experience

  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi,Espressif, etc…)
  • IoT
  • Robotics
  • Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
  • Unmanned Vehicles Terrestrial and Marine
  • Research & Development (R & D)
  • Desktop Applications (Windows, OSX, Linux, Multi-OS, Multi-Tier, etc…)
  • Mobile Applications (Android, iOS, Blackberry, Windows Mobile, Windows CE, etc…)
  • Web Applications (LAMP, Scripting, Java, ASP, ASP.NET, RoR, Wakanda, etc…)
  • Social Media Programming & Integration (Facebook, Twitter, YouTube, Pinterest, etc…)
  • Content Management Systems (WordPress, Drupal, Joomla, Moodle, etc…)
  • Bulletin Boards (phpBB, SMF, Vanilla, jobberBase, etc…)
  • eCommerce (WooCommerce, OSCommerce, ZenCart, PayPal Shopping Cart, etc…)

Instructor and E-Mentor

  • IoT
  • PIC Microcontrollers
  • Arduino
  • Raspberry Pi
  • Espressif
  • Robotics
  • DOS, Windows, OSX, Linux, iOS, Android, Multi-OS
  • Linux-Apache-PHP-MySQL

Follow Us

J. Luc Paquin – Curriculum Vitae – 2021 English & Español
https://www.jlpconsultants.com/luc/

Web: https://www.donluc.com/
Web: https://www.jlpconsultants.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/channel/UC5eRjrGn1CqkkGfZy0jxEdA
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/

Don Luc

Categories
Archives