An open API service indexing awesome lists of open source software.

https://github.com/youpong/mb-neopixel

A sample project that uses NeoPixel with the BBC micro:bit
https://github.com/youpong/mb-neopixel

microbit-v2 neopixel

Last synced: 21 days ago
JSON representation

A sample project that uses NeoPixel with the BBC micro:bit

Awesome Lists containing this project

README

          

# mb-neopixel

This is a sample project that uses NeoPixel with the BBC micro:bit.
The lighting behavior is determined based on the values from the micro:bit’s
accelerometer.
This project uses the [MakeCode editor](https://makecode.microbit.org/#editor).

> Open this page at [https://youpong.github.io/mb-neopixcel/](https://youpong.github.io/mb-neopixcel/)

## Setup

### Import the project

Access the MakeCode website.
![MakeCode](./images/myprj.png)

Click *Import*.

![Import](./images/impt.png)

Select *Import URL...*

![URL](./images/url.png)

Enter the URL and click *Go ahead!*
https://github.com/youpong/mb-neopixel

### Edit main.ts

Modify the following constants to match your NeoPixel device.
For example, if the number of pixels is 8:
```ts
const PIXEL_NUM = 8;
```

### Download the program

Connect the micro:bit to your PC and download the program.

### Connecting the micro:bit and NeoPixel

Connect as follows.

| micro:bit | NeoPixel |
|-----------|----------|
| pin1 | DIN |
| 3V. | VCC |
| GND | GND |

## Use as Extension

This repository can be added as an **extension** in MakeCode.

* open [https://makecode.microbit.org/](https://makecode.microbit.org/)
* click on **New Project**
* click on **Extensions** under the gearwheel menu
* search for **https://github.com/youpong/mb-neopixcel** and import

## Edit this project

To edit this repository in MakeCode.

* open [https://makecode.microbit.org/](https://makecode.microbit.org/)
* click on **Import** then click on **Import URL**
* paste **https://github.com/youpong/mb-neopixcel** and click import

## References
- A similar project for the M5StickC Plus by M5Stack Technology written in
MicroPython.
https://github.com/youpong/m5-neopixel
- A similar project for the M5StickC Plus by M5Stack Technology developed with
Arduino IDE.
https://github.com/youpong/m5-neopixel-sketch

## License

MIT

#### Metadata (used for search, rendering)

* for PXT/microbit
makeCodeRender("{{ site.makecode.home_url }}", "{{ site.github.owner_name }}/{{ site.github.repository_name }}");