emg's Content - Netduino Forums - Page 2
   
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.

emg's Content

There have been 62 items by emg (Search limited from 29-April 23)


By content type

See this member's


Sort by                Order  

#45009 BTinterface my Android app to control uControllers via Bluetooth

Posted by emg on 06 February 2013 - 12:16 PM in Project Showcase

Did you know you can install the Mono runtime on the Raspberry Pi and run C# programs on it?

 

Mono does not run on the current hard-float Raspbian image. You have to use an early soft-float Wheezy that never left beta. See this thread: Raspbian vs Wheezy (beta) Mono support

 

 




#45003 BTinterface my Android app to control uControllers via Bluetooth

Posted by emg on 06 February 2013 - 10:04 AM in Project Showcase

Cool, thanks!




#44997 BTinterface my Android app to control uControllers via Bluetooth

Posted by emg on 06 February 2013 - 02:58 AM in Project Showcase

What did you use to create the Android app, Eclipse?




#44917 Rain sensor

Posted by emg on 04 February 2013 - 07:50 PM in General Discussion

look up around the rear view mirror. The ones I've seen are optical and use an IR led and sensor. They work by sensing a change in the amount of light reflected from the windshield, which changes when there are water droplets on the glass over the sensor.




#44914 NTP Time howto call with SDK 4.3

Posted by emg on 04 February 2013 - 07:42 PM in Netduino Plus 2 (and Netduino Plus 1)

I thought this was (and still is) broken in VB. See Query NTP server. Byte operations not supported?




#44881 New installer is WiX based! Source posted too...

Posted by emg on 04 February 2013 - 02:43 PM in General Discussion

Integrate how, into the VS IDE? No. Be able to load a project and scan all the dependencies, runtime support, GUI/LUA for scripting, templates for common install tasks, yes. Not open source, but worth the money IMHO.




#44872 New installer is WiX based! Source posted too...

Posted by emg on 04 February 2013 - 11:34 AM in General Discussion

I use Setup Factory from Indigo Rose and have found it very easy to work with.




#44763 waiting for the sdk 4.3

Posted by emg on 02 February 2013 - 04:36 PM in Netduino 2 (and Netduino 1)

Is this the issue you are having?

 

http://netmf.codeple...m/workitem/1830




#44755 waiting for the sdk 4.3

Posted by emg on 02 February 2013 - 10:43 AM in Netduino 2 (and Netduino 1)

What bug in socket.connect are you seeing?




#44703 BTinterface my Android app to control uControllers via Bluetooth

Posted by emg on 01 February 2013 - 10:35 AM in General Discussion

Write it up under Project Showcase forum...?




#44609 Finding all Netduino Plus(s) on a network

Posted by emg on 30 January 2013 - 08:58 AM in Netduino Plus 2 (and Netduino Plus 1)

HiredMind, That's awesome, thanks for sharing! I'm looking for something similar to enumerate one or two N+ on the network. The reply to the broadcast could be the MAC and IP address and any other status info, so no digging around or populating the ARP cache. I'm pretty sure this is how a lot of network printer managers work that find all the vendors printers on your network to install/setup drivers, etc. I've only got one N+ right now that's in use but have another on the way and will test this out. Thanks again.




#44516 Finding all Netduino Plus(s) on a network

Posted by emg on 29 January 2013 - 07:15 PM in Netduino Plus 2 (and Netduino Plus 1)

Yes. It looks like part of the setup requires the box to 'call home' to get registered anyway. Or better, I guess it would be easier if the device could broadcast to a specific port (that your local software app would listen for on that specific port). Is UDP broadcast supported by the N+? 




#44511 Finding all Netduino Plus(s) on a network

Posted by emg on 29 January 2013 - 05:07 PM in Netduino Plus 2 (and Netduino Plus 1)

Won't step 2a trigger some firewalls that block port scanning (and be slow)? Why not have an 'announce' at startup or part of a reset button?




#44463 DFROBOT Buggy

Posted by emg on 29 January 2013 - 12:41 AM in Project Showcase

Ahh, I see. I did not read your previous posts up-thread about the vehicle.You are short of GPIO on the N+, that's why you want to try Ethernet between the rPi and N+? That really is a shame about the rPi unable to use 2 network interfaces at the same time - this would have been perfect.




#44327 DFROBOT Buggy

Posted by emg on 27 January 2013 - 10:14 PM in Project Showcase

Hi Paul,
Sorry, yes HTH = Hope This Helps

 

