-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial version of the DAL programme.
- Loading branch information
1 parent
c6b4b28
commit bd2fa66
Showing
6 changed files
with
92 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
yotta_targets/* | ||
yotta_modules/* | ||
build/* | ||
*.hex | ||
*.bin | ||
*.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"build": { | ||
"target": "bbc-microbit-classic-gcc,https://github.com/lancaster-university/yotta-target-bbc-microbit-classic-gcc" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,30 @@ | ||
# incompatible-error-programme | ||
A simple BLE-enabled CODAL programme that scrolls error 927 (programme not compatible) | ||
# Incompatible V1 Error Programme | ||
|
||
A simple BLE-enabled DAL programme for micro:bit V1 that scrolls error code | ||
927 on the display. | ||
|
||
This programme is meant to be used with the | ||
[Universal Hex Creator Tool](https://tech.microbit.org/software/universal-hex-creator/) | ||
to include a micro:bit V1 hex file that scrolls the "not compatible" error code | ||
for V2-only programmes. | ||
|
||
## Dependencies | ||
|
||
- [GNU Arm Embedded Toolchain](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads) | ||
- [Git](https://git-scm.com) | ||
- [CMake](https://cmake.org/download/) | ||
- [Python 3](https://www.python.org/downloads/) | ||
- [Ninja](https://ninja-build.org/) | ||
- [Yotta](https://yottabuild.org/) | ||
|
||
Or Docker. | ||
|
||
## Build Instructions | ||
|
||
``` | ||
yotta build | ||
``` | ||
|
||
``` | ||
docker run -v $(pwd):/home --rm ghcr.io/carlosperate/microbit-toolchain:latest yotta build | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"microbit-dal": { | ||
"bluetooth": { | ||
"enabled": 1, | ||
"pairing_mode": 1, | ||
"private_addressing": 0, | ||
"open": 0, | ||
"whitelist": 1, | ||
"advertising_timeout": 0, | ||
"tx_power": 6, | ||
"security_level": "SECURITY_MODE_ENCRYPTION_NO_MITM", | ||
"event_service": 0, | ||
"dfu_service": 1, | ||
"partial_flashing": 1, | ||
"device_info_service": 1 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "error-programme", | ||
"version": "1.0.0", | ||
"description": "The micro:bit runtime common abstraction with examples.", | ||
"license": "MIT", | ||
"dependencies": { | ||
"microbit": "lancaster-university/microbit#v2.1.1" | ||
}, | ||
"targetDependencies": {}, | ||
"bin": "./src" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "MicroBit.h" | ||
|
||
MicroBit uBit; | ||
|
||
const uint8_t error_face_[] { | ||
1, 1, 0, 1, 1, | ||
1, 1, 0, 1, 1, | ||
0, 0, 0, 0, 0, | ||
0, 1, 1, 1, 0, | ||
1, 0, 0, 0, 1, | ||
}; | ||
const MicroBitImage error_face(5, 5, error_face_); | ||
|
||
int main() { | ||
uBit.init(); | ||
|
||
while (true) { | ||
uBit.display.print(error_face); | ||
uBit.sleep(1000); | ||
uBit.display.print("927"); | ||
} | ||
} |