You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cbcore.ts
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -344,21 +344,21 @@ namespace cyberbot {
344
344
returnread_r();
345
345
}
346
346
347
-
/**
348
-
* Sends a signal to the PING))) which sends out an ultrasonic sound wave and records the time it takes in microseconds for the signal to return then outputs either the time it takes or the distance depending on the units you choose
349
-
* @param pin The cyberbot pin connected to the PING))), eg: ServoPin.Pin16
350
-
* @param unit The units used for the distance measured
351
-
*/
352
-
//% blockId="cyberbot_ping" block="send ping on pin %pin measured in %unit"
353
-
//% group="Sensors"
354
-
//% weight=348
355
-
exportfunctionping(pin: ServoPin,unit: Units){
356
-
sendCommand(pin,null,PING_ECHO,0,null,null);
357
-
letd=read_r();
358
-
if(unit==1){returnd}
359
-
elseif(unit==2){returnd/148}
360
-
else{returnd/58}
361
-
}
347
+
// /**
348
+
// * Sends a signal to the PING))) which sends out an ultrasonic sound wave and records the time it takes in microseconds for the signal to return then outputs either the time it takes or the distance depending on the units you choose
349
+
// * @param pin The cyberbot pin connected to the PING))), eg: ServoPin.Pin16
350
+
// * @param unit The units used for the distance measured
351
+
// */
352
+
// //% blockId="cyberbot_ping" block="send ping on pin %pin measured in %unit"
353
+
// //% group="Sensors"
354
+
// //% weight=348
355
+
// export function ping(pin: ServoPin, unit: Units) {
0 commit comments