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.

jrlyman3's Content

There have been 65 items by jrlyman3 (Search limited from 29-April 23)


By content type

See this member's


Sort by                Order  

#54996 USB input from barcode scanner to N2+

Posted by jrlyman3 on 30 December 2013 - 04:35 AM in Netduino Plus 2 (and Netduino Plus 1)

I got the Host USB shield from Sparkfun.  I hooked it up to an Arduino UNO (after installing the appropriate libraries, and adding a wire to the shield as described in the documentation) and it worked great with my generic barcode reader.  I then started to look at the Arduino code in preparation for porting it to the Netduino.  I decided that it was going to be quite a bit of work to port, and I put it on the back burner.

 

If you just want to support the scanner you don't have as much to port ... but, you have to figure out how it all works to know what you need and what you don't.

 

I suggest that you buy an Arduino and hook it up to the Netduino with a serial port.  It's a way to start, and who knows maybe someone will get around to porting the USB host library to C# in 2014 :-).

 

John




#55123 I2C Bus not working

Posted by jrlyman3 on 02 January 2014 - 03:10 AM in Netduino Plus 2 (and Netduino Plus 1)

Are you sure you're hooked up to the right pins? So which pins are you connecting to?




#55228 I2C Bus not working

Posted by jrlyman3 on 07 January 2014 - 04:42 AM in Netduino Plus 2 (and Netduino Plus 1)

I compared your code to mine and I don't see much difference, I used a timeout of 1000 on the execute function, but that should not be an issue.  I know that I had a issue when I went back to a NetduinoPlus1 which uses A4/A5, but I don't see how you would mistake the SCL/SDA pins on the NetduinoPlus2 board.  I also ran into a problem with bus contention (I have another microcontroller on the bus) but that doesn't apply to this.  So, other than to say it seems to work for me, I guess I can't be much help.  I did notice one other thing, you're using the Netduino library instead of the NetduinoPlus library you might want to try changing that.

 

Sorry I can't be more help.

 

John




#55271 Sd Card Using BitBang

Posted by jrlyman3 on 10 January 2014 - 04:48 AM in Netduino Mini

Using enable/select lines is the normal to do multiple devices.  The .NET code will even manage them and synchronize them with the othe signals. Here are a couple links that might help:

http://wiki.netduino...figuration.ashx http://forums.netdui...-netduino-mini/

Enjoy.




#55411 Future PoE support (Netduino Plus 3?)

Posted by jrlyman3 on 16 January 2014 - 02:53 AM in Netduino Plus 2 (and Netduino Plus 1)

After researching POE options for my Netduino projects I went in a different direction.  You can see in the photos I attached, that I'm using a Passive PoE Injector/Splitter.  Right now I have one Netduino plugged into a gigabit Ethernet switch and the normal 9v power supply, it works great.  Since the Netduino only has 10Mb Ethernet there is no need for the more complex 1Gb PoE.  When I add more Netduino devices in the future I'm going to buy a 9v 4A power supply and use a 4-way splitter to send that power to 4 of these PoE splitter pairs. 

 

PowerOverEthernet-1.jpg   PowerOverEthernet-2.jpg

 

The splitter on the left plugs into the switch and a power supply the Ethernet plugs into the socket.  Then on the right the splitter plugs into the Ethernet and power connectors of the Netduino and the Ethernet cable plugs in the socket.  Simple, cheap ($6), and easy to install.




#55412 Clean way to interrupt Socket.Accept()?

Posted by jrlyman3 on 16 January 2014 - 03:19 AM in Netduino Plus 2 (and Netduino Plus 1)

Yup.  That's how I do it.




#55413 How much is 192kb code storage?

Posted by jrlyman3 on 16 January 2014 - 03:23 AM in General Discussion

Btw, Visual Studio has a tool to convert Java to C#.  It takes care of a lot of the stupid stuff, and it works pretty good.  It doesn't convert GUI components though.




#55768 Netduino Plus 2 and SerLCD LCD-09067

Posted by jrlyman3 on 31 January 2014 - 07:52 PM in Netduino Plus 2 (and Netduino Plus 1)

I assume this is the LCD that Sparkfun is selling which uses 3.3V?  It sounds like a baud rate problem to me.

