Skip to content

Commit

Permalink
Add initial catalog and validator plans for Micro:bit (#5443)
Browse files Browse the repository at this point in the history
I expect these will be iterated on. I just wanted to have something here to get started.
  • Loading branch information
thsparks authored Jan 30, 2024
1 parent 19bcbe0 commit a5d25f8
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/teachertool/catalog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"criteria": [
{
"id": "D285D79B-85E5-4C8D-82D2-5A9E35AB1163",
"use": "show_icon_on_screen",
"template": "Show an icon on the LED screen",
"docPath": "/teachertool"
},
{
"id": "C57344FC-B915-4ACB-A070-67F8FFC18B4B",
"use": "read_gpio_pin",
"template": "Read a GPIO pin",
"description": "Read input from one or more of the microbit GPIO pins.",
"docPath": "/teachertool"
}
]
}
3 changes: 3 additions & 0 deletions docs/teachertool/test/catalog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"criteria": []
}
3 changes: 3 additions & 0 deletions docs/teachertool/test/validator-plans.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"validatorPlans": []
}
60 changes: 60 additions & 0 deletions docs/teachertool/validator-plans.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"validatorPlans": [
{
".desc": "Set the LED screen.",
"name": "show_icon_on_screen",
"threshold": 1,
"checks": [
{
"validator": "blocksExist",
"blockCounts": {
"basic_show_icon": 1
}
}
]
},
{
".desc": "Read input from a GPIO pin.",
"name": "read_gpio_pin",
"threshold": 1,
"checks": [
{
"validator": "blocksExist",
"blockCounts": {
"device_pin_event": 1
}
},
{
"validator": "blocksExist",
"blockCounts": {
"device_pin_is_pressed": 1
}
},
{
"validator": "blocksExist",
"blockCounts": {
"device_pin_released": 1
}
},
{
"validator": "blocksExist",
"blockCounts": {
"device_get_digital_pin": 1
}
},
{
"validator": "blocksExist",
"blockCounts": {
"device_get_analog_pin": 1
}
},
{
"validator": "blocksExist",
"blockCounts": {
"pins_on_pulsed": 1
}
}
]
}
]
}

0 comments on commit a5d25f8

Please sign in to comment.