Add calibration, servomotor, and distance travel snippets/setup
This commit is contained in:
Vendored
+16
@@ -57,5 +57,21 @@
|
||||
"prefix": "board.Buzzer",
|
||||
"body": "board.Buzzer(${1:pitch}, ${2:duration});",
|
||||
"description": "Plays a sound on the buzzer."
|
||||
},
|
||||
"Servomotor": {
|
||||
"prefix": "board.Servomotor",
|
||||
"body": "board.Servomotor(${1:PORT}, ${2:ANGLE});",
|
||||
"description": "Sets the servomotor angle."
|
||||
},
|
||||
"DCMotorTravelDistance": {
|
||||
"prefix": "MoveCm",
|
||||
"body": "// Distance = ${1:30}cm, Speed = ${2:speedVar}\nboard.Move(${3:FORWARD}, ${4:POWER}, (#${1:30}*${2:speedVar}), ${5:COAST});",
|
||||
"description": "Moves DC motor for a distance in cm (using #cm*Variable syntax)"
|
||||
},
|
||||
"SetDCMotorCalibration": {
|
||||
"prefix": "SetDCMotorCalibration",
|
||||
"body": "byte calib[] = { ${1:100}, ${2:100} };\nboard.SetDCMotorCalibration(calib);",
|
||||
"description": "Sets DC Motor speed calibration."
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user