int newI2Caddress = 28; // Pick a number between 0 and 127 that is not already on the I2C bus public MainPage() { this.InitializeComponent(); viewModel = (MainViewModel)this.DataContext; myProtractor = new Protractor(I2cController.GetDefaultAsync().GetResults(), 69, false); PollProtractor(); }
int newBaudRate = 57600; // Pick a new baud rate for the Protractor. public MainPage() { this.InitializeComponent(); viewModel = (MainViewModel)this.DataContext; myProtractor = new Protractor("COM1", currentBaudRate); PollProtractor(); }
static void Main(string[] args) { var p1Size = new SvgUnit(SvgUnitType.Millimeter, 181); var doc = new SvgDocument { Width = p1Size, Height = p1Size }; var spacer = new Spacer(boltDiameter, "Spacer"); spacer.Create(); spacer.Transforms.Add(new SvgTranslate(p1Size / 3, p1Size / 3)); doc.Children.Add(spacer); var bigTurret = TurretMount.JumboAndStandard(boltDiameter); bigTurret.Create(); bigTurret.Transforms.Add(new SvgTranslate(p1Size * 2 / 3, p1Size * 2 / 3)); doc.Children.Add(bigTurret); var protractor = new Protractor(boltDiameter, 20, 12, 10); protractor.Create(); protractor.Transforms.Add(new SvgTranslate(p1Size, 0)); doc.Children.Add(protractor); var pointer = new Pointer(boltDiameter, new float[] { 83, 112, 231, 170 }); pointer.Create(); doc.Children.Add(pointer); File.WriteAllText(@"c:\temp\Drawing.svg", doc.GetXML()); }