Yes, it looks like you are correct with the rPi running multiple network interfaces. I don't know enough about the rPi to say if the limitation is specific to the rPi hardware or the OS just needs tweaking. I've plugged nothing else except a keyboard/mouse during initial setup (now just use puTTY and VNC) into mine.

 

My day job is servers, networks, routers, etc I'm used to fixed IP addressing so it's no big deal for me. As for WiFi, I prefer cabled Ethernet over WiFi as it will always be faster and more reliable (less to break/configure), assuming it is convenient to run a cable.

 

One point though, you mentioned wanting to direct cable devices without using a switch. This requires a crossover cable or NIC's that Auto-MDIX. I would stay away from this configuration and always use an Ethernet switch (4-8 port white box brand 10/100Mbit switch is £10-15). Your home broadband router may already have a few spare open ports. Ethernet switches provide some buffering and seem to work better vs direct cable with modern NIC's. If you have a BT Home hub (or similar WiFi ADSL router that has a few Ethernet ports) you can still run the rPi via WiFi and cable the N+ devices to the same network. You should probably set a DHCP range exclusion so the router DHCP does not hand out an IP you have configured with a fixed IP address. Let me know if you have specific questions on networking and I can be of help.

 

For testing, I found it very easy to test on my PC to either itself (running 2 copies of the 'client' application) or using the client to talk to the N+. I can test with 2 clients on the same PC as I am using 2 separate ports to send/receive.

 

As for my examples, sorry it was confusing - I tried to strip out all the non-essential code not directly related to UDP. SendQ is a simple class:

 

Public Class sendingQ  Public sensorData As New Queue  Public commands As New QueueEnd Class

 

I stripped out all of the rest of the code that writes to SendQ - sensor threads, a command thread, etc so it was not shown. SyncLock (sendQ) locks the object while data is being de-queued. BTW, you can run the code though a C#/VB converter and I assume it will be OK.

 

It has been a while since I wrote the code, but I do remember having issues with Receive vs ReceiveFrom. The MSDN help states that ReceiveFrom is intended for connectionless protocols (UDP) and in the end found it easier to work with. I used IPEndPoint(IPAddress.Any, 0) to specify any sender.

 

http://msdn.microsof...(v=vs.100).aspx

 

Like I mentioned above, you can write and test all of this on your PC, pointing back to itself. I remember writing a small testing application with 2 threads when developing the example code and just copied/pasted into my N+ project when done. Run the above code though a VB/C# converter and adjust port, IP address to suit your local PC and queue/dequeue your text to each thread and you should be GTG.  :)

 

Edit Add: If testing on your PC and if it has a fairly modern OS (Windows 7/8, Server 2008) you will probably need to open the specific ports you using on your firewall or they will get blocked!




#44297 DFROBOT Buggy

Posted by emg on 27 January 2013 - 11:23 AM in Project Showcase

Hi Paul,

All you needs it a WiFi access point (that has some spare ethernet ports) or an ethernet switch. Each device connects to your common switch via cable or WiFi. As long as each device has a discreet MAC and IP address, each Netduino and rPi can 'see' and communicate with each other. I assume the rPi is not able to handle having Ethernet port and Wifi USB dongle at the same time.

 

As for UDP, I choose to use it specifically because it >was< so simple. Using a N+ at 4.2, (with fixed IP address and MAC set) it was easy to communicate via UDP with my PC on the same network. I also have a rPi that I hope to use as a 'controller' using a visual studio application running under Mono (right now Mono only runs under soft float Debian, not Raspbian).

 

My strategy for using UDP was to use 2 queue's, 2 threads and 2 UDP ports, one for sending, one for receiving. 

 

Private Sub sendUDP()  'looks to contents of dataQ and cmdQ and sends. Priority given to cmdQ items  Try    sendQ.commands.Clear()    sendQ.sensorData.Clear()    Dim ep As New IPEndPoint(IPAddress.Parse("192.168.0.9"), 11000)    Dim xmitUDP As New Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp)    Do      SyncLock (sendQ)        If sendQ.commands.Count > 0 Then          xmitUDP.SendTo(Encoding.UTF8.GetBytes(sendQ.commands.Dequeue.ToString), ep)        ElseIf sendQ.sensorData.Count > 0 Then          xmitUDP.SendTo(Encoding.UTF8.GetBytes(sendQ.sensorData.Dequeue.ToString), ep)        End If        'keep queues to 15/5        If sendQ.commands.Count > 15 Then          sendQ.commands.Dequeue()        End If        If sendQ.sensorData.Count > 5 Then          sendQ.sensorData.Dequeue()        End If      End SyncLock      Thread.Sleep(500)    Loop  Catch ex As Exception    rebootNetduino(True, False)  End Try  End Sub

 