What code are you using to setup the SerialPort?  Are you setting the baudrate to 9600?  Are you hooked up 

to the right I/O pins?




#55795 Netduino Plus 2 and SerLCD LCD-09067

Posted by jrlyman3 on 01 February 2014 - 10:07 PM in Netduino Plus 2 (and Netduino Plus 1)

I don't think that power is an issue I run a 20x4 parallel display on my NP2 with no problem.  I did some experiments with a logic analyzer and your configuration works to send data out on D3.  The baud rate looks good too.  Note: I used a NP1 for the test but it should be the same :-).

 

According to the Sparkfun web site it should show a banner for half a second on power-up.  Do you see that?  Maybe the display is bad?  Maybe it's a 5V display, you're using the 3.3V pin for Vdd right?  May try 5V and see if you get the banner.




#55811 AnalogInput - options when I need more than six?

Posted by jrlyman3 on 02 February 2014 - 05:27 PM in Netduino Plus 2 (and Netduino Plus 1)

You could try a multichannel (16) ADC chip that you can access over I2C like the LTC2498.  It's a 38 pin QFN so that might be a problem for prototyping and hobbyist use, but Digikey does have a $50 eval board.




#55822 Netduino Plus 2 and SerLCD LCD-09067

Posted by jrlyman3 on 03 February 2014 - 02:43 AM in Netduino Plus 2 (and Netduino Plus 1)

I'm glad to hear that the display is not dead. It still sounds like the baudrate to me.

 

Sparkfun says that you can send a control-R ('x12') in the first half second after the display powers up to reset the baudrate to 9600.  I think that the easiest way to do this is to use a continuous loop sending the 0x12 (serialLCD.WriteByte(0x12)).  Cycle power on the display a couple times and hope you get lucky.




#55901 PWM changes?

Posted by jrlyman3 on 06 February 2014 - 02:11 PM in Netduino 2 (and Netduino 1)

I found that most of the examples are for 4.1 and earlier.  I finally found an example for 4.2 and it looked like this:

// This puts a continuous signal on D5 with a 1mS pulse every 3 mS.const uint period = 3; // *1000 * 1000;    // 3 msconst uint duration = 1; // *1000 * 1000;  // 1 msPWM pwm = new PWM(PWMChannels.PWM_PIN_D5, period, duration, PWM.ScaleFactor.Milliseconds, false);pwm.Period = period;pwm.Start();

Hope this helps,

 

John




#55902 Automated Urban Garden

Posted by jrlyman3 on 06 February 2014 - 02:19 PM in Project Showcase

That is a great project!  I've been working on a similar project, so far I'm just monitoring the moisture level of the plant, but I got the pump this week and hope to get it hooked up soon :-).




#55940 SD Card Reading with External Power

Posted by jrlyman3 on 08 February 2014 - 07:39 PM in Netduino Plus 2 (and Netduino Plus 1)

I suggest that you get out your voltmeter and see what voltage the Netduino is seeing from the external supply.




#55943 HTTPListener class missing from System.Net

Posted by jrlyman3 on 08 February 2014 - 07:50 PM in Netduino Plus 2 (and Netduino Plus 1)

HttpListener is under System.Net.  But, which System.Net would that be ... it's hard to figure out from Object Browser.

 

You need to add a reference to System.HTTP   :-).

 

John




#56121 Is data lost when UDP socket receive buffer is too small?

Posted by jrlyman3 on 16 February 2014 - 02:36 PM in Netduino Plus 2 (and Netduino Plus 1)

Hey, Paul,

 

Thanks for taking the time to report this.  I would have expected the second read to get the remaining 3 bytes of the first packet.

 

It's nice to learn something the easy way for a change :).




#56125 Socket

Posted by jrlyman3 on 16 February 2014 - 03:54 PM in Visual Basic Support

It seems like this should be easier ...

 

In C# I would set Socket.Blocking = false (which causes the Connect to throw an exception that I ignore), then call Socket.Poll to wait for the connect to finish, and then check if the socket is connected.

 

The following link shows a VB example that's not quite what you're looking for, but might get you headed in the right direction :).

 

  http://msdn.microsof...#code-snippet-2

 

