Deleting unnecessary files
This commit is contained in:
parent
bcedcdac2f
commit
70868e049c
@ -30,4 +30,5 @@ The function now converts the percentage to a value between 0 and 1023 using PWM
|
||||
|
||||
## Usage Example:
|
||||

|
||||
|
||||
A way to test the Library!
|
||||
|
27
FanMotor.ubp
27
FanMotor.ubp
@ -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
|
||||
}
|
||||
|
BIN
Images/3.png
BIN
Images/3.png
Binary file not shown.
Before Width: | Height: | Size: 131 KiB |
@ -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 {}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user