diff --git a/Documentation/README.md b/Documentation/README.md index 750bb3a..a692e65 100644 --- a/Documentation/README.md +++ b/Documentation/README.md @@ -30,4 +30,5 @@ The function now converts the percentage to a value between 0 and 1023 using PWM ## Usage Example: ![](../Images/5.png) + A way to test the Library! diff --git a/FanMotor.ubp b/FanMotor.ubp deleted file mode 100644 index e597754..0000000 --- a/FanMotor.ubp +++ /dev/null @@ -1,27 +0,0 @@ -module main -author unknown -version 1 0 -description '' -variables PWM - - spec ' ' 'MotorFan' 'MotorFan _ _ _' 'num bool auto' 23 true 50 - -to MotorFan Pin State Speed { - if (and (Speed > 0) (Speed <= 100)) { - PWM = (absoluteValue (((Speed - 1) * ((1023 - 1) / 99)) + 1)) - if (State == (booleanConstant true)) { - if (and (PWM > 0) (PWM < 1024)) {analogWriteOp Pin PWM} - } else { - digitalWriteOp Pin false - } - } -} - -script 123 184 { -whenStarted -comment 'Enter (Pin, State, Speed%)' -MotorFan 23 true 50 -waitMillis 1000 -MotorFan 23 false 50 -} - diff --git a/Images/3.png b/Images/3.png deleted file mode 100644 index 5acc84d..0000000 Binary files a/Images/3.png and /dev/null differ diff --git a/MotorFanLibrary.ubp b/MotorFanLibrary.ubp deleted file mode 100644 index 4501ed3..0000000 --- a/MotorFanLibrary.ubp +++ /dev/null @@ -1,44 +0,0 @@ -module main -author unknown -version 1 0 -description '' - - spec ' ' 'MotorFan' 'MotorFan _ _' 'num bool' 10 true - spec ' ' 'MotorSpeed' 'MotorSpeed _ _' 'auto auto' '10' '10' - -to MotorFan Pin State { - comment 'اوصل محرك المروحة بالمنفذ الذي وضعته' - comment 'حدد حالة المحرك ' - if (State == (booleanConstant true)) { - digitalWriteOp Pin true - } else { - digitalWriteOp Pin false - } -} - -to MotorSpeed Pin Speed { - comment 'اوصل محرك المروحة بالمنفذ الذي وضعته' - comment 'ضع السرعة التي تودها' - comment 'محرك المروحة يعمل وفقا للسرعة الموضوعة' - if (and (Speed > 0) (Speed < 1024)) { - analogWriteOp Pin Speed - } else { - digitalWriteOp Pin false - } -} - -script 67 68 { -to MotorFan {} -} - -script 451 147 { -whenStarted -MotorSpeed 23 500 -waitMillis 1500 -MotorSpeed 23 0 -} - -script 66 369 { -to MotorSpeed {} -} - diff --git a/MotorFanLibraryv2.ubp b/MotorFanLibraryv2.ubp deleted file mode 100644 index ed5af45..0000000 --- a/MotorFanLibraryv2.ubp +++ /dev/null @@ -1,26 +0,0 @@ -module main -author unknown -version 1 0 -description '' - - spec ' ' 'MotorFan' 'MotorFan _ _ _' 'num bool auto' 23 true 500 - -to MotorFan Pin State Speed { - if (State == (booleanConstant true)) { - if (and (Speed > 0) (Speed < 1024)) {analogWriteOp Pin Speed} - } else { - digitalWriteOp Pin false - } -} - -script 67 68 { -to MotorFan {} -} - -script 628 144 { -whenStarted -MotorFan 23 true 500 -waitMillis 1000 -MotorFan 23 false 10 -} - diff --git a/MotorFanLibraryv3.ubp b/MotorFanLibraryv3.ubp deleted file mode 100644 index 23c038f..0000000 --- a/MotorFanLibraryv3.ubp +++ /dev/null @@ -1,31 +0,0 @@ -module main -author unknown -version 1 0 -description '' -variables PWM - - spec ' ' 'MotorFan' 'MotorFan _ _ _' 'num bool auto' 23 true 500 - -to MotorFan Pin State Speed { - if (and (Speed > 0) (Speed <= 100)) { - PWM = (absoluteValue (((Speed - 1) * ((1023 - 1) / 99)) + 1)) - if (State == (booleanConstant true)) { - if (and (PWM > 0) (PWM < 1024)) {analogWriteOp Pin PWM} - } else { - digitalWriteOp Pin false - } - } -} - -script 134 74 { -to MotorFan {} -} - -script 695 150 { -whenStarted -comment 'Enter (Pin, State, Speed%)' -MotorFan 23 true 12 -waitMillis 1000 -MotorFan 23 false 10 -} -