Forum Replies Created

Viewing 15 posts - 1 through 15 (of 108 total)
  • Author
    Posts
  • in reply to: a function with a total of 1500ms delays makes it unstable #3287
    Bill
    Member

    wkinne,

    you’d have to post all of your code before anyone could really help.

    in reply to: MP3 runs first file and then the code "stuck" #3286
    Bill
    Member

    Do you see the debug statements in you serial terminal each time you push a button?

     

    in reply to: Home control and monitoring #3285
    Bill
    Member

    3lectricswine,

    Those kind of distances are going to be trouble with serial. Your two options are to go balanced serial (Rs-485) or maybe just going ethernet using Ethernet shields.

    in reply to: Arduino Due & EasyTransfer Library !!!! #3284
    Bill
    Member

    I’ve commented out the references to these header files as they should not be needed.

    in reply to: Sharing Arduino data #3283
    Bill
    Member

    Phil,

     

    Using a software serial port is about the only way to do what you want. Can the Xbee data be slowed down to sat 9600 baud?

    in reply to: ET on the Intel Galileo Gen2 #3282
    Bill
    Member

    Hmm,

    avr/io.h should not be needed, so you should be able to remove that without issues. It’s probably a relic from an old version.

    Why it won’t work on a Galileo I don’t know. The ET library uses the Stream class and should be portable with the Arduino IDE. Actually, maybe not. The Galileo may not be able to handle the malloc memory initialization. I’d have to get my hands on one or someone else try modding the library to not dynamically alloicate memory for the receive buffer.

     

    Bill
    Member

    I would first suggesting using 2 different structures; 1 for transmitting A to B and one for receiving B to A. It looks like you tried using 1 structure with 2 sets of values, which would cause issues of local data being overwritten by garbage data from the other Arduino.

    in reply to: Max number Objects problem #3280
    Bill
    Member

    Bravado,

    Without seeing all your code everything you reported here should work. You are well under the byte limit so it may be something else going on.

     

    You could store your bool values into 2 bytes instead of 10 (Bool values are a byte each even though they are 2 state). Each bit in the byte could represent a a different flag.

    in reply to: Unknown Controller Type (ACK issue?) #3279
    Bill
    Member

    Yep, ACK and rumble power are not needed. Glad you got it to work.

    in reply to: total number of oblects #3171
    Bill
    Member

    Depends on their size. At most you can have 255 bytes in the structure.

    in reply to: Transfer strings #3158
    Bill
    Member

    Short answer: Don’t do that.

    Strings in Arduino are a special type. In simple C strings are just arrays of characters, and you could transfer that. But it’s horribly inefficient. And the library has a limit of 255 bytes of data, or only 255 characters in a string.

    So if you really wanted, you would have to convert strings to arrays of characters before sending them via ET.

    But what are you really trying to do? Just send status messages?

    in reply to: Recognizing simultaneous key presses PS2X library #3157
    Bill
    Member

    ps2x.ButtonDataByte() will return 2 bytes representing all the current buttons pressed.

    You could use that to test multiple button presses at once.

     

    Here is the bits in that word and what buttons they represent:

     

    //These are our button constants
    #define PSB_SELECT 0x0001
    #define PSB_L3 0x0002
    #define PSB_R3 0x0004
    #define PSB_START 0x0008
    #define PSB_PAD_UP 0x0010
    #define PSB_PAD_RIGHT 0x0020
    #define PSB_PAD_DOWN 0x0040
    #define PSB_PAD_LEFT 0x0080
    #define PSB_L2 0x0100
    #define PSB_R2 0x0200
    #define PSB_L1 0x0400
    #define PSB_R1 0x0800
    #define PSB_GREEN 0x1000
    #define PSB_RED 0x2000
    #define PSB_BLUE 0x4000
    #define PSB_PINK 0x8000
    #define PSB_TRIANGLE 0x1000
    #define PSB_CIRCLE 0x2000
    #define PSB_CROSS 0x4000
    #define PSB_SQUARE 0x8000
    in reply to: Suggestion: .end command to complement .begin #3156
    Bill
    Member

    That would work, you can also read data a certain number of times and then break if nothing came back. like:

    int i=0for(; i<10; i++){

    if(ET.receiveData())  break;

    else delay(100);

    }

    if(i==10) //put failure code here, since the for loop never broke before i got to 10.

    But there’s no right way, it’s whatever way you want to do it. The library itself will never lockup your Arduino because no data is received.

    in reply to: EasyTransfer and SoftwareSerial #3104
    Bill
    Member

    Yes, use the Software easy transfer library instead. There should be an example sketch in the download for software easy transfer.

    in reply to: Problems with ET, Ethernet, and MySQL #3086
    Bill
    Member

    No idea. Ever figure it out?

Viewing 15 posts - 1 through 15 (of 108 total)