-
Notifications
You must be signed in to change notification settings - Fork 29
Conversation
I actually really like that this example is a script and not a module. It's very unique in that sense. :) |
Very nice! |
Thank you @tylerl0706 , I wanted to make it as simple and straight forward as possible :) @anmenaga I've noticed that moments later. I've not added because I don't know if I need to set that copyright thing as well. Can you check that? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really looking good! I just have a few questions :)
Also can you add it to the ToC for the examples?
|
||
we need to set the register 1 with data 0x0D (0000 1101). | ||
|
||
This example assumes that you already have I2C enabled and Microsoft.PowerShell.IoT module installed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you link to the install instructions in this repo?
https://github.com/PowerShell/PowerShell-IoT#installation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add the line to enable I2C since it's simple.
Actually, if you wanted to, you can totally copy the first 2 sections under installation:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure thing! will do
######### Data Registers and value ######### | ||
[int[]]$DataRegisterAddress = 0x04 ..0x08 | ||
[int[]]$values = 0x12,0x08,0x08,0x08,0x12 | ||
######### Lightning Effect Register and value ######### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you say Lightning Effect, do you mean flashing on and off?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or is this for the brightness?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh maybe it wasn't the best choice of words... It's just the brightness. I'll change that as well
@@ -0,0 +1,34 @@ | |||
Import-Module Microsoft.PowerShell.IoT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah this file will need the copyright. You can do it if you want or I can add it before merging.
…e clearer. Added instructions to install the module and enable I2C
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
(Aside from the one tiny note 😀)
$Device = Get-I2CDevice -Id $DeviceAddress -FriendlyName phat | ||
Set-I2CRegister -Device $Device -Register $ConfigurationRegisterAddress -Data $ConfigurationRegisterValue | ||
|
||
######## Lightning Effect ##### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed a "Lightning" change :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
God damn it!
This pull requests adds an example that displays the legendary "Sad Joey" on the Scroll pHat, and also a small "explanation" on how this is achieved