N+2 resetting and migration to 4.1
#1
Posted 02 December 2012 - 06:46 PM
#2
Posted 02 December 2012 - 07:06 PM
#3
Posted 02 December 2012 - 07:33 PM
#4
Posted 02 December 2012 - 07:49 PM
#5
Posted 02 December 2012 - 08:06 PM
Attached Files
#6
Posted 02 December 2012 - 08:10 PM
I downloaded the code from Greg's Blog Post and upgraded it. It's pretty easy. Here are the steps.
1) Download the code and open in visual studio
2) Go to the project's property page and on the application tab change the Framework from 4.1 to 4.2
3) Open References in the Tree and drop SecretLabs.NETMF.Hardware.NetduinoPlus. Replace it with the SecretLabs.NETMF.Hardware.Netduino from 4.2 QFE2
4) Change the two includes from using SecretLabs.NETMF.Hardware.NetduinoPlus; to using SecretLabs.NETMF.Hardware.Netduino;
This should allow you to build and deploy the project.
I did did deploy and I am getting the same issue that you are with it hanging on the socket.Accept(). I'll take a look at it more when later and see if I can get it running.
#7
Posted 02 December 2012 - 08:16 PM
hanging on the socket.Accept()
its a blocking function, it does not not hang, it waits there till a client actually connects
i made a short non blockinmg (threaded) sample for networking
Attached Files
- Arron Chapman and JerseyTechGuy like this
#8
Posted 03 December 2012 - 04:11 AM
#9
Posted 03 December 2012 - 02:11 PM
Attached Files
#10
Posted 03 December 2012 - 05:34 PM
stuff like: you press a button, a led turn on, you press it again, it turns off
than go for analog-digital-converter, pwm, communication busses (spi, i2c, uart)
heres is a good tutorial to start with, it has more pages, you should read tham all
Good Start
- Arron Chapman and JerseyTechGuy like this
#11
Posted 04 December 2012 - 01:51 AM
//Was getting an error on last part of this line, so I commented it out (yeah, not really a best practice) irPort.OnInterrupt += new NativeEventHandler(irPort_OnInterrupt);
Fixed the part that was commented out
namespace NetduinoInfraredSensor { public class Program { public static void Main() { //Set the digital pin to monitor Pin D0 InterruptPort garageSensor = new InterruptPort(Pins.GPIO_PIN_D0, true, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptNone); garageSensor.OnInterrupt +=new NativeEventHandler(garageSensor_OnInterrupt); garageSensor.EnableInterrupt(); //Program loop while (true) { Debug.Print(garageSensor.Read().ToString()); Thread.Sleep(1000); } } static void garageSensor_OnInterrupt(uint data1, uint data2, DateTime time) { throw new NotImplementedException(); } } }
Edited by Chris Walker, 04 December 2012 - 02:39 AM.
added [code][/code]
#12
Posted 04 December 2012 - 06:03 PM
- JerseyTechGuy likes this
#13
Posted 05 December 2012 - 01:33 AM
Woot!This morning I opened and closed the garage door with a modified version of this code, from my Droid Tab.
Chris
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users