AEMICS PYg boards MicroPython Module User Guide

June 3, 2024
AEMICS

AEMICS PYg boards MicroPython Module User Guide
AEMICS PYg boards MicroPython Module

Int6roduction

Welcome to the Quick-start guide for PYg boards! In this guide, we will explain how to get started with Visual Studio Code in a few steps.

  1. Setting up the hardware
  2. Setting up your computer
  3. Programming your PYg board

This Quick-start covers programming the PYg board using Visual Studio Code. Other IDEs could be used.

Setting up the hardware

Actions

Connect the PYg board to the pc

  1. Connect the PYg board to the pc via USB with a Micro-USB cable

Setting up your computer

Actions

  • Install Visual Studio Code
  • Install NodeJS
  • Set up Visual Studio Code for programming your PYg board
  1. Go to code.visualstudio.com
  2. Download the version for your operating system
  3. Install Visual Studio Code
  4. Go to NodeJS.org
  5. Download and install the version for your operating system
  6. In Visual Studio Code go to ExtensionsIcon ** and search for Python** , click the install button
  7. In the same Extension window, search for Pymakr and install
  8. Your PYg board will now show up on the Pymakr Console
  9. In the Pymakr Console type: ****, got a respond? Congratulations, your IDE is set up correctly

Programming your PYg board

Actions

  • Use REPL to toggle the onboard LED
  • Run .py files on your PYg board
  1. Fill in the following code into the Shell to toggle the onboard LED on or off via REPL

To let the onboard LED blink repeatedly, a new project has to be created

  1. Create a new folder on your computer

  2. Copy main.py and boot.py from the PYg board into the created folder

  3. In VS Code go to File > Open Folder… and open your folder

  4. Now copy the following code to main.py
    Icon

  5. Click on More Actions… and press Pymakr > Run current file
    The code will now run. To let the PYg board run code automatically when powered, main.py has to be uploaded to the board

  6. Click on More Actions… and press Pymakr > Upload project Congratulations! You can now program your PYg Board!

Execute code after boot-up

boot.py will run on boot-up and can run arbitrary Python, but it is best to keep it minimal main.py is the main script and will run after boot.py

Read User Manual Online (PDF format)

Read User Manual Online (PDF format)  >>

Download This Manual (PDF format)

Download this manual  >>

Related Manuals