This quick and easy tutorial will guide you through getting started with running MicroPython on the PSOC™ Edge E84 AI Evaluation Kit.
Let’s get started!
Hardware SetupFor this, you will just need your PSOC™ Edge E84 AI Evaluation Kit, a USB Type-C cable and your laptop! All you need to do is connect them!
Install MicroPythonIn a terminal on your computer, type the following commands and follow the instructions. It's always recommended to create a folder mp-install to store all installation assets and execute the commands from that folder location.
mkdir mp-install
cd mp-installThen, download the script using:
curl -s -L https://raw.githubusercontent.com/infineon/micropython-psoc-edge/psoc-edge-main/tools/psoc-edge/mpy-pse.py > mpy-pse.pyMake sure you have a recent version of Python3.x installed and the pip package installer. Then install the following packages:
pip install requestsMake sure that you have connected the right USB Type-C port like shown in the following picture:
Finally, run the script:
python mpy-pse.py device-setupYou will get something like this. This means your device is now running MicroPython. If you run into any trouble please let us know in the comments below!
Now open Thonny (or another IDE) that includes a text editor and tools to run your Python scripts on your MicroPython device.
The MicroPython port for PSOC™ Edge can be detected by the Thonny IDE when the MicroPython (generic) option is selected at the bottom right corner, as shown:
Now let’s try to run a MicroPython script! As a first example, you will just make the board LED blink.
Copy the following code and click on run:
from machine import Pin
import time
led = Pin("P10_5", Pin.OUT)
while True:
led.toggle()
time.sleep(1)Find additional information to help you get started with PSOC™ Edge here! You can explore the official documentation provided by Infineon, that covers a wide range of topics!
Happy coding!







Comments