Hope that this helps - John




#56126 Is data lost when UDP socket receive buffer is too small?

Posted by jrlyman3 on 16 February 2014 - 04:03 PM in Netduino Plus 2 (and Netduino Plus 1)

Yes, TCP sockets are different, they work the way we would expect.

 

Except that I've found that they don't always return the number of bytes that I request ... even if I sent more than that.  I always do the reads in a loop to verify that I get all of the data I need for each read ...

 

That's what makes programming fun (and frustrating) - John




#56285 A problem with VS Express for C#

Posted by jrlyman3 on 22 February 2014 - 10:58 PM in Visual Studio

Kenny,

 

You should consider upgrading to the 4.2 (or 4.3) framework on your Netduino. It will be harder to upgrade later as they seem to like changing stuff in the interfaces.  Like for example in 4.1 analog ports return an integer with a range that you specify, in 4.2 you get a float between 0.0 and 1.0 which indicates the percentage of the reference voltage ... I like 4.2 but I should upgrade to 4.3.

 

BTW, be careful about the versions in use when you read posts in the forum :).

 

John




#56323 My daydream - FPGA/ARM platform

Posted by jrlyman3 on 24 February 2014 - 02:57 AM in General Discussion

Wow, this does look pretty cool.  I'm a lot like you and I'm tempted to drop what I'm doing and get one of these eval kits ... but I'm trying really hard not to start any more projects until I get some finished and written up ... I guess I'll just save this link and hope to have time later this year :) .




#56633 How to convert hex value stored in string to binary in string?

Posted by jrlyman3 on 04 March 2014 - 11:13 PM in Visual Studio

There are a number of useful string functions that are missing ... not to mention the StringBuilder class ... I would use some code like:

        String smsData = "31584C1E8bC160";
        String data = "";
        int bytePos;
        int charPos;
        int nibble0, nibble1, byteVal;
        int carryBits = 0;

        smsData = smsData.ToUpper();   // Not needed if digits will always be uppercase.

        for (bytePos = 0; bytePos < 7; bytePos++) {
            charPos = bytePos * 2;
            nibble0 = smsData[charPos] - '0' - ((smsData[charPos] >> 6) * 7);
            nibble1 = smsData[charPos + 1] - '0' - ((smsData[charPos + 1] >> 6) * 7);
            byteVal = (((nibble0 << 4) + nibble1) << bytePos) | carryBits;
            carryBits = (byteVal & 0x7F80) >> 7;
            data += ((char)(byteVal & 0x7F));
        }
        data += ((char)carryBits);
        Debug.Print("SMS Data = " + data + "\n");

--John




#56637 How to convert hex value stored in string to binary in string?

Posted by jrlyman3 on 05 March 2014 - 03:27 AM in Visual Studio

I'm curious to see how you did that ... I'm always looking for a better way to do things ... could you post the code?




#56833 Emulator, can it handle OneWire ?

Posted by jrlyman3 on 16 March 2014 - 12:30 AM in General Discussion

I thought that the address was printed on the device, but I looked at a DS1820 and the numbers on the device do not have any correlation with the address (so I guess not).  The way I got the address was to add the new device to the 1-wire network and use the FindAllDevices() function to get all the addresses.  The one I didn't know is the new device's address.  You could also choose to make it the only device on the net.




#56901 I2C Bus Problem - Debugging

Posted by jrlyman3 on 19 March 2014 - 02:14 AM in General Discussion

Hard to say without a logic analyzer ... but, it sounds like the I2C lines are in a bad state when the board initializes and after the first operation the I2C lines are left in the correct state so that the subsequent operations all work.  It seems to me there is another topic where this is discussed, I think that they set the pins to "1" before using them as I2C ...

 

Glad that that you found a work around.




#57157 Text to a Speech?

Posted by jrlyman3 on 27 March 2014 - 01:18 AM in Netduino Plus 2 (and Netduino Plus 1)

I've got the EMIC2 (http://www.hobbytron...-text-to-speech) on my list, but I haven't got to it yet.  They have some amazing demo wave files.  And there is an Arduino demo program.  Let us know how it goes.





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.