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.

klotz's Content

There have been 60 items by klotz (Search limited from 29-April 23)


By content type

See this member's


Sort by                Order  

#320 Newbie Question

Posted by klotz on 12 August 2010 - 09:47 PM in Netduino 2 (and Netduino 1)

I just got my Netduino, what I don't understand is the purpose of the little colorful stamp/piece of paper. Also is there a summary of the netduino sdk anywhere. I am an old guy who is used to having a reference other than the code.



#419 Why does this happen

Posted by klotz on 14 August 2010 - 01:31 PM in Netduino 2 (and Netduino 1)

When I execute this snippet on the Netduino, it hangs on the xVar.Read(). After that, I can still see Neduino-neduino on in my devices list, but I am not able to access it from the debuger or MFDeploy.exe.
namespace Bug
{
    public class Program
    {
        public static void Main()
        {
            // write your code here
            int xValue = 0;
            int yValue = 0;

            AnalogInput xvar = new AnalogInput(Pins.GPIO_PIN_A0);
            AnalogInput yvar = new AnalogInput(Pins.GPIO_PIN_A1);

            xvar.SetRange(0, 0xffff);
            yvar.SetRange(0, 0xFFFF);

            while (true)
            {
                yValue = yvar.Read();
                xValue = xvar.Read(); //Debugger hangs here and never recovers.
            }


        }

    }
}

So far the only remedial action I have found is to totally erase the Neduino and reflash it.

1. Am I doing something wrong in the code?

2. Is there a safer/better recovery than totally erasing the Netduino?

Help.



#427 Why does this happen

Posted by klotz on 14 August 2010 - 04:23 PM in Netduino 2 (and Netduino 1)

klotz,

Sorry, that's a bug in the Netduino firmware. The AnalogInputs work great--but if you open more than one at a time there's a glitch which causes the Netduino to hang.

You can just erase the program on your Netduino (it takes about 10 seconds). See here:
http://forums.netdui...indpost__p__216

We have an update which fixes the AnalogInput bug scheduled for Monday (in 2 days).

Chris

Thanks for the reference on erase. I had no idea that it could be done that way. The only answer I could find was to totaly erase the board as I described. I will try that next time.

Well that means that at least one of my projects will be on hold til monday.
Is there a list of open items somewhere so I don't have to spend time finding them on my own?
If so, is there also a list of what is going to be fixed and when?
I



#708 Analog Tutorial?

Posted by klotz on 17 August 2010 - 11:37 PM in General Discussion

As soon as I get the all-clear from our users that the new AnalogInput code in the v4.1.0.2 firmware patch is working well for them... It tested out well here, but I'm being extra cautious before I post a tutorial.

The tutorial should work well with the original firmware as well (since the patch only addresses using multiple AnalogInputs at once).

Chris


The new version is working for me so far. I am using it with the SparkFun Joystick shield. http://www.sparkfun....oducts_id=9760. This is the one I was having problems with on Sat.
Thanks for the update!



#709 Steps to restore an Erased Netduino

Posted by klotz on 17 August 2010 - 11:41 PM in Netduino 2 (and Netduino 1)

I have read in another thread that you need XP Mode: http://forums.netdui...indpost__p__283

I not sure that you actually need to use XP mode. I am doing all my work in Window7 Ultimate 64-bit native mode.
I didn't have to do anything special to make it work either.



#760 What is the best programming environment for you?

Posted by klotz on 18 August 2010 - 03:34 PM in General Discussion