So in the above example I de-queue and send a string of text that is either parsed out as sensor data or commands.

 

To Receive:

Private Sub RECVctrl()  Try    Dim anyEP As New IPEndPoint(IPAddress.Any, 11001)    Dim recvUDP As New Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp)    Dim recvbuf() As Byte = New [Byte](200) {} 'was 255    Dim sender As New IPEndPoint(IPAddress.Any, 0)    Dim senderRemote As EndPoint = CType(sender, EndPoint)    recvUDP.Bind(anyEP)    Do	  recvUDP.ReceiveFrom(recvbuf, senderRemote)	  runCommand(New String(Encoding.UTF8.GetChars(recvbuf, 0, recvbuf.Length)))	  Array.Clear(recvbuf, 0, 200)    Loop  Catch ex As Exception    sendMSG(MC.ERR, MP.Sub_RECVctrl, MT.REBOOT, ex.Message.ToString)    Thread.Sleep(1000)    rebootNetduino(True, True)  End TryEnd Sub

 

In the above receive example, I have a 200 byte array as a receive buffer and the received 'commands' are parsed and acted on in another Sub (runCommand).

 

So in my configuration, I am sending text strings via UDP to IP 192.168.0.9 on port 11000 and I am listening for text string sent from any IP on port 11001. This is done this way as the N+ is sending sensor data to my PC (or rPi eventually when they get HF Mono sorted) and can be commanded from any other device on the same 192.168.0.x network by listening on port 11001. The N+ is used to drive a DHW circulating pump in my house and collect temp readings and pump status.

 

HTH




#44293 Selling N+ (v1) Rev B

Posted by emg on 27 January 2013 - 10:13 AM in General Discussion

Sure, £25 sounds good to me. PM me with payment method details.




#44267 Selling N+ (v1) Rev B

Posted by emg on 26 January 2013 - 09:37 PM in General Discussion

Yup the rev B board.

 

Well then, I'll offer £20.




#44247 Selling N+ (v1) Rev B

Posted by emg on 26 January 2013 - 04:59 PM in General Discussion

Is this a Rev B board? If so, I'll offer £20...




#44236 Selling N+ (v1) Rev B

Posted by emg on 26 January 2013 - 03:42 PM in General Discussion

£2. To me.

That seems reasonable to me!  :D




#44186 Netduino Plus 2 Firmware v4.2.2

Posted by emg on 25 January 2013 - 05:30 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi cranberry,Are you looking for 4.3 firmware...or VS2012 support? We're working on both. It's not a big upgrade, feature-wise. But it's a big upgrade, firmware-integration-wise.  

 

Chris, does 4.3 have ethernet unicast/multicast support? 




#44026 Memory leak

Posted by emg on 23 January 2013 - 05:11 PM in Netduino Plus 2 (and Netduino Plus 1)

It could be either, really.  I plan on using mine as a WiFi Ethernet to SPI bridge. I guess it depends how smart your counter devices need to be. If you want to 'process' or manipulate the data, cache it locally onto SD card, etc or just count and send totals. You might get way with just the Flyport if you don't need all the power of a N2+.

 

Here are some more links to libraries and sample applications:

 

http://wiki.openpicu...title=Tutorials

 

http://wiki.openpicu...munity_Projects

 

http://wiki.openpicu...title=Libraries

 

 




#44023 Memory leak

Posted by emg on 23 January 2013 - 03:27 PM in Netduino Plus 2 (and Netduino Plus 1)

Have looked at any other WiFi options? I have played about with an OpenPicus Flyport and it has lots of configuration options, send data via FTP, email, UDP, etc or has a built in webserver. 49 euros. I've tested mine with sending/receiving UDP packets to my PC via Wifi and it seems solid.

 

http://wiki.openpicu...le=Flyport_WiFi

 

http://www.openpicus.com/

 

 




#43880 Library for HC_SR04 Ultrasonic Rangefinder

Posted by emg on 21 January 2013 - 05:27 PM in Netduino 2 (and Netduino 1)

 HAH, now that would be a great Netduino video to post :)

 

Yes, that's exactly what the internet needs, more cat videos.  B)




#43744 Advice on measuring the time delta among pulses on as many as 6 inputs

Posted by emg on 19 January 2013 - 11:41 AM in General Discussion

Would you not get a large attenuation between the sensor closest to facing the emitter and the one farthest away, facing the opposite direction, masked by the body of the robot?





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.