File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -45,14 +45,14 @@ function Write-PhatString {
45
45
[parameter (ValueFromPipeline = $True )]
46
46
[string ]$text ,
47
47
[int ]$WaitMiliseconds = 40 ,
48
- [System.Boolean ]$forever = $false
48
+ [System.Management.Automation.SwitchParameter ]$forever ,
49
+ [int ]$iterations = 0
49
50
)
50
51
Set-PhatLedsOff
51
- if ($forever )
52
+ if ($forever -OR $iterations > 0 )
52
53
{
53
54
$text += " "
54
55
}
55
- $iterations = 0
56
56
do
57
57
{
58
58
for ($i = 0 ; $i -lt $text.Length ; ++ $i )
@@ -67,9 +67,9 @@ function Write-PhatString {
67
67
Update-PhatRegisters
68
68
Start-Sleep - Milliseconds $WaitMiliseconds
69
69
}
70
- # $iterations + =1
70
+ $iterations - =1
71
71
# Write-Host $iterations
72
- }while ($forever )
72
+ }while ($iterations -lt 0 -OR $ forever )
73
73
}
74
74
75
75
function Write-PhatChar {
@@ -233,6 +233,7 @@ function Set-PhatCrazyLeds () {
233
233
# }
234
234
235
235
Select-ScrollpHat
236
+ Set-PhatBrightness - Intensity Lowest
236
237
237
238
# Export only the functions using PowerShell standard verb-noun naming.
238
239
# Be sure to list each exported functions in the FunctionsToExport field of the module manifest file.
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ Set-I2CRegister -Device $Device -Register $ConfigurationRegisterAddress -Data $C
17
17
# x x
18
18
19
19
$registers = 0x01 .. 0x3
20
- $letterA = 0x3E , 0x05 , 0x3E
20
+ $letterA = 0x1E , 0x05 , 0x1E
21
21
22
22
$index = 0
23
23
# Set the value on $letterA array on the correspondent register.
You can’t perform that action at this time.
0 commit comments