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.

Coding Smackdown's Content

There have been 72 items by Coding Smackdown (Search limited from 29-April 23)


By content type

See this member's


Sort by                Order  

#21028 NeonMika.Webserver

Posted by Coding Smackdown on 27 November 2011 - 04:52 PM in Project Showcase

Markus, I've posted the differences out on codeplex for you. Hopefully they'll be of help. Cheers, Jim Lavin



#21049 NeonMika.Webserver

Posted by Coding Smackdown on 28 November 2011 - 01:04 AM in Project Showcase

I think it had to do with the client socket not being closed after the request.



#21104 NeonMika.Webserver

Posted by Coding Smackdown on 29 November 2011 - 01:22 PM in Project Showcase

I'm doing something similar by using jQuery to post data back to the server. First I added additional pin types to the Pin Management class, then I added a couple of new request methods like Markus discussed. I then have web pages that can be returned from the server which contain my user interface which have jQuery methods that send the request back to the server to be processed and return the results. This way I can interact with the Netduino however I wish, I can even use this method to set the time and network settings on the device. You just have to be careful about how much functionality you try to shoehorn into the device since memory is pretty tight. To build my temperature controller complete with logging and history charts I end up with about 30K worth of code when all finished. That included a complete library to send back JSON formatted data. You can do quite a bit.



#21105 NeonMika.Webserver

Posted by Coding Smackdown on 29 November 2011 - 01:29 PM in Project Showcase

Markus, I had to add code to handle the HTM and HTML file types to the extension handler so it would return the proper MIME type. It seems if you request index.html from the server it was always coming back as application/octetstream instead of text/html. I also added a JSON request handler that uses a JSON library to return requests in JSON format. Let me know if you want me to post the code for you to include. Cheers,



#21023 NeonMika.Webserver

Posted by Coding Smackdown on 27 November 2011 - 03:36 PM in Project Showcase

Are you running in debug mode?
There you can check if incoming requests get ignored...
Probably you get a outofmemory-exception?

I sometimes had the problem that it just worked fine for a time and then it stopped receiving requests, i will look into that as soon as i have time :)

It mustbe something in the Server-class' Listening loop...
Probably you can find an error there (about 20 lines of code)...

Greets


Markus,

It is not throwing an exception of any kind, but I think you are right with it running out of resources. I was playing with the server listening loop and did make some changes and now it runs without issue. Let me spend some time comparing my changes to the original code and I'll post an issue to the codeplex page.

I also made some changes to the Handle Request method and changed from an array list to a hashtable to speed up request processing. I'll also post those changes as well.

Thanks,

Jim Lavin



#21174 NeonMika.Webserver

Posted by Coding Smackdown on 30 November 2011 - 05:29 PM in Project Showcase

Thanks for updating the code stream. I'll be pulling down the updates and testing it out.



#21010 NeonMika.Webserver

Posted by Coding Smackdown on 27 November 2011 - 03:51 AM in Project Showcase

Markus, I've pulled down your code and have been trying to use it for an interface to a temperature logger that I'm building. The concept really fits into what I need, however I've noticed that after running for a couple of minutes it seems to be going off into nowhere and never answers. I'm running under the .NetMF 4.2 RC3 firmware, so I'm not sure if it is the newer firmware or maybe the code. Have you run into anything like this or does it run without issue for you? Just trying to figure out where I should be spending my time trouble shooting. Thanks



#38801 Introducing Netduino Plus 2

Posted by Coding Smackdown on 08 November 2012 - 11:10 PM in Netduino Plus 2 (and Netduino Plus 1)

Great News! Just ordered 2 from Amazon! Now my Brew System won't be so overtaxed with the PID and Web server running together. Can't wait to get them and put in my controller box.



#20973 Netduino for beginners - Gentle introduction with basic electronic project

Posted by Coding Smackdown on 25 November 2011 - 03:52 PM in Project Showcase

Hello,


Thank you for the nice work.

I am a teatcher also, and I would like to know how did you do that nice Netduino Views to how the wiring connections? Do you use any CAD model or image you could share?

Thank you,



Igor.


You can get those nice breadboard images using a tool called Fritzing. Its a free tool that you can down load from http:// www.fritzing.org

It also gives you the ability to view the schematic and a PC Board of the circuit as well.

Cheers

Jim Lavin



#35514 How to install (or upgrade to) .NET Micro Framework v4.2 SDK

