http://www.sparkfun.com/products/8883
- Netduino Forums
- → Viewing Profile: Likes: bill.french
Community Stats
- Group Members
- Active Posts 260
- Profile Views 11379
- Member Title Advanced Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Male
-
Location
Princeton, NJ
#8554 Analog Read
Posted by bill.french on 27 January 2011 - 01:39 PM
http://www.sparkfun.com/products/8883
#8121 How can I get instant (or close to) data from http...?
Posted by bill.french on 22 January 2011 - 10:08 PM
1. How to get your javascript to get live data w/o refreshing the whole page?
2. Or a different way to get data from the netduino?
For #2, I don't know what you're going for.
For #1, check out jquery and the load command: (this would go in your refresh function once you have jquery included)
$('#myDiv').load('data.htm');
(to add jquery, use:
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>in your <head>)
... in your program.cs: (i have not tested this, so it's more of an idea than anything)
namespace NetduinoPlusWebServer { public class Program { public static void Main() { Listener webServer = new Listener(RequestReceived); OutputPort led = new OutputPort(Pins.ONBOARD_LED, false); while (true) { // Blink LED to show we're still responsive led.Write(!led.Read()); Thread.Sleep(500); } } private static void RequestReceived(Request request) { if (request.URL == "data.htm") { request.SendResponse("some kind of data"); } } } }
- Jarrod Sinclair likes this
#7340 Analog in put C# coding
Posted by bill.french on 09 January 2011 - 02:40 PM
using System.Text; using Microsoft.SPOT; using System.Threading; using SecretLabs.NETMF.Hardware; using SecretLabs.NETMF.Hardware.Netduino; namespace NDP_SocketSender1 { public class Program { public static void Main() { AnalogInput a5 = new AnalogInput(Pins.GPIO_PIN_A5); while (true) { string s = a5.Read().ToString(); Debug.Print(s); Thread.Sleep(100); } } } }
The above code is from here.
- Giuliano likes this
#7053 StepGenie (An EE's Best friend?)
Posted by bill.french on 05 January 2011 - 03:56 AM
Ok... I'm still stuck on the fact that your wife got you a StepGenie for Christmas. That's awesome!!
Did she get you the full demo board or just the chip itself?
LOL... she was very grateful to receive a Google spreadsheet with part numbers from me this year. I was grateful to receive fewer sweaters.
#7024 StepGenie (An EE's Best friend?)
Posted by bill.french on 04 January 2011 - 11:44 PM
- CwbhX likes this
#7007 StepGenie (An EE's Best friend?)
Posted by bill.french on 04 January 2011 - 08:57 PM
- CwbhX likes this
#7000 StepGenie (An EE's Best friend?)
Posted by bill.french on 04 January 2011 - 08:43 PM
- CwbhX likes this
#6992 StepGenie (An EE's Best friend?)
Posted by bill.french on 04 January 2011 - 04:24 PM
- CwbhX likes this
#6979 StepGenie (An EE's Best friend?)
Posted by bill.french on 04 January 2011 - 01:13 PM
- CwbhX likes this
#5962 Reading temperature from DS18B20 using OneWire
Posted by bill.french on 10 December 2010 - 03:14 AM
The DS18B20 is really awesome, seems very accurate and very responsive. Considering my struggles getting reliable readings from a thermistor, I am finally .
Here is my temperature reading code, and attached is a class I wrote to interface with the OneWire controller, in case someone finds it useful.
using System; using System.IO.Ports; using System.Text; using System.Threading; using Microsoft.SPOT; using Microsoft.SPOT.Hardware; using PHAOneWire; using SecretLabs.NETMF.Hardware; using SecretLabs.NETMF.Hardware.Netduino; namespace SerialTest1 { public class Program { public static void Main() { int Tc, Tf; using (OneWire ow = new OneWire()) { while (true) { ow.Write("P0W0ccS044"); Thread.Sleep(1000); // need to wait for conversion ow.Write("P0W0ccW0be"); byte low = ow.ReadByte(); byte high = ow.ReadByte(); // it's dealing with temps as integers, for instance, 23.5F comes back 235000 // since it's 12bits of precision, the smallest difference in temp is .0625 Tc = ((high * 256 + low) * 10000) / 16; Tf = ((Tc * 18) / 10) + 320000; Debug.Print(Tf.ToString() + " - " + Tc.ToString()); Thread.Sleep(10); } } } } }
Attached Files
- PHAOneWire.cs 1.78KB 547 downloads
- EnergySmithe likes this
#4547 MFToolkit - new release (VS2010 support / .NET MF 4.1)
Posted by bill.french on 07 November 2010 - 12:02 AM
- James and like this
- Netduino Forums
- → Viewing Profile: Likes: bill.french
- Privacy Policy