-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Adam0Brien
committed
Mar 7, 2024
1 parent
d068fcb
commit 95c0ffe
Showing
7 changed files
with
132 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
namespace USVSensorPod { | ||
|
||
|
||
export enum direction { | ||
//% block="Forward Fast" | ||
FullSpeedForward = 120, | ||
//% block="Backward Fast" | ||
FullSpeedBackwards = 60, | ||
//% block="Forward Slow" | ||
HalfSpeedForward = 105, | ||
//% block="Backward Slow" | ||
HalfSpeedBackward = 75, | ||
//% block="Stop" | ||
Stop = 89, | ||
} | ||
|
||
export enum Motors { | ||
//%blockId=usv_motor_one | ||
//% block="Left Motor" | ||
Motor1 = 0, | ||
//%blockId=usv_motor_two | ||
//% block="Right Motor" | ||
Motor2 = 1 | ||
} | ||
|
||
/** | ||
* Configure the USV Motors. | ||
*/ | ||
//% weight=50 | ||
//% color=#7F74D5 | ||
//% subcategory=USV | ||
//% group="Movement" | ||
//% blockId=USV_Motor block="Move |%Motor|%speed" | ||
//% speed.min=60 speed.max=120 | ||
//% index.fieldEditor="gridpicker" index.fieldOptions.columns=2 | ||
export function USV_Motor(index: Motors, speed: direction): void { | ||
|
||
if (index == 0) { | ||
// turn left motor | ||
} | ||
if (index == 1) { | ||
// turn right motor | ||
} | ||
|
||
} | ||
|
||
|
||
//% blockId=stopMotors | ||
//% block="Stop Motors" | ||
//% weight=50 | ||
//% color=#7F74D5 | ||
//% subcategory=USV | ||
//% group="Movement" | ||
export function stopMotors(): void { | ||
|
||
} | ||
|
||
|
||
export enum Crane { | ||
//%blockId=crane_down | ||
//% block="Down" | ||
down = 0, | ||
//%blockId=crane_up | ||
//% block="Up" | ||
up = 1 | ||
} | ||
|
||
|
||
/** | ||
* Configure the USV Crane. | ||
*/ | ||
//% weight=50 | ||
//% color=#29D215 | ||
//% subcategory=USV | ||
//% group="Crane" | ||
//% blockId=USV_Crane block="Bring Crane |%Motor" | ||
//% index.fieldEditor="gridpicker" index.fieldOptions.columns=2 | ||
export function craneDirection(index: Crane): void { | ||
|
||
if (index == 0) { | ||
// crane down | ||
} | ||
if (index == 1) { | ||
// crane up | ||
} | ||
|
||
} | ||
|
||
|
||
//% blockId=calculateTempC | ||
//% block="Sensor Pod Temperature °C" | ||
//% subcategory=Sensor Pod | ||
//% color=#442FDE | ||
//% group="Sensors" | ||
export function calculateTempC(): number { | ||
// Ask sensor pod for temperature through radio | ||
return 0 | ||
} | ||
|
||
//% blockId=calculateTempF | ||
//% block="Sensor Pod Temperature °F" | ||
//% subcategory=Sensor Pod | ||
//% color=#442FDE | ||
//% group="Sensors" | ||
export function calculateTempF(): number { | ||
// Ask sensor pod for temperature | ||
return 0 | ||
} | ||
|
||
//% blockId=calculatePh | ||
//% block="Sensor Pod pH" | ||
//% subcategory=Sensor Pod | ||
//% color=#442FDE | ||
//% group="Sensors" | ||
export function calculatePh(): number { | ||
// Ask sensor pod for pH | ||
return 0 | ||
} | ||
|
||
//% blockId=Sensor Pod Light | ||
//% block="Sensor Pod Light" | ||
//% subcategory=Sensor Pod | ||
//% color=#442FDE | ||
//% group="Sensors" | ||
export function getLight(): number { | ||
// Ask sensor pod for LDR reading | ||
return 0 | ||
} | ||
|
||
} | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters