SCC.131: Digital Systems - Introduction to C/C++ CODAL (Part 1)

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/14

flashcard set

Earn XP

Description and Tags

Flashcards based on lecture notes about C/C++ CODAL programming for the micro:bit, covering hardware components, software tools, display functions, and image manipulation.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

15 Terms

1
New cards

What command is used to build MICROBIT.hex after cloning the repository?

python3 build.py (or python build.py)

2
New cards

What is DAPLink?

Software for Arm Cortex CPUs that makes micro:bit appear as a USB drive when connected to a Windows PC.

3
New cards

What is the purpose of the MicroBit class?

Consists of variables and methods that operate as drivers to control commonly used features of the micro:bit.

4
New cards

What does 'uBit.init()' do in the 'Hello World!' example?

Initialises uBit, including the scheduler, memory allocator, and Bluetooth stack.

5
New cards

What does 'uBit.display.scroll("HELLO WORLD!")' do?

Scrolls "HELLO WORLD!" across the 5x5 display of uBit.

6
New cards

What is the difference between the 'scroll' and 'print' functions in the MicroBitDisplay class?

Scroll scrolls a string pixel by pixel, while print shows the letters of a string in turn on the screen.

7
New cards

How can the speed of scrolling/printing be adjusted using 'uBit.display'?

By specifying a delay value (the lower the value, the faster the message will be scrolled/printed).

8
New cards

What are the available display modes for the MicroBitDisplay class?

DISPLAYMODEBLACKANDWHITE, DISPLAYMODEBLACKANDWHITELIGHTSENSE, and DISPLAYMODEGREYSCALE

9
New cards

How do you set the brightness in DISPLAYMODEBLACKANDWHITE?

uBit.display.setBrightness(value between 1 and 255)

10
New cards

How do you set a pixel value in the MicroBitDisplay class?

uBit.display.image.setPixelValue(x, y, brightness)

11
New cards

How does the MicroBitImage class represent a bitmap picture?

As a managed type where a string constructor takes comma-separated values representing pixel brightness from 0-255 with newline characters \n indicating new lines.

12
New cards

What does 'uBit.display.print(smiley)' do in the MicroBitImage example?

Prints the MicroBitImage named smiley on the display.

13
New cards

What is the purpose of 'myImage.paste(cross, 1, 1)' in the MicroBitImage class?

Pastes the content of the MicroBitImage cross onto myImage at pixel coordinates (1, 1).

14
New cards

How can a constant array of unsigned integers be used to store a read-only picture for the micro:bit?

By creating a MicroBitImage with a constructor that takes the dimensions and the array as arguments, allowing a bitmap representation based on the provided buffer.

15
New cards

What code is used to clear the micro:bit screen?

uBit.display.clear()