Add Studuino boilerplate, autocomplete snippets, and AGENTS.md instructions

This commit is contained in:
alvinlollo
2026-10-09 12:59:00 +11:00
parent 75d2099655
commit ed32bcedd2
3 changed files with 92 additions and 0 deletions
+61
View File
@@ -0,0 +1,61 @@
{
"Studuino Boilerplate": {
"prefix": "studuino_boilerplate",
"body": [
"#include <Arduino.h > // Basic header file",
"#include <Servo.h>",
"// Servomotor header file",
"#include <Wire.h>",
"// I2C device header file",
"#include <MMA8653.h> // Accelerometer header file",
"#include <MPU6050.h>",
"// Gyroscope header file",
"#include <IRremoteForStuduino.h>",
"// IR Receiver header file",
"#include <ColorSensor.h>",
"// Color Sensor header file",
"#include \"Studuino.h\" // Studuino header file",
"",
"Studuino board;",
"",
"void setup() {",
" $1",
"}",
"",
"void loop() {",
" $2",
"}"
],
"description": "Standard Studuino header includes and boilerplate"
},
"InitSensorPort": {
"prefix": "InitSensorPort",
"body": "board.InitSensorPort(${1:PORT}, ${2:TYPE});",
"description": "Initializes a sensor port."
},
"GetUltrasonicSensorValue": {
"prefix": "GetUltrasonicSensorValue",
"body": "GetUltrasonicSensorValue(${1:trigger}, ${2:echo})",
"description": "Retrieves the value of an Ultrasonic Sensor."
},
"GetGyroscopeValue": {
"prefix": "GetGyroscopeValue",
"body": "GetGyroscopeValue(${1|X_AXIS,Y_AXIS,Z_AXIS,GX_AXIS,GY_AXIS,GZ_AXIS|})",
"description": "Retrieves acceleration and angular velocity of a Gyroscope."
},
"Move": {
"prefix": "board.Move",
"body": "board.Move(${1:direction}, ${2:power}, ${3:duration}, ${4:stopMode});",
"description": "Moves DC Motors."
},
"LED": {
"prefix": "board.LED",
"body": "board.LED(${1:port}, ${2:color});",
"description": "Sets the LED color."
},
"Buzzer": {
"prefix": "board.Buzzer",
"body": "board.Buzzer(${1:pitch}, ${2:duration});",
"description": "Plays a sound on the buzzer."
}
}