Skip to content

Commit 9ba0ce6

Browse files
committed
no jacdac
1 parent fb9b705 commit 9ba0ce6

3 files changed

Lines changed: 23 additions & 79 deletions

File tree

dataViewSelect.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,18 @@ namespace microdata {
5757
}))
5858
}
5959

60-
btns[0].push(new Button({
61-
parent: null,
62-
style: ButtonStyles.Transparent,
63-
icon: "linear_graph_1",
64-
ariaId: "Jacdac Light Experiment",
65-
x: 0,
66-
y,
67-
onClick: () => {
68-
this.app.popScene()
69-
this.app.pushScene(new JacdacLightExperiment(this.app))
70-
},
71-
}))
60+
// btns[0].push(new Button({
61+
// parent: null,
62+
// style: ButtonStyles.Transparent,
63+
// icon: "linear_graph_1",
64+
// ariaId: "Jacdac Light Experiment",
65+
// x: 0,
66+
// y,
67+
// onClick: () => {
68+
// this.app.popScene()
69+
// this.app.pushScene(new JacdacLightExperiment(this.app))
70+
// },
71+
// }))
7272

7373
btns[0].push(new Button({
7474
parent: null,

pxt.json

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,7 @@
77
"radio": "*",
88
"microphone": "*",
99
"datalogger": "*",
10-
"user-interface-base": "github:microbit-apps/user-interface-base#v0.0.33",
11-
"jacdac": "github:jacdac/pxt-jacdac#v1.9.40",
12-
"jacdac-light-level": "github:jacdac/pxt-jacdac/light-level#v1.9.40",
13-
"jacdac-soil-moisture": "github:jacdac/pxt-jacdac/soil-moisture#v1.9.40",
14-
"jacdac-distance": "github:jacdac/pxt-jacdac/distance#v1.9.40",
15-
"jacdac-temperature": "github:jacdac/pxt-jacdac/temperature#v1.9.40",
16-
"jacdac-flex": "github:jacdac/pxt-jacdac/flex#v1.9.40",
17-
"jacdac-led": "github:jacdac/pxt-jacdac/led#v1.9.40",
18-
"jacdac-led-strip": "github:jacdac/pxt-jacdac/led-strip#v1.9.40",
19-
"jacdac-color": "github:jacdac/pxt-jacdac/color#v1.9.40"
10+
"user-interface-base": "github:microbit-apps/user-interface-base#v0.0.33"
2011
},
2112
"files": [
2213
"analytics.ts",
@@ -35,8 +26,7 @@
3526
"tabularDataViewer.ts",
3627
"generateGraph.ts",
3728
"distributedLogging.ts",
38-
"headlessMode.ts",
39-
"experiments.ts"
29+
"headlessMode.ts"
4030
],
4131
"testFiles": [
4232
"test.ts"

sensors.ts

Lines changed: 9 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -477,66 +477,20 @@ namespace microdata {
477477
max: 360,
478478
isJacdacSensor: false
479479
});
480-
480+
else
481+
return new Sensor({
482+
name: "Microphone",
483+
rName: "V",
484+
f: () => input.soundLevel(),
485+
min: 0,
486+
max: 255,
487+
isJacdacSensor: false
488+
});
481489
//--------------------------------------------
482490
// Jacdac Sensors:
483491
// See https://github.com/microsoft/pxt-jacdac
484492
//--------------------------------------------
485493

486-
else if (name == "Jac Light" || name == "Jacdac Light" || name == "JL")
487-
return new Sensor({
488-
name: "Jac Light",
489-
rName: "JL",
490-
f: () => modules.lightLevel1.isConnected() ? modules.lightLevel1.lightLevel() : undefined,
491-
min: 0,
492-
max: 100,
493-
isJacdacSensor: true,
494-
setupFn: () => modules.lightLevel1.start()
495-
});
496-
497-
else if (name == "Jac Moist" || name == "Jacdac Moisture" || name == "JM")
498-
return new Sensor({
499-
name: "Jac Moist",
500-
rName: "JM",
501-
f: () => modules.soilMoisture1.isConnected() ? modules.soilMoisture1.moisture() : undefined,
502-
min: 0,
503-
max: 100,
504-
isJacdacSensor: true,
505-
setupFn: () => modules.soilMoisture1.start()
506-
});
507-
508-
else if (name == "Jac Dist" || name == "Jacdac Distance" || name == "JD")
509-
return new Sensor({
510-
name: "Jac Dist",
511-
rName: "JD",
512-
f: () => modules.distance1.isConnected() ? modules.distance1.distance() : undefined,
513-
min: 0,
514-
max: 4,
515-
isJacdacSensor: true,
516-
setupFn: () => modules.distance1.start()
517-
});
518-
519-
else if (name == "Jac Flex" || name == "Jacdac Flex" || name == "JF")
520-
return new Sensor({
521-
name: "Jac Flex",
522-
rName: "JF",
523-
f: () => modules.flex1.isConnected() ? modules.flex1.bending() : undefined,
524-
min: -100,
525-
max: 100,
526-
isJacdacSensor: true,
527-
setupFn: () => modules.flex1.start()
528-
});
529-
530-
else
531-
return new Sensor({
532-
name: "Jac Temp",
533-
rName: "JT",
534-
f: () => modules.temperature1.isConnected() ? modules.temperature1.temperature() : undefined,
535-
min: -40,
536-
max: 120,
537-
isJacdacSensor: true,
538-
setupFn: () => modules.temperature1.start()
539-
});
540494
}
541495

542496

0 commit comments

Comments
 (0)