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.

Tinymacrocosm

Member Since 04 Oct 2014
Offline Last Active Dec 16 2014 09:00 PM
-----

Posts I've Made

In Topic: Bytes sent over SerialPort not the same when received on Netduino over Bluetooth

07 November 2014 - 06:15 PM

Could you explain your solution a bit more? did u just add a jumper between pin 0 and pin1?

 

Sure. No jumpers were used. This line of code on the Netduino:

Bluetooth = new SerialPort(SerialPorts.COM1, 9600, Parity.None, 8, StopBits.One);

makes Pin0 and Pin1 defined for serial usage. Pin1 becomes the TX pin (send data) and Pin0 becomes the RX pin (receive data). I needed to connect them to the opposite corresponding pin on the Bluetooth.

 

Netduinotojy-mcubluetoothconnection_zps3

(VCC goes to 5V and GND goes to ground - I'm omitting it in the drawing to just focus on what i changed)

 

The Netduino's send data has to be processed by the Bluetooth's receive data. The Bluetooth's send data has to be processed by the Netduino's receive data.

 

When I connected the RX to the RX and the TX to the TX, I was getting garbage data when it was sent, very similar to yours, with values like 6, 0, 0, 248 regardless of what i sent.


In Topic: Bytes sent over SerialPort not the same when received on Netduino over Bluetooth

07 November 2014 - 03:21 AM

So.... I finally got it working. No change in the code. The answer seemed so simple but no one ever bothered to actually explain it; I just needed to switch the TXD and RXD pins.

 

COM1 for the Netduino means that PIN0 is the RX pin and PIN1 is the TX pin. Its expecting to receive data on PIN0 and send it on PIN1. The Bluetooth component will send data on its TX and the Netduino should receive it on the RX; The Bluetooth TX (send data) should be connected to the Netduino's RX (receive data) and the Bluetooth's RX (receive data) should be connected to the Netduino's TX pin (send data).


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.