How do i start

The official PYBD running MicroPython, and its accessories.
Target audience: Users with a PYBD
Post Reply
IDKanything
Posts: 2
Joined: Sun Feb 23, 2020 6:16 pm

How do i start

Post by IDKanything » Sun Feb 23, 2020 6:31 pm

Purchased a Pyboard D SF2. Brand new to python and micro-controllers.
Plugged it in to Win 10 machine
Was trying to turn some LEDs to start out
ran boot.pu file that had, import machine and import pyb
it returned...no module named 'machine'
Any ideas. I probably seem like an idiot to you guys. However this looks fun

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: How do i start

Post by jimmo » Sun Feb 23, 2020 11:53 pm

Hi,

The pyboard d (like most MicroPython boards) has an internal filesystem that stores Python code that the board will execute.

When you plug it into your computer, shows up as a USB flash drive which shows the contents of the filesystem.

It sounds like you're trying to run the code on your PC (i.e. by double-clicking the file). Instead what you need to do is write your code, then save it to the device, then reset it (ideally via a serial console so you can see any messages).

Have you seen the "getting started" guide - http://docs.micropython.org/en/latest/p ... index.html -- in particular this page is probably what you need: http://docs.micropython.org/en/latest/p ... cript.html The next page has instructions on how to set up PuTTY so you can access the serial console.

IDKanything
Posts: 2
Joined: Sun Feb 23, 2020 6:16 pm

Re: How do i start

Post by IDKanything » Mon Feb 24, 2020 12:40 am

Thanks, very helpful. Used Putty and was able to toggle the LEDs on and off. My 6 year old thought it was awesome and says we should build a terminator. :lol:

Post Reply