Posted by Coding Smackdown on 19 September 2012 - 01:11 AM in General Discussion

Chris, I'm trying to use the new AnalogInput classes, but how do I define an AnalogChannel that corresponds with Cpu.Pins.GPIO_PIN_A0? I'm not seeing a link between the two. Thanks



#35525 How to install (or upgrade to) .NET Micro Framework v4.2 SDK

Posted by Coding Smackdown on 19 September 2012 - 05:42 AM in General Discussion

Thanks that worked out just fine.



#21242 Total Newbie Temperature Project

Posted by Coding Smackdown on 02 December 2011 - 05:18 AM in General Discussion


My temp readings are all over the place. Can someone please double check my setup?


I experienced the same thing. You are probably experiencing some noise from the Ethernet interface.

There is another thread in the forum that discusses the issue in some depth.

http://forums.netdui...ading-accuracy/

It is best to hook a .1uF capacitor between 3.3V and Ground to help drop some of the noise. If that doesn't work add a 1mH inductor between the ARef port and 3.3V.

I still had a lot of noise from the senors so I ended up performing 100 reads of the port and then averaging the reading:

int totalReads = 0;

for(int x = 1; x < 100; x++)
{
totalReads += Port.Read();
Thread.Sleep(10);
}

float reading = totalReads / 100;

This seems to work pretty good and is pretty fast for normal monitoring. It may not be the best performance wise, but you can vary the number of reads until you get a good smooth value back.

BTW: Are the two outer leads of your sensor actually hooked to anything? Your circuit looks strange since the two side rails on my breadboard do not have any connection to the inner holes. Try moving the pins over to the first set of holes that your leads are connected to and see if that makes a difference. Take a look at the breadboard diagram I did of my circuit here http://forums.netdui...erature-logger/ the TMP36 is pretty much pin compatible with the LM35.

Cheers!



#21093 Total Newbie Temperature Project

Posted by Coding Smackdown on 29 November 2011 - 04:40 AM in General Discussion

got my netduino today, but can't look at it until Thursday (homework and a major release at work). Im sorry im such a newbie, but from the tutorials Ive looked at I was going to feed my sensors from the 3.3v output on the netdiuno, is this not what i should be using to power it?

Also if i were to power LED's from the netduino, which size resistor do i need to step down the 3.3v port? 1/2 watt 68Ohm? Anyone know of a good tutorial link for doing basic things with LEDs?

Thanks!


I've got several TMP36 sensors running off of the 3.3V supply. I think if you were going to say multiplex a lot of sensors then you might want to look into a different power source, but you should be OK.

If you want a good tutorial that covers LEDs check out the Netduino for Beginners post in the General Discussion area, its really good.

I'm finishing up a temperature monitoring project for my walk-in fermenter that has a web based interface. Once I have it all complete I'll post it to the forum to give you some ideas.

Cheers



#20983 Total Newbie Temperature Project

Posted by Coding Smackdown on 25 November 2011 - 10:18 PM in General Discussion

Are you planning on doing temperature monitoring or temperature control?



#35786 Mini Upgrade Woes

Posted by Coding Smackdown on 22 September 2012 - 05:31 AM in Netduino Mini

Just finished flashing my two Netduino Minis to the 4.2.0.1 RS-232 Firmware and it went off without a hitch. Thanks guys for getting this fix out so quickly.



#34085 Mini Upgrade Woes

Posted by Coding Smackdown on 23 August 2012 - 05:35 AM in Netduino Mini

Any time frame on fixing the RS232 version of the firmware?



#20975 Digital I/Os during power up

Posted by Coding Smackdown on 25 November 2011 - 04:24 PM in Netduino 2 (and Netduino 1)

Looking at the specs for both a NAND Gate and XOR Gate I think I answered my question. They both give you a high output when the inputs are different. The only difference is that the XOR Gate does not give you a high output when both signals are the same where as the NAND Gate will give you a high output if both signals are low. So I guess you could use either type of gate. Regards, Jim Lavin



#21256 Dear Netduino developers, where are you from? :)

Posted by Coding Smackdown on 02 December 2011 - 01:15 PM in General Discussion

Nevyn, Don't feel bad I resorted to buying a magnifying lamp this summer so I could read the letters on my components plus I have to use my multimeter to read my resistors.



#20974 Digital I/Os during power up

Posted by Coding Smackdown on 25 November 2011 - 04:14 PM in Netduino 2 (and Netduino 1)


Later in this tutorial I also will describe how one can use FET/MOSFET, DIOD or Transistor NAND as well as NAND TTL IC to achieve same.


Wouldn't an XOR Gate work better than a NAND Gate? I would think you would only want a high output when the two input are different. So if the Netduino board sets all pins to high at reset you could hook up one input to the Netduino pin you are going to use as a switching signal and the second to positive voltage. This way when the board resets both inputs would be high and the output would stay low. Then once your application starts you could drive the Netduino pin low to get a high output from the XOR Gate thus providing the voltage required to allow current to flow through the transistor.

Or do I have my logic backwards and you need the NAND gate to keep the signal high so there is not enough difference at the base of the transistor to allow current to flow?

Regards,

Jim Lavin



#21110 Lightweight JSON parser

Posted by Coding Smackdown on 29 November 2011 - 03:30 PM in Project Showcase

Thanks Fabien,
I figured system.Net was not the way to go and have been playing with the NetMF WebRequest instead.
The page I need to collect is a simple 4k xhtml - so I could write a very basic XML parser (the tags etc will be consistent)

system.XML is of course too big for the NetduinoPlus too - so I was hoping you had an example where you were using your JSON parser with a simple web request that worked on the Netduiino (I assumed that you already had this code)

Thanks for the reply - it was infact helpful and has pointed me in a new direction (did not consider using the SD for storage)
The clases in KloutKlock definitely open some new options - so I'll see how i get on and post back - thanks for the help


I've gone down the route your suggesting and even with a bare bones XML parser you'll be bouncing up against the memory constraints of the device. If you can get something even simpler to parse you'll be much better off.

Sometimes even though you love a device it may not be the right thing for the job and you may need to pick a device that has the capabilities you need. I originally wanted to use the Netduino Plus for a print agent that would pull XML from a service and dump it out to a receipt printer, but by the time I got web request and xml parsing coded I didn't have enough resources to do the IP based printing.

If you really want to use the device you may have to rethink how you'll get the data and process it in order to keep within the constraints of the device.

Regards,

Jim Lavin



#30311 Running an interactive console on a NETMF device

Posted by Coding Smackdown on 06 June 2012 - 01:18 PM in General Discussion

I have a Temperature Monitoring Project out on codeplex that I put together for my Walk-In Beer Cooler. It might be a good start for what you want. You can find the code at http://diybrewerytem...r.codeplex.com/ Hope this helps you out.



#21491 Ethernet stop working after around 20-60 minutes running

Posted by Coding Smackdown on 08 December 2011 - 08:17 PM in Netduino Plus 2 (and Netduino Plus 1)

I studied the NETduino HW a bit and found that DM9161A chip performs autonegotiation for Ethernet link establishment autonomously.


I'm wondering if maybe you've come across something that has always plagued systems. I know in the windows world auto negotiation has always been problem some for devices and I have worked with network technicians who have recommended that it be turned off.

Maybe we should look at adding the capability to set the port speed on the Netduino Plus. If the network folks are having people turn it off, maybe we need to provide similar capabilities to allow the device to coexist with all of the other devices on the network.



#35717 Modbus-TCP library

Posted by Coding Smackdown on 21 September 2012 - 04:46 PM in Project Showcase

Congratulations! It nice to see something being done here making it into an industry library listing.



#37924 Multiple Threads v. While Loop

Posted by Coding Smackdown on 24 October 2012 - 02:23 PM in Netduino Plus 2 (and Netduino Plus 1)

My Netduino based Brew Controller uses both interrupts and threads and would probably be a good example for you to see one way of doing things. I use interrupts to handle the main panel buttons and I use threads to handle the various services; temperature monitoring, mash profile, web Server, Internet Time Service and NETBIOS Services. You can find the complete code over at https://github.com/l...yBrewController Hope it helps.



#21525 Convert byte[4] to float

Posted by Coding Smackdown on 09 December 2011 - 11:08 PM in Netduino 2 (and Netduino 1)

Here are a couple of links that discuss this process in some detail that might help you to make your routine more efficient. The last link actually has an entire library to provide the missing functionality for all of the decimal types. http://www.eggheadca...bledecimal.aspx and http://bloggingabout...-framework.aspx Hope it helps




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.