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.

woof_woof_bark_bark

Member Since 04 Aug 2014
Offline Last Active Jun 10 2015 01:20 AM
-----

Topics I've Started

IntelliSense Suggestions

12 December 2014 - 06:28 PM

Hello World, I'm working on a driver and the basic gist/setup of the method is :

 

public enum

{

cat = 0,

dog = 1

}

 

 

public void SpecificChipFunctionality(int x, animals y)
        {
            
        }
 
I want to make the driver so that the user - when calling the method gets some sort of prompt from intellisense suggesting that "cat" should be used. The only way that I know how to do that is:
 
public void SpecificChipFunctionality(int x, animals y = animals.cat)
        {
            
        }
 
My issue with doing this is I have another method with the same name that takes in a byte, and if I want to call the byte form, Visual Studio converts my input (ex. 0x16) to an int and executes the wrong method.
 
Is there a way to suggest that a specific value is used without having to set it equal?
 
Thanks, 
woof_woof_bark_bark

 


Analog Input Limits

02 September 2014 - 08:07 PM

Hello all,
   I've been playing with the analog input on my netduino, and I had been playing with it for quite a bit thinking that I had been using it wrong. Turns out... I was! When using a potentiometer to regulate the voltage into my analog input, I noticed that as I approached the upper end (higher voltages of my potentiometer) the value being printed from the .Read() of my analog input started to decline. I just learned today that that was due to using the 5 V pin on the board as my source and the highest value accurately registered through the .Read() was when the voltage was 3.3 V. I was curious if there was a way to allow for accurate measures of voltages higher than 3.3 volts via AnalogInputs (nothing necessarily too crazy... but how about the 5 volt pin?) I would appreciate any input on the subject.
 
Thanks for taking the time to read this.
Good luck and good thought,
woof_woof_bark_bark

 

 

 

PS. this is how I set up my code while using the 3.3 V pin as the source to my potentiometer providing me with an output that is between 0-1 (the voltage as a percent of 3.3 V). When I would use 5 V as the source and change AnalogReference_float to 5 as well; my output would be 0-1 (when at or below 3.3 V) and 1 - 0.6 (when voltage to the analog input pin was 3.3 V - 5 V) The biggest desire is to at least figure out  - if possible - how to change the percentage ie: I would love to make the output a voltage as a percent of X as opposed to being locked into 3.3V.
 
using System;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;
namespace AnalogTest 
{  
    public class Program 
    {        
        private const float AnalogReference_float = 3.30f;
        static AnalogInput pot = new AnalogInput(AnalogChannels.ANALOG_PIN_A0);
 
        public static void Main()
        {      
            while (true)
            {
 
                Debug.Print("Raw Value: " + pot.Read()*AnalogReference_float);
                Debug.Print("");    
            }     
        }  
    }
}


Some serious issues with Netduino+2

04 August 2014 - 03:42 PM

Hello all,

      I just recently got my netduino in the mail Thursday, and I seem to have several issues with it. While trying to install a basic led flashing sequence, (I had had it installed earlier but tried to write another program that ended up wrong and scratched for the time being) I am prevented by the error "An error has occurred. Please check your hardware"

 

Like I said the board is brand new, and I don't know what could be wrong.

 

Things I've tried:

-Using MFDeploy, I tried looking at the device capabilities for the purpose of updating the firmware in hopes that might fix everything and sometimes if I try multiple times I get something that makes sense but most of the time I get pages of lines that read: "Failed allocation for 5 blocks, 60 bytes"

 

-I've also tried hitting erase in MFDeploy while trying to follow the steps to update the firmware and all I get is a constant stream of "Failed allocation for 5 blocks, 60 bytes"

 

-I've installed the installer for the latest firmware and my device doesn't show up.

 

- I've installed other programs the STDFU Tester application as instructed by the forums if the previous issue comes up, and that also seems to do nothing/doesn't recognize the device.

 

--------------------------------------------------------------------------------------------------------------------------\

 

My goal was to try and return this to factory settings as it was working for a period out of the box but the errors seem to be overwhelming and I'm trying to fix this quite quickly.

 


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.