Skip to the content.

Open this page at https://devegied.github.io/pxt-max6958/

Digit Display (MAX6958)

makecode Digit Display (MAX6958) extension for micro:bit

LED Digit Display with 1-4 7-segment LED, it can show numbers. It has MAX6958 chip controled with a 2-wire interface.

Use as Extension

This repository can be added as an extension in MakeCode.

Edit this project Build status badge

To edit this repository in MakeCode.

API

MAX6958=github:devegied/pxt-max6958
MAX6958.init(5, 4, MAX6958.ADDRESS.AA38, MAX6958.MAXDIG0On.Left)

Optionaly initialize the display controller by defining intensity, digit count, i2c address and position of Digit 0

MAX6958.on()

Turn on display

MAX6958.off()

Turn off display

MAX6958.clear()

Clear (and turn on) display

MAX6958.showLED(1, true)

Light on or off separate LEDs (not in segmented display)

MAX6958.showDP(1, true)

Light on or off dot points next to the digits

MAX6958.showDigitAt(5, 1)

Show a digit at given position

MAX6958.lightSegmentsAt(0x7F, 1)

Light indicated segments at given position

segments value can be calculated by adding segment values:

MAX6958.showInteger(1234)

Show a decimal integer number (between -999 and 9999 on four digits display)

If value is to small (when negative) or to big display shows “-“ in all places

MAX6958.showHex(0xABCD)

Show a hexadecimal integer number (between -0x0FFF and 0xFFFF on four digits display)

If value is to small (when negative) or to big display shows “-“ in all places

Blocks preview

This image shows the blocks code from the last commit in master. This image may take a few minutes to refresh.

A rendered view of the blocks

License

Licensed under the MIT License (MIT). See LICENSE file for more details.

Copyright (c) 2022, devegied

Metadata (used for search, rendering)