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.

hoquet

Member Since 11 Jul 2012
Offline Last Active Sep 03 2012 01:17 PM
-----

Posts I've Made

In Topic: Netduino Go with Xbee module not supported yet?

12 August 2012 - 04:53 PM

I switched the flowcontrol to hardware by setting the handshake to RTS or RequestToSend, still no go. I switched the xbee's around again, still no go. I checked the settings on both xbees on windows by using the digi x-ctu, they both appeared to be set correctly and working fine. After switching things back and fourth, I was then always able to send from the NDG, but not receive. I switched the xbee's and still I could send from the NDG, but not receive. The problem must be on the NDG side. The code looked fine and I could find any other settings. Other users code was relatively the same as mine in working with the serialport. I then set the windows form app to continuously transmit, I then picked up the xbee and gadgeteer and moved pressed the xbee onto the gadgeteer, I received data! I had to press down very hard to receive data. I switched the xbees, they both worked as long as I pressed down hard on the xbee. Conclusion The gadgeteer is faulty. One or more of the pin receivers on the gadgeteer is not making connection to the xbee. I will need to send this back and order another one. I hope these are not the type of issues that I am going to run into. I seemed to have run into so many issues already. But managing to work my way through most of them. I guess sometimes you can't always assume that every hardware connection is working. I guess if I was going to production with an application I would have some diagnostic routines that kicked off first. It would check the connectivity of the NDG to the gadgeteer. Then diagnose the connection of the gadgeteer to the XBEE pin by pin. Thanks

In Topic: Netduino Go with Xbee module not supported yet?

11 August 2012 - 02:05 AM

Greetings Chris,

The XBee Gadgeteer is plugged into Socket 1. I Have the Go Button plugged into Socket 5. Nothing else is plugged into any other socket.

Here is the code on the NDG side:

                serialPort = new SerialPort("COM1", 9600, Parity.None, 8, StopBits.One);
                serialPort.ReadTimeout = 500;
                serialPort.WriteTimeout = 500;
                serialPort.Handshake = Handshake.None;
                serialPort.DataReceived += new SerialDataReceivedEventHandler(serialPort_Datareceived);
                serialPort.Open();

        private static void serialPort_Datareceived(object sender, SerialDataReceivedEventArgs e)
        {
            SerialPort spL = (SerialPort)sender;
            Debug.Print("Data Received");
        }
        static void button_ButtonReleased(object sender, bool buttonState)
        {
            Debug.Print("Button Pressed");
            string output = " Hello from your Netduino: ";
            byte[] bytes = System.Text.Encoding.UTF8.GetBytes(output);
            serialPort.Write(bytes, 0, bytes.Length);
        }

On the windows form side I am able to receive the data from the NDG, but when I send data, I see the Gadgeteer light go on, however the event is not fired.

Here is the code on the windows form side.
            serialPort = new SerialPort("COM3", 9600, Parity.None, 8, StopBits.One);
            serialPort.ReadTimeout = 500;
            serialPort.Handshake = Handshake.None;
            serialPort.DataReceived += new SerialDataReceivedEventHandler(serialPort_Datareceived);
            serialPort.Open();

        private void button1_Click(object sender, EventArgs e)
        {
            // then we will prepare sending the message
            byte[] buffer = new byte[MOVEMESSAGE.Length];
            // convert the string to bytes
            buffer = System.Text.Encoding.UTF8.GetBytes(MOVEMESSAGE);
            // write it to Xbee through serial
            if (!serialPort.IsOpen) { serialPort.Open(); }
            serialPort.Write(buffer, 0, buffer.Length);
        }
        private void  serialPort_Datareceived(object sender, SerialDataReceivedEventArgs e)
        {
            SerialPort spL = (SerialPort)sender;
            txtBox1.Text += "Data Received";
        }

The confusing part is that I can send from the NDG and receive on the windows form, but I cannot send from the windows form and receive on the NDG. However when I switch the XBee's, I can send from the windows form and receive on the NDG. But I cannot send from the NDG anymore and receive on the windows form.

Thanks

In Topic: Netduino Go with Xbee module not supported yet?

10 August 2012 - 04:19 AM

I am having a very strange problem. I have the XBee using the gadgeteer on Socket 1 on my NDG. I am using the sparkfun xbee wireless kit. That comes with the 1mw xbee chips. I wrote a program that will initialize the Serial on COM1 then added an event handler to handle the data received. I wrote another windows form to send data via serialport and Xbee. Works great! On the windows form I write something in a textbox, it shows up on my NDG. Now, I added a button on my NDG so that when I push the button, it will write to the serialport a message. On the windows form, I added an event handler for DataReceived that should pick up the message. But it did not work. I then tried another program already written http://forums.netdui...beeusercontrol/ And I got the same results. I could not send data from the NDG to my PC. For some odd reason, I finally decided to switch the xbees from the xbee explorer on the pc and my gadgeteer. Wow, now I press the button on my NDG and it shows up on my windows form. Now when I write something in a textbox on the windows form, the NDG does't read the message. I know my code is working fine both ways. It seems that one of the Xbees is not able to transmit. Could this be a hardware issue or is there something that I forgot to do with one of the xbees or is there a mode/setting, something that I am missing? Any clues?? Thanks

In Topic: Netduino Go with Xbee module not supported yet?

06 August 2012 - 08:45 PM

Chris, thanks for the reply. I have a good wrapper that I found for the XBEE, I am going to tweak it and I'll attach my code once I am finished. So I have the XBee Module on Socket 1 which is going to use up 1-4. I have the XBee Shield Base on Socket 5 which will take up 5-8. So now I can communicate and use motors. I still need to add a distance sensor and potentially my accelerometer. At some point the shield base will not take up the full sockets 5-8? I could just wait... Otherwise, can I put the adafruit motorshield on the Go shield base, then stack the accelerator on top of that? Bytemaster, I am going to order the wiFly module. I am looking forward to your publishing your firmware. "Nothing too hard to hand solder?" You have not yet seen my noob soldering job ;) Thanks

In Topic: "Preparing to deploy..." takes ages

05 August 2012 - 08:18 PM

This error started happening to me as I was configuring my motorshield. There was a piece of code that broke and it must have recieved some bad code that would lock up the device so that I could not connect or deploy any new code. I tried all the strategies atleast 100 times waiting 5 seconds to deploy, then waiting 5 seconds to connect usb, all the various methods that everyone in these forums have written. I gave up yesterday and ordered a new arduino uno r3. Today I sat back down and said, okay, I'm going to get this thing working. I finally found the following: http://alhardy.com.a...etduino-Go.aspx This solved it. I had to boot the board to DFU mode, then use the tools to erase and load the tinyclr.dfu. Now I'm back up and running. My suggestion to Netduino, is this: Put a reset button or jumper on the next board so that if it gets stuck in a loop or error, there is a way to clear the program that is running or reset back to factory.... Or throw another button on their to do an actual reset.. Could have saved me hours...

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.