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.

aGuegu

Member Since 27 Jun 2011
Offline Last Active Jun 30 2011 12:11 PM
-----

Posts I've Made

In Topic: Breathing LED onboard

30 June 2011 - 12:16 PM

Your current firmware should work well, although if you'd like to update to the new 4.2 beta it has some new USB handling code. It is beta--and you'd need to update to the .NET MF 4.2 SDK as well.

Right now, if you push the button on your Netduino (which resets it) when Visual Studio is stuck in deployment...does that workaround the issue for you?

Chris


Thanks Chris, my Netduino works so good today that I tried deloying different program and it works everytime. Maybe it is because I press shift+F5 in time to release Netduino. Have no idea. I will let you know if I got problem in deploying, :)

In Topic: Breathing LED onboard

29 June 2011 - 09:00 AM

I am using Windows XP SP3 The version I got is 4.1.0.6, is it too old? Which version would you prefer? I just know that the onboard button can be used as a reset, that explains why the onboard led responses to the button, even through there is no code related to the button. Thank you.

In Topic: Breathing LED onboard

28 June 2011 - 10:17 AM

Thanks Chirs. All I know is that the firmware I installed is the one downloaded from http://www.netduino.com/downloads. It is 4.1, however I have no idea about the sub-sub-version no. Is there a quick way to check it? Which version do you prefer? Regarding the deploying, right now the best way I could figure out is that to press F5 to debug & deploy, and after it is done, press shift+F5 to release Netduino. If vs2010 is halted while preparing, unplug Netduino, and press ctrl+break to stop deploying. Then plugin Netduino and press F5 to try again. I have tried Target > Application Deployment > Create Application Deployment in MFDeploy.exe several times, but the MFDeploy halt on every single time I click it. Do not know why.

In Topic: Breathing LED onboard

28 June 2011 - 02:50 AM

Hi aGuegu,

Also, the hardware PWMs are used to drive four of the digital pins. To make the onboard LED breath/change intensity, you'll need to do software PWM (as you have done--good job!).

Welcome to the Netduino community,

Chris


Hi Chris, I have read your answers to several questions.

I have got the system halt during "Preparing to Deploy Assemblies to the Device" for about a dozen times in my first hour programming Netduino. That is quite annoying. I have tried to use "MFDeploy.exe" to recovery the basic code, however, it could not get the response from Ping. And I have to erase the chip by force.

I am not sure whether there is anything to do with my program. Maybe while cpu is waiting in the loop, it could not response to the signal from USB.

The second question is IDE VS2010, the Key F5 means debugging the code. Nevertheless, in Micro Framework it is also used to deploy the program to the board. It looks like deploying is a sub-function of debugging, which is weired. The case in programming C51 is that compile the code to a file in Hex format, and then burn it to the chip with another program as a downloader. They are seperated. But in the case of Netduino, it feels like these two functions are screwed up.

In Topic: Breathing LED onboard

27 June 2011 - 10:24 AM

Hi Stefan, Thanks for your suggestion.

using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;

namespace _002_BlinkingLED
{
    public class Program
    {
        public static void Main()
        {
            // write your code here
            OutputPort ledPort = new OutputPort(Pins.ONBOARD_LED, false);

            int iMax=0xff, iMin=1;
            int i = iMin;

            while (true)
            {
                for (; i < iMax; i++)
                {
                    
                    ledPort.Write(true);
                    funDelay(i);

                    ledPort.Write(false);
                    funDelay(iMax - i);
                    
                }

                for (; i > iMin; i--)
                {
                    
                    ledPort.Write(true);
                    funDelay(i);

                    ledPort.Write(false);
                    funDelay(iMax - i);
                    
                }
            }
        }

        static private void funDelay(long lTicks)
        {            
            DateTime tNow = DateTime.Now;
            DateTime tDue = tNow.AddTicks(lTicks*0x100);
            while (DateTime.Now < tDue) ;

            return;
        }
    }
}


Right now, my code is updated that the breath goes much smoother and gentler. I have wrote the funDelay() in my another project doing UART communication with C51. It just turns out that it work perfectly here.

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.