Windows 10 IoT Core and UPS PICo

Support for the Uninterruptible Power Supply
with Peripherals and I2C control Interface
Raspberry Pi® B+, A+, B, and A

Re: Windows 10 IoT Core and UPS PICo

Postby Pimaster » Mon Sep 05, 2016 11:20 pm

mischaboender wrote:Anybody made some progress on this? Trying to communicate to the Pico UPS over I2C, but I'm only getting "0xFF" back each time.

Hi,
I never tested it with Windows IoT.
BR PiM
Warmest Regards
PiM
---
Designing with Mentor Graphics PADS - www.pads.com
Please read and follow the PiForum rules
http://www.forum.pimodules.com/viewtopic.php?f=13&t=196
---
Pimaster
Site Admin
 
Posts: 1618
Joined: Fri Sep 14, 2012 7:50 am

Re: Windows 10 IoT Core and UPS PICo

Postby piguy45 » Tue Nov 08, 2016 10:57 am

Anyone had any luck? I'm on the latest v3 ups version, the following code throws an error @ I2cDevice.FromIdAsync
{"The requested connect mode conflicts with an existing mode on one or more of the specified pins.\r\n\r\n\\\\?\\ACPI#MSFT8000#1#{a11ee3c6-8421-4202-a3e7-b91ff90188e4}\\I2C1': The I2C bus could not be opened due to a muxing conflict. Make sure the pins are not in use by another function."}


Any help would be greatly appreciated, thanks!

const string I2cControllerName = "I2C1";
const byte I2cUpsStatusAddress = 0x69;

var deviceSelector = I2cDevice.GetDeviceSelector(I2cControllerName);
var devices = await DeviceInformation.FindAllAsync(deviceSelector);

if (devices == null || devices.Count() == 0)
throw new Exception("No i2c devices found.");

var upsStatusSettings = new I2cConnectionSettings(I2cUpsStatusAddress);
upsStatusSettings.SharingMode = I2cSharingMode.Shared;
upsStatusSettings.BusSpeed = I2cBusSpeed.FastMode;

upsStatus = await I2cDevice.FromIdAsync(devices[0].Id, upsStatusSettings);

if (upsStatus == null)
throw new Exception("Unable to open UPS Status on " + I2cUpsStatusAddress);
piguy45
 
Posts: 5
Joined: Sat Nov 05, 2016 10:00 am

Re: Windows 10 IoT Core and UPS PICo

Postby jgcramer » Wed Dec 28, 2016 7:49 pm

Any update? I use Windows IOT for two projecten and like the version 3 board.

What doesent work now?
jgcramer
 
Posts: 1
Joined: Wed Dec 28, 2016 7:38 pm

Re: Windows 10 IoT Core and UPS PICo

Postby Pimaster » Fri Jan 06, 2017 11:57 pm

Hi,

Currently I can not support you. I will check with our Linux developer to see if and how we can supply with "daemons" for windows IoT

Warmest Regards
PiM
---
Please read and follow the PiForum rules
viewtopic.php?f=13&t=196
---
Warmest Regards
PiM
---
Designing with Mentor Graphics PADS - www.pads.com
Please read and follow the PiForum rules
http://www.forum.pimodules.com/viewtopic.php?f=13&t=196
---
Pimaster
Site Admin
 
Posts: 1618
Joined: Fri Sep 14, 2012 7:50 am

Re: Windows 10 IoT Core and UPS PICo

Postby JoePie » Wed Jan 25, 2017 8:22 am

Pimaster wrote:Hi,

Currently I can not support you. I will check with our Linux developer to see if and how we can supply with "daemons" for windows IoT
gold
Warmest Regards
PiM
---
Please read and follow the PiForum rules
viewtopic.php?f=13&t=196
---

That's fair enough.
Last edited by JoePie on Thu Aug 24, 2017 11:22 am, edited 1 time in total.
JoePie
 
Posts: 1
Joined: Tue Jan 24, 2017 9:08 am

Re: Windows 10 IoT Core and UPS PICo

Postby piguy45 » Sat Feb 04, 2017 4:54 am

Pimaster wrote:I will check with our Linux developer to see if and how we can supply with "daemons" for windows IoT


Any update, or basic sample code on how to communicate to the unit via i2c?

Thanks heaps!
piguy45
 
Posts: 5
Joined: Sat Nov 05, 2016 10:00 am

Re: Windows 10 IoT Core and UPS PICo

Postby Pimaster » Sat Feb 25, 2017 1:36 am

Go to the GitHUB the code is open so you can try to adopt to your needs
Warmest Regards
PiM
---
Designing with Mentor Graphics PADS - www.pads.com
Please read and follow the PiForum rules
http://www.forum.pimodules.com/viewtopic.php?f=13&t=196
---
Pimaster
Site Admin
 
Posts: 1618
Joined: Fri Sep 14, 2012 7:50 am

Re: Windows 10 IoT Core and UPS PICo

Postby Apulus » Tue Apr 11, 2017 10:28 pm

Hi to everybody

did anybody succeed in porting the services under windows iot?
I found only this post searching on internet.

Regards
Apulus
 
Posts: 2
Joined: Tue Apr 11, 2017 10:03 pm

Re: Windows 10 IoT Core and UPS PICo

Postby Apulus » Sat Apr 22, 2017 5:30 pm

Hello to Everybody

I did a porting of the module Picofssd in Java script for Windows IOT Core based on the GPIO 22 reading and GPIO 27 for triggering the shutdown.
It was quite complicated as WINDOWS IOT core requires some register modification to allow commanding.

The file is so simple that I include it here (maybe somebody can improve or fix bugs).
An area where I would appreciate clarification is the timing of teh shutdown. Windows IOT is extremely slow and maybe the time allocated of 120 Secs is too little any experience ?

Regards


//javascript porting of PICOFSSD


var uwp = require("uwp");
uwp.projectNamespace("Windows");

var gpioController = Windows.Devices.Gpio.GpioController.getDefault();
var pin = gpioController.openPin(22);
var reset = gpioController.openPin(27);
var currentValueH = Windows.Devices.Gpio.GpioPinValue.high;
var currentValueL = Windows.Devices.Gpio.GpioPinValue.low;


pin.setDriveMode(Windows.Devices.Gpio.GpioPinDriveMode.output);
reset.setDriveMode(Windows.Devices.Gpio.GpioPinDriveMode.input);

function segnalahigh() {
pin.write(currentValueH);
// console.log('high');
}

function segnalalow() {
pin.write(currentValueL);
// console.log('low');
}


function segnala() {
setTimeout(segnalahigh,250);
setTimeout(segnalalow,500);
var spengo = reset.read();
if (spengo == currentValueL) {
// console.log('shutdown');
Windows.System.ShutdownManager.beginShutdown('Shutdown',0 );
}
}


setInterval(segnala,500); // timing
Apulus
 
Posts: 2
Joined: Tue Apr 11, 2017 10:03 pm

Re: Windows 10 IoT Core and UPS PICo

Postby demetr1ce » Fri Jul 21, 2017 9:01 am

I have written a bare bones script in C#/.NET to get my PIco UPS running on my Raspberry Pi 3 running Windows IoT. It was adapted from https://github.com/modmypi/PiModules/bl ... s/picofssd and since I suck at Python, this is best I could do :) Hope it helps, cheers.

https://github.com/demetr1ce/PIcoFssd
demetr1ce
 
Posts: 2
Joined: Fri Jul 21, 2017 8:56 am

Previous

Return to UPS PIco

Who is online

Users browsing this forum: No registered users and 2 guests

cron