Windows IoT Core: Software PWM on the Raspberry Pi – RaspBerry Pi, Arduino, Internet Of Think (IOT)

Windows IoT Core: Software PWM on the Raspberry Pi

SCHEMATICS

Wiring Setup
Wiring setup
Software pwm wiring diagram

CODE

MainPage.xaml Code ListingPlain text
<Page
    x:Name="pgMain"
    x:Class="PiSoftwarePWM.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:PiSoftwarePWM"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" Unloaded="pgMain_Unloaded">
 
    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="125" />
            <RowDefinition Height="40"/>
            <RowDefinition />
        </Grid.RowDefinitions>
        <TextBlock x:Name="lblSoftwarePWM" Margin="10" HorizontalAlignment="Left"  
                TextWrapping="Wrap" Text="Software PWM" VerticalAlignment="Center" 
                Width="439" Height="49" FontSize="36"/>
        <TextBlock x:Name="lblDutyCycle" Margin="10" HorizontalAlignment="Left" Grid.Row="1" 
                TextWrapping="Wrap" Text="Duty Cycle" VerticalAlignment="Top" Width="357"/>
        <Slider x:Name="slDutyCycle" Margin="10" HorizontalAlignment="Left" Grid.Row="2" 
                Width="462" TickFrequency="25" ValueChanged="slDutyCycle_ValueChanged"/>
    </Grid>
</Page>

 

Share This: