SoftwareSerial library needed/equivalent in Netduino
#1
Posted 13 February 2011 - 06:03 PM
#2
Posted 13 February 2011 - 06:18 PM
#3
Posted 13 February 2011 - 06:19 PM
#4
Posted 13 February 2011 - 06:32 PM
You could make a software serial port with some native code, but that's NOT needed here. In fact, soft serial is not related to this topic in really any way, because the Netduino had hardware serial, and unless you use up all the hardware serail ports, there isn't any reason to use a software "bit bang'd" serial port.
Digital pin 0 on the netduino is RX. That's where the TX from your device will connect.
Digital pin 1 on the netduino is TX, That's where the RX from your device will connect.
Both devices will need to be grounded together.
great stuff, so if I attach the energy monitor to those pins, there's something in the .net micro framework I can use to read the input? An xml file/stream gets sent every 6 seconds from the CurrentCost, so when I've done this on a PC, I've set a .net SerialPort object - http://msdn.microsof...serialport.aspx - to the relevant port, and set up an event handler to catch the input. The parsing after that, I've no problem with
thanks for replying, I'm totally new to Netduino & pretty excited about what it can offer
Is this the relevant class then: http://msdn.microsof...y/dd170258.aspx ?
thanks
Toby
#5
Posted 13 February 2011 - 06:43 PM
#6
Posted 13 February 2011 - 11:55 PM
Is this the relevant class then: http://msdn.microsof...y/dd170258.aspx ?
Yes, that's it! You can use COM1 (pins d0/d1) or COM2 (pins d2/d3). If you need serial comm on another port, then you'll need a "software serial" driver. But from what I've seen, a lot of "software serial" use on Arduino is on pins 2/3.
Chris
#7
Posted 14 February 2011 - 07:48 AM
#8
Posted 16 February 2011 - 10:26 PM
#9
Posted 16 February 2011 - 10:30 PM
#10
Posted 16 February 2011 - 10:54 PM
#11
Posted 16 February 2011 - 11:33 PM
Ok, so if for some reason you wanted to use 3 serial devices that wouldn't work out so well - or get multiple netduinos.
If you want to use 3 serial devices, you have a few options:
1. Use a SPI->UART adapter
2. Build a "soft serial" library in native code
3. Buy an extra Netduino, start building a super-microcontroller-computer with lots of serial ports
Chris
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users