Secret Labs LLC Netduino Go Potentiometer Modules

Various
Delivered between Sat, 24.5. and Wed, 28.5.
Only 2 items in stock at supplier

Product details

Netduino Go! - Potentiometer Module

Sample Code:

using Microsoft.SPOT;
namespace Module_Tests {
public class Program {
public static void Main() {
NetduinoGo.RgbLed led = new NetduinoGo.RgbLed();
NetduinoGo.Potentiometer pot = new NetduinoGo.Potentiometer();
// pot.GetValue() - Returns a float from 0 to 1.
while (true) {
led.SetColor(0, 0, (byte)(pot.GetValue() * 255));
}
}
}
}

Code with method to set a custom range:

using Microsoft.SPOT;
namespace Module_Tests {
public class Program {
public static void Main() {
NetduinoGo.RgbLed led = new NetduinoGo.RgbLed();
NetduinoGo.Potentiometer pot = new NetduinoGo.Potentiometer();
while (true) {
led.SetColor(0, 0, (byte)(Map(pot.GetValue(), 0, 1, 0, 255)));
}
}

// Used for mapping range of values to another range, linearly.
public static float Map(float input, float inMin, float inMax, float outMin, float outMax) {
return ((input - inMin) * (outMax - outMin) / (inMax - inMin) + outMin);
}
}
}.

Key specifications

Compatible hardware
Various
Item number
5998855

General information

Manufacturer
Secret Labs LLC
Category
Electronics modules
Manufacturer no.
P00000315
Release date
29.8.2012

Compatibility

Compatible hardware
Various

Electronic module properties

Module type
Various

Voluntary climate contribution

CO₂-Emission
Climate contribution

30-day right of return
24 Months Warranty (Bring-in)

Compare products

Goes with

Reviews & Ratings