What is the best programming environment for you?
Ideas of what to specify:
-Music
-People around you (# of, type of)
-Food/Drinks
-Noise level (cars, people, etc...)
-Computer specs
-anything else


For me:
music - Metal as loud as I can stand it; maybe some dark metal like Cruxshadows, Without Tempation ...
People - Barnie my conure. She counts as a person doesn't she!
Food/Drinks - The days of Twinkies and Orange soda are way behind of me, I have to watch my weight so no food, Coffee or Diet Coke to drink
Noise level - I have no tolerance for that stuff thats why I have the music and over the ears headset.
Computer specs - Two 24" wide screens, one for code, one for design/spec/videos.



#878 SFE Joystick Shield

Posted by klotz on 20 August 2010 - 12:28 AM in Netduino 2 (and Netduino 1)

Just a quick note for anyone who may want to use the SparkFun Electronics Joystick Shield, DEV-09760 http://www.sparkfun....oducts_id=9760. I bought mine to use for experiments with my Netduino. While it worked fine after I built it, I did find the there were problems with the analog reading for the X and Y pot on the joystick. Following the information I saw here I had added a patch wire from the 3.3 Vdc to Vref. But noticed that the center readings were 66% of full scale. which meant that the min to center would have twice the resolution of the center to max. I am a software engineer not a hardware engineer so it took me a full half hour to realize that the problem was that the pots were biased using 5 Vdc. I change the jumper for Vref to the 5 V source. This did a find job of centering the signal, but the max values were very unstable. I guess I was over driving the A/D. So I cut the trace from 5 V to the joystick and added a wire from 3.3 to the joystick and Vref. Now every thing works just fine. See the attachment.

Attached Thumbnails

  • Joystick board.jpg



#912 SFE Joystick Shield

Posted by klotz on 20 August 2010 - 03:15 PM in Netduino 2 (and Netduino 1)

The biggest reason why AREF is not connected to 3.3V internally is because the SAM7X512 chip doesn't support that natively. The AVR chip on the Arduino has an "internal AREF" as an optional integrated feature.

The other reasons we didn't just wire 3.3V to AREF and skip the AREF pin: [a] we wanted people to be aware that the Netduino was a 3.3V device and to be careful not to put 5V into the analog pins when used in analog mode; [b] we wanted to maintain the chip's capability of having an AREF which varies from 2.7V to 3.3V...for our customers who are using Netduinos for commercial engineering prototypes.

That said, I've chatted with engineering about potentially adding an "internal AREF" option in hardware on a future Netduino board revision. It would be a cool feature to have, for sure. For now, connect the AREF pin header to the 3.3V pin header with a jumper wire when using analog inputs.

Chris

Personally, I like it the way it is. I was not confused by the AREF at all, my problem was that initially I did not pay attention to the fact that the shield had wired the pots to 5 vdc. Then in my haste to compensate I over drove the A/Ds by attaching AREF to 5V. Through this I learned a lot about the Netduino and its relationship to the Arduino. I won't make the same mistake again and hope that my original post will help others.
I conform strongly to the concept of modularity, therefore I feel that if the shield uses A/Ds then it is responsible for supplying the AREF. It may not matter much in the case of a connected shield, but having the A/D source supply the AREF is one sure way of insuring that the A/D's are reading accurately.
So my vote would be, If you are going to add "internal AREF" it should be done via a jumper on the Netduino and the jumper should be left off by default.
I plan to make all my projects supply the AREF for accuracy, so don't break my projects please.



#929 SFE Joystick Shield

Posted by klotz on 20 August 2010 - 09:50 PM in Netduino 2 (and Netduino 1)

After the modification to make the Joystick work with the Netduino the next step was to add some extra circuitry to support my next experiment. I wanted to control a servo or two with the joystick I also wanted some indication that the program was in control :D. So I added two 3 pin connectors for the servos and a LED. Here is an update to the schematic for the shield just incase someone want to critique it.

Attached Files




#1061 Netduino servo class

Posted by klotz on 22 August 2010 - 03:26 PM in Netduino 2 (and Netduino 1)

Nice, at least someone got some use out of it! Yeah, this class has been used and tested extensively, so it's all worked out. I will be updating the class in just a sec, too.

I just tried to use the class from the post, and I get an error while compiling "Error 1 The type or namespace name 'Cpu' could not be found (are you missing a using directive or an assembly reference?)"

While I am new to using C# this is not the first class library I have made so I am a little confused about why I am getting the error. I did copy and pasted the file from the post.
Any suggestion?



#1080 Netduino servo class

Posted by klotz on 22 August 2010 - 06:52 PM in Netduino 2 (and Netduino 1)

Did you include the Microsoft.SPOT.Hardware reference? You probably also need SecretLabs.NETMF.Hardware and SecretLabs.NETMF.Hardware.Netduino

So it was a problem with the way I created the project, not the source at all. Once I went to References under the solution explorer and added the Microsoft.SPOT.Hardware, it build just fine.
Like I said I am still a nubie when it comes to C#.

BTW: That and SecretLabs.NETMF.Hardware. Oops. :lol:
Thanks.



#2144 Compatible Shields and Accessories

Posted by klotz on 11 September 2010 - 11:52 PM in Netduino 2 (and Netduino 1)

Not a shield but I need it so some one else may need one as well http://www.sparkfun....products_id=133, RS232 shifter. It converts from digital to RS232 sufficiently to work with a PC. Just don't forget to use 3.3 Vdc for VCC or you could spend a whole afternoon troubleshoot the hardware ( I wonder how he knew that? :rolleyes: )

Attached Thumbnails

  • Shifter-0.jpg



#2145 Compatible Shields and Accessories

Posted by klotz on 12 September 2010 - 12:03 AM in Netduino 2 (and Netduino 1)

Well when it comes to prototype shields, there is not much that can go wrong, but thought I would add this one anyway. NKC Electronics has http://www.nkcelectr...hield-kit.html. The only caveat is that you don't want to install the 6-Pin ICSP pass thru. Itdoesn't work with the Netduino anyway since it's not populated B)

Attached Thumbnails

  • NKC Prototype Shield.gif
  • protoshield_v6.jpg



#2316 Analog Input problem

Posted by klotz on 14 September 2010 - 11:19 PM in Netduino 2 (and Netduino 1)

I just got my netduino and I'm starting to try to get analog input and I always get 0 when I read my pin(A0). Do you see anything I did wrong?

My setup looks like this

3.3->AREF

A0->Photo Resistor->GND

public class Program
    {
        public static void Main()
        {
            // write your code here
            InterruptPort tester = new InterruptPort(Pins.GPIO_PIN_A0, false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeBoth);
            tester.Dispose();

            AnalogInput apin0 = new AnalogInput(Pins.GPIO_PIN_A0);
            apin0.SetRange(0, 100);

            int test = 0;
            while (true)
            {
                Thread.Sleep(250);
                test = apin0.Read();
                Debug.Print("Test: " + test);
            }

        }

    }


You would need another resister to 3.3Vdc to develop a voltage divider. There is no pull-up in the An-in.



#2318 Analog Input problem

Posted by klotz on 14 September 2010 - 11:41 PM in Netduino 2 (and Netduino 1)

I'm confused would it look like
AREF+3.3v->resistor(what resistance?)->ground?->photo resistor->A0?

First you need to know what the resistance of the photo resister is. Mine was 25k full dark.
Second you need to decide if you want it to pull-up or pull-down. I used mine in a pull-up.
Then choose a resitance to give you some kind of reasonable current limit, I chose 10K since I just wanted to play.
So using the attached schematic, I put the photoresister in a R1, a 10k in R2, you can try it either way and pick the one you like.

Attached Thumbnails

  • voltage divider.png



#2321 Analog Input problem

Posted by klotz on 15 September 2010 - 12:49 AM in Netduino 2 (and Netduino 1)

Thank you for explaining now i understand. Time to play with my netduino!

The fun is just begining :D
The next thing you want to do is check out the projects page.



#2330 Analog Input problem

Posted by klotz on 15 September 2010 - 10:55 AM in Netduino 2 (and Netduino 1)

My guess: CadSoft Eagle (?)


Yep, I use Cadsoft Eagle. But don't ask me for help with it. I am just returning to doing hardware after 40 years and am trying to catch up.I just kindof hack away with Eagle until something works.



#2408 Getting off to a good start with Netduino

Posted by klotz on 17 September 2010 - 10:23 PM in General Discussion

EDITTED---
I purchased an AdaFruit Protoshield and that's all build and piggybacking my Netduino. What's not clear to me is how the various buttons on the shield relate to the Netduino. For example, I have two LEDs on the protoshield and two buttons. How are these addressable through code (given that the Netduino only has one of each)?

EDITTED AGAIN--
What I'd like to do as a next step is control a 5v motor, attached to the shield, and have its speed adjusted with a photoresister. Pretty basic, eh? :-) I'm not clear on how/where I'd hook up the motor to the shield (which pins) and also where the photresistor fits into the picture (on the shield in series with the motor, presumably, but what voltages should I use)?

And again
Thanks.

Mark



I hope you don't mind I didn't quote your entire post since I am going to start by answering the easy parts :D . But here goes:

One of the buttons (the one labeled RESET) is tied to the reset on your board and that is all it can do for you.
The other button and the two LEDs are not assigned to any function instead they are tied to ground on one end and the other is to a pad you can route to any of the DIO ports. The LEDS have a current limiting resister on them so they are safe. You just have to make sure you define the DIOs used with the LEDs as outputports and the button as an input port with a pullup. You can view the schematic here: http://www.ladyada.n...v5schematic.png



#2411 Buzz a piezo speaker?

Posted by klotz on 18 September 2010 - 04:02 AM in Netduino 2 (and Netduino 1)

The problem is that when a pwm period and duration are the same the output is high. Period is the rising edge to rising edge time of the output wave form. While duration is the length of the high time of the period. So period should be 1/frequency and duration should be (duty_cycle * period) where duty cycle is some value < 1. Also if I remember correctly, period is in microseconds so:

Try

  var period = (uint)(1000000 / frequency); 
  pwm.SetPulse(period, period/2); 
 

I used the same buzzer and I just checked my code and the period is in microseconds like I remembered.



#2422 Controlling a LED Intensity

Posted by klotz on 18 September 2010 - 01:03 PM in General Discussion

Use a PWM. You can then control the brightness by changing the duty cycle (duration). I would reference the articles in this forum but you can't search for PWM or LED because of the search rules :angry:



#2783 Stay close to your computer (or come to MakerFaire)...

Posted by klotz on 24 September 2010 - 05:58 PM in General Discussion

Yes, and it's bedtime for sure :)

Chris

I noticed the spec's http://www.netduino....oplus/specs.htm say the microSD holds up to 2Gb. Is this because the Plus uses SPI to talk to the SD card or is it a software limit?



#3149 Experimental Drivers for Wiznet-based Ethernet Shields

Posted by klotz on 29 September 2010 - 01:22 AM in Beta Firmware and Drivers

I am having the same results. 10060 when running the wiznet test app from here. I am sure we are missing something basic but have no clue what it could be. :(



#3158 Experimental Drivers for Wiznet-based Ethernet Shields

Posted by klotz on 29 September 2010 - 03:19 AM in Beta Firmware and Drivers

Yes the shield pings just fine. >ping 192.168.11.98 Pinging 192.168.11.98 with 32 bytes of data: Reply from 192.168.11.98: bytes=32 time<1ms TTL=128 Reply from 192.168.11.98: bytes=32 time<1ms TTL=128 Reply from 192.168.11.98: bytes=32 time<1ms TTL=128 Reply from 192.168.11.98: bytes=32 time<1ms TTL=128 Ping statistics for 192.168.11.98: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms I should add that I am using the original Arduino shield with no SD card.



#3160 Experimental Drivers for Wiznet-based Ethernet Shields

Posted by klotz on 29 September 2010 - 03:47 AM in Beta Firmware and Drivers

Looking at your error code again... DNS is not supported yet. We put that in the release notes next to the download link, but maybe we need to make that more obvious. Can you try connecting via direct IP and see if that works?

Chris

I had read that DNS was not working, but I thought that was the purpose of the proxy in the following segment from the Wiznet test posted in this forum.
            string url = "http://www.secretlabs.com/default.htm";
            // NOTE: since this experimental release does not support DNS yet, we must use the IP address of the web server as the proxy address.
            string proxy = "174.143.45.105"; // ip address of secretlabs.com

            // If the device must go through a proxy server, then set proxy to the 
            // fqdn or ip of the proxy server.
            try
            {
                String html = GetWebPage(proxy, url, 80);
                Debug.Print(html);
            }
            catch (SocketException se)

BTW I don't require a proxy server to access the net.



#3163 Experimental Drivers for Wiznet-based Ethernet Shields

Posted by klotz on 29 September 2010 - 04:00 AM in Beta Firmware and Drivers

I fixed that error by updating PhysicalAddress initialization in the sample program with the MAC address printed on sticker on the back of my Ethernet Shield.
Replace the bytes in red with your actual MAC address.

networkInterface.PhysicalAddress = new byte[] { 0x01, 0x23, 0x45, 0x67, 0x89, 0x01 };

Good luck!


I have an Arduino Ethernet shield and there is no MAC address printed on it anywhere. Does the Wiz5100 have one "programmed" into it? If so how do I get it?




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.