Adding a new file
This commit is contained in:
parent
0a395e29dd
commit
02b166a732
16
Buzzer.ubl
16
Buzzer.ubl
@ -1,16 +0,0 @@
|
||||
module Buzzer
|
||||
author unknown
|
||||
version 1 0
|
||||
description ''
|
||||
|
||||
spec ' ' 'Buzzer' 'Buzzer Pin _ State _' 'auto bool' 5 true
|
||||
spec ' ' 'Buzzer2 Pin' 'Buzzer Pin _ Note _' 'auto auto' 5 1000
|
||||
|
||||
to Buzzer Pin State {
|
||||
digitalWriteOp Pin State
|
||||
}
|
||||
|
||||
to 'Buzzer2 Pin' Pin Note {
|
||||
analogWriteOp Pin Note
|
||||
}
|
||||
|
46
Spark_Digital.ubl
Normal file
46
Spark_Digital.ubl
Normal file
@ -0,0 +1,46 @@
|
||||
module Spark_Digital 'cat;Data'
|
||||
author 'Fatima Idrees'
|
||||
version 1 0
|
||||
description ''
|
||||
|
||||
spec ' ' 'Buzzer' 'Buzzer Pin _ Tone _' 'num num' 5 1000
|
||||
spec ' ' 'Buzzer2' 'Buzzer Pin _ State _' 'auto bool' 5 false
|
||||
spec ' ' 'LED' 'LED Pin _ State _' 'num bool' 18 false
|
||||
spec ' ' 'LED2 Pin' 'LED Pin _ Brightness _' 'num auto' 18 1000
|
||||
spec 'r' 'Button Pin' 'Button Pin _' 'auto' 27
|
||||
spec 'r' 'Inverted Button Pin' 'Inverted Button Pin _' 'auto' 27
|
||||
|
||||
to 'Button Pin' Input {
|
||||
local 'Read1' (digitalReadOp Input 'up')
|
||||
if (Read1 == (booleanConstant true)) {
|
||||
return (not Read1)
|
||||
} else {
|
||||
return (booleanConstant true)
|
||||
}
|
||||
}
|
||||
|
||||
to Buzzer Pin Tone {
|
||||
analogWriteOp Pin Tone
|
||||
}
|
||||
|
||||
to Buzzer2 Pin State {
|
||||
digitalWriteOp Pin State
|
||||
}
|
||||
|
||||
to 'Inverted Button Pin' Input {
|
||||
local 'Read2' (digitalReadOp Input 'up')
|
||||
if (Read2 == (booleanConstant false)) {
|
||||
return Read2
|
||||
} else {
|
||||
return (booleanConstant true)
|
||||
}
|
||||
}
|
||||
|
||||
to LED Pin State {
|
||||
digitalWriteOp Pin State
|
||||
}
|
||||
|
||||
to 'LED2 Pin' Pin Brightness {
|
||||
analogWriteOp Pin Brightness
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user