MicroPython for Micro:bit - Onboard Sensors and How to Write Functions

Опубликовано: 30 Сентябрь 2024
на канале: Core Electronics
4,630
50

The micro:bit has some sensors built into it, not all MicroPython boards come with sensors built in but many do, and the way that we interface with them is in most cases the same. The first step is to import the required library then use that library to grab the data from the sensor.

We are also going to look at some more python constructs the list and the function. Lists store a collection of variables under the same name and can be indexed conveniently. A function is a block of code we can call at any time.

The great thing about working with built-in sensors and outputs is that we do not need to wire up any circuits to make this work.

Full Guide: https://core-electronics.com.au/tutor...

Core Electronics is located in the heart of Newcastle, Australia. We're powered by makers, for makers. Drop by if you are looking for:

Micro:bit https://core-electronics.com.au/brand...

Micro:bit Go Kit https://core-electronics.com.au/catal...

Micro:bit https://core-electronics.com.au/catal...