Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

Dave1374

Member Since 06 May 2013
Offline Last Active Nov 04 2015 04:32 PM
-----

Posts I've Made

In Topic: Netduino 3 and Electronic Brick of Relay

07 August 2015 - 02:56 PM

Cpu.Pins is a NETMF enumeration which specifies the physical pin # on the microcontroller itself.
 

 

Chris, is there a case where one would use Cpu.Pins instead of Pins.GPIO_PIN_## ?

 

Should I change my 

static AnalogInput sensor = new AnalogInput(Cpu.AnalogChannel.ANALOG_0);

for

static AnalogInput sensor = new AnalogInput(Pins.ANALOG_0);

In Topic: Netduino 3 and Electronic Brick of Relay

05 August 2015 - 06:53 PM

Thanks for your input, Nevyn, but it turns out there was no voltage problem.

 

It works now.

 

Apparantly, I wasn't using the correct namespace.

 

I was using

static OutputPort relay = new OutputPort(Cpu.Pin.GPIO_Pin0, false);

Which uses the Microsoft.SPOT.Hardware namespace

 

And now I'm using

OutputPort test = new OutputPort(Pins.GPIO_PIN_D5, false);

Which uses ScretLabs.NETMF.Hardware.Netduino.Pins

 

Strange enough, this works just fine and is using the Microsoft.SPOT.Hardware namespace.

static AnalogInput sensor = new AnalogInput(Cpu.AnalogChannel.ANALOG_0);
double value = sensor.Read();

I'm still confuse between the two and don't understand their specific purpose.


home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.