Skip to content

Commit b844f38

Browse files
committed
Add correct text for sensors
1 parent f205406 commit b844f38

3 files changed

Lines changed: 41 additions & 25 deletions

File tree

src/view/components/toolbar/SensorModalUtils.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ export const LABEL_TO_MODAL_CONTENT_CONSTRUCTOR = new Map([
425425
CLUE_TOOLBAR_ICON_ID.ACCELEROMETER,
426426
CLUE_MODAL.CLUE_ACCELEROMETER_MODAL_CONTENT,
427427
],
428+
[CLUE_TOOLBAR_ICON_ID.SPEAKER, CLUE_MODAL.CLUE_SPEAKER_MODAL_CONTENT],
428429
]);
429430

430431
export const getModalContent = (

src/view/components/toolbar/clue/ClueModalContent.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,3 +240,17 @@ export const CLUE_LED_CONTENT = (
240240
id: "clue_neopixel",
241241
};
242242
};
243+
export const CLUE_SPEAKER_MODAL_CONTENT = (
244+
onUpdateValue: (sensor: SENSOR_LIST, value: number) => void,
245+
sensorValues: { [key: string]: number }
246+
): IModalContent => {
247+
return {
248+
descriptionTitle: "toolbar-speaker.title",
249+
tagInput: undefined,
250+
tagOutput: TAG_OUTPUT_SVG,
251+
descriptionText: "toolbar-clue-speaker.description",
252+
tryItDescription: "toolbar-speaker.tryItDescription",
253+
components: [FEATURE_REQUEST_ON_GITHUB],
254+
id: "speaker",
255+
};
256+
};

src/view/translations/en.json

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -51,39 +51,40 @@
5151
"toolbar-microbit-wireless.description": "micro:bits can use radio waves and bluetooth services to communicate with each other",
5252
"toolbar-microbit-wireless.tryItDescription": "If you would like to see this sensor supported, please +1 the feature addition issue on GitHub! For now, you can try it on MakeCode!",
5353
"toolbar-clue-temperature-sensor.title": "Temperature",
54-
"toolbar-clue-temperature-sensor.description": "",
55-
"toolbar-clue-temperature-sensor.tryItDescription": "",
54+
"toolbar-clue-temperature-sensor.description": "CLUE uses the BMP280 sensor, an environmental sensor with temperature.This precision sensor from Bosch is the best low-cost, precision sensing solution for measuring temperature with ±1.0°C accuracy.",
55+
"toolbar-clue-temperature-sensor.tryItDescription": "You can set the temperature range from your code!",
5656
"toolbar-clue-light-sensor.title": "Light/Color Sensor",
57-
"toolbar-clue-light-sensor.description": "",
58-
"toolbar-clue-light-sensor.tryItDescription": "",
57+
"toolbar-clue-light-sensor.description": "The light sensor uses APDS9960 and is able to return the red, blue, green and clear light.",
58+
"toolbar-clue-light-sensor.tryItDescription": "You can set the color values of the light detected.",
5959
"toolbar-clue-accelerometer-sensor.title": "Accelerometer",
60-
"toolbar-clue-accelerometer-sensor.description": "",
61-
"toolbar-clue-accelerometer-sensor.tryItDescription": "",
60+
"toolbar-clue-accelerometer-sensor.description": " The 3-axis accelerometer, can tell you which direction is down towards the Earth (by measuring gravity) or how fast the board is accelerating in 3D space.",
61+
"toolbar-clue-accelerometer-sensor.tryItDescription": "Set the acceleration with the sliders.",
6262
"toolbar-clue-led.title": "Neopixel",
63-
"toolbar-clue-led.description": "",
64-
"toolbar-clue-led.tryItDescription": "",
63+
"toolbar-clue-led.description": "The CLUE has one full RGB LED on it's back",
64+
"toolbar-clue-led.tryItDescription": "Run your code and see the cool effects on the simulator!",
6565
"toolbar-clue-a-b-push.title": "Buttons",
66-
"toolbar-clue-a-b-push.description": "",
67-
"toolbar-clue-a-b-push.tryItDescription": "",
66+
"toolbar-clue-a-b-push.description": "There are two buttons on the front of the CLUE (labelled A and B). The third button is to trigger both A and B buttons. You can detect when these buttons are pressed, allowing you to trigger code on the device.",
67+
"toolbar-clue-a-b-push.tryItDescription": "Click them with your mouse or by pressing “A” and/or “B” on your keyboard!",
6868
"toolbar-clue-gpio.title": "Input/Output (GPIO)",
69-
"toolbar-clue-gpio.description": "",
70-
"toolbar-clue-gpio.tryItDescription": "",
69+
"toolbar-clue-gpio.description": "On the bottom edge of your CLUE, you have 25 pins. These pins allow you to really get creative. You can create circuits, connect external things like buzzers and motors and make your own fun projects.",
70+
"toolbar-clue-gpio.tryItDescription": "If you would like to see this sensor supported, please +1 the feature addition issue on GitHub!",
7171
"toolbar-clue-sound-sensor.title": "Sound",
72-
"toolbar-clue-sound-sensor.description": "",
73-
"toolbar-clue-sound-sensor.tryItDescription": "",
72+
"toolbar-clue-sound-sensor.description": "The CLUE uses a PDM MEMS microphone. PDM is a little like 1-bit PWM. You clock the mic with a 1 MHz - 3 MHz clock rate, and on the data line you'll get a square wave out that syncs with the clock.",
73+
"toolbar-clue-sound-sensor.tryItDescription": "If you would like to see this sensor supported, please +1 the feature addition issue on GitHub!",
7474
"toolbar-clue-pressure-sensor.title": "Pressure",
75-
"toolbar-clue-pressure-sensor.description": "",
76-
"toolbar-clue-pressure-sensor.tryItDescription": "",
75+
"toolbar-clue-pressure-sensor.description": "CLUE uses the BMP280 sensor for barometric pressure. Because pressure changes with altitude, and the pressure measurements are so good, you can also use it as an altimeter with ±1 meter accuracy.",
76+
"toolbar-clue-pressure-sensor.tryItDescription": "You can set the pressure here.",
7777
"toolbar-clue-humidity-sensor.title": "Humidity",
78-
"toolbar-clue-humidity-sensor.description": "",
79-
"toolbar-clue-humidity-sensor.tryItDescription": "",
78+
"toolbar-clue-humidity-sensor.description": "The SHT30-D sensor has an excellent ±2% relative humidity and ±0.5°C accuracy for most uses.",
79+
"toolbar-clue-humidity-sensor.tryItDescription": "You can set the humidity % here.",
8080
"toolbar-clue-gesture-sensor.title": "Gesture",
81-
"toolbar-clue-gesture-sensor.description": "",
82-
"toolbar-clue-gesture-sensor.tryItDescription": "",
81+
"toolbar-clue-gesture-sensor.description": "The gesture sensor can detect directional gestures (left to right, right to left, up to down, down to up), but in theory more complicated gestures like zig-zag, clockwise or counterclockwise circle, near to far, etc. could also be detected with additional code. ",
82+
"toolbar-clue-gesture-sensor.tryItDescription": "Select a gesture and send it by clicking the button.",
8383
"toolbar-clue-proximity-sensor.title": "Proximity",
84-
"toolbar-clue-proximity-sensor.description": "",
85-
"toolbar-clue-proximity-sensor.tryItDescription": "",
84+
"toolbar-clue-proximity-sensor.description": "The proximity sensor uses APDS9960 and is able to return how close an object is to the front of the sensor.",
85+
"toolbar-clue-proximity-sensor.tryItDescription": "You can set the proximity here.",
8686
"toolbar-clue-bluetooth.title": "Bluetooth",
87-
"toolbar-clue-bluetooth.description": "",
88-
"toolbar-clue-bluetooth.tryItDescription": ""
89-
}
87+
"toolbar-clue-bluetooth.description": "You can transmit data over Bluetooth to a computer or mobile device for data plotting and logging, or save it to the built in storage.",
88+
"toolbar-clue-bluetooth.tryItDescription": "If you would like to see this sensor supported, please +1 the feature addition issue on GitHub! ",
89+
"toolbar-clue-speaker.description": "The CLUE has a buzzer/speaker for playing tones and beeps."
90+
}

0 commit comments

Comments
 (0)