Netduino home hardware projects downloads community

Jump to content

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

Stefan W.

Member Since 19 Jun 2011
Offline Last Active May 30 2012 02:30 PM

Posts I've Made

In Topic: Assign Analog input value to PWM output

18 April 2012 - 03:49 PM

To answer "how do you convert an int to an unsigned int", you cast it: (that's the (uint)
            while (true)
                irValue = irSensor.Read();
                irValue = irValue / 5;
                if (irValue > 100)
                    irValue = 100;
I also added a safeguard so that the value doesn't get bigger than 100 (100 is full-on for pwm).

In Topic: Electronics 101 book recommendation

17 April 2012 - 09:10 AM

Also not a book, but for me, when I started with electronics, a simulator like LTSpice has been invaluable - you can try stuff without frying things ;) i.e. test if your transistor switch works and how much current is drawn from the microcontroller etc. But that's just in addition to a book, it obviously does not teach you physics :)

In Topic: hardware quirk and bugs

12 April 2012 - 06:26 PM

You weren't too slow, your post has more helpful information than mine :) and your suggestion about not driving optocouplers/LEDs directly is certainly right.

In Topic: hardware quirk and bugs

12 April 2012 - 03:41 PM

What "input with pullup" means is that there effectively is a resistor between 3v3 & the pin. This resistor limits the current, so using leds to check is not adequate (the current might simply be so low that you don't see the led lighting up), you need a scope or a fast multimeter to check. There is also no way to turn a digital ouput on 50%.

In Topic: hardware quirk and bugs

12 April 2012 - 01:13 PM

How do you determine this?

On start up, only pin 3 and pin 7 fire high,
and pin 3 looks like its only 50 percent, but only happens for like 5
seconds. Then the program starts. It looks like a hardware quirk.

IIRC, on startup the microcontroller uses all pins as input with pullup enabled, then, after the startup-routine (bootloader and so on) is finished, the program starts ... so what's in your code will not take effect immediately after boot.

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.