Page 21 of 24 FirstFirst ... 111920212223 ... LastLast
Results 201 to 210 of 233

Thread: GCode: open source paintball gun board/software

  1. #201
    Quote Originally Posted by new ion? View Post
    Hard to troubleshoot a circuit without seeing it.
    Be kind, this is my first breadboard since i did a heathkit as a kid in the 80s.

    Code
    a. Using GCode 0.9
    b. Changed Code to Closed Bolt (Setting up for angel), not sure if this does anything in current code

    Changes from Schematic
    1. Schematic RGB wiring is incorrect (doesnt match pins), fixed in wiring
    2. Schematic trigger is to D0, should be pin 2 per code, fixed in wiring
    3. Resistor downstream of TX led should be 220, not 10k, fixed in wiring

    Issues
    1. When I wire it up as stock and run 0.9, the led for ball is backwards (green no ball, red ball).
    2. Fires on red.

    Changes I made.
    1. Had to change below return statement (in Eyes.ino) to == LOW (from high).

    int readEyeState() {
    digitalRead(EYE_RX_PIN);
    return (digitalRead(EYE_RX_PIN) == LOW);
    }

    2. Had to change fire statement (in Firing.ino)
    // regular, unforced shot - check eyes
    if( Op_FireShot && !Op_ForceShot ) {
    if( EYES_ON == Op_EyeStatus && !GET_EYE_READ_STATE() ) {
    DEBUG_PRINTLN(" No ball, no shot");
    Op_FireShot = false;
    } else {
    DEBUG_PRINTLN(" Yes ball, shoot");
    Op_FireShot = true;
    }
    }

    I added the "!" before GET_EYE_READ_STATE to change the boolean because it was firing backwards.

    I am hoping i have a wiring issue that caused these, and not some other code type reason.
    Thanks



  2. #202
    Insider new ion?'s Avatar
    Join Date
    Feb 2013
    Location
    Victoria, BC
    Posts
    1,296
    Well there's an issue - You're setting it up for an Angel, but have it set to closed bolt?

    Angels are Open Bolt markers, but have an ENclosed bolt.

    Not sure if you know the difference, but Closed bolt markers work like pumps, which usually consist of Autocockers (automated pumps) or Excaliburs.

  3. #203
    well switching to open (Duh brainfart) fixed the skipping shot issue i had (that i wasnt worrying about yet). Thank you.

    Still dont understand why i had to change the digital read to low to get the LED right

  4. #204
    Insider new ion?'s Avatar
    Join Date
    Feb 2013
    Location
    Victoria, BC
    Posts
    1,296
    What photosensor are you using?

  5. #205

  6. #206
    Insider new ion?'s Avatar
    Join Date
    Feb 2013
    Location
    Victoria, BC
    Posts
    1,296
    Supposed to sense Hi, aka hi on ball correct?

    Apply Vcc to one side of the sensor, resistor between other side and GND. Put the sensor lead at the same node as the BJT low side/resistor high side.

    No light - pulled low. Light - pulled to Vcc.

    edit - just realized that's backwards LOL

    Okay, so for the not fucky answer - Vcc - resistor - BJT - GND. Put the sensor lead at the resistor BJT node.

    That sensor is a BJT.

    PS - Breadboarding is better than I've seen some people's around here. (In my University)
    Last edited by new ion?; 02-05-2015 at 03:52 PM.

  7. #207
    High is supposed to be ball (no light)
    Low is supposed to be no ball (light)

  8. #208
    Quote Originally Posted by new ion? View Post
    Supposed to sense Hi, aka hi on ball correct?

    Apply Vcc to one side of the sensor, resistor between other side and GND. Put the sensor lead at the same node as the BJT low side/resistor high side.

    No light - pulled low. Light - pulled to Vcc.

    edit - just realized that's backwards LOL

    Okay, so for the not fucky answer - Vcc - resistor - BJT - GND. Put the sensor lead at the resistor BJT node.

    That sensor is a BJT.

    PS - Breadboarding is better than I've seen some people's around here. (In my University)
    This is how i have it configured currently, in the picture above, the phototransistor is on the right

  9. #209
    Insider new ion?'s Avatar
    Join Date
    Feb 2013
    Location
    Victoria, BC
    Posts
    1,296
    Yea, Vcc - resistor - BJT - GND, with sensor at the resistor BJT node.

  10. #210
    Insider new ion?'s Avatar
    Join Date
    Feb 2013
    Location
    Victoria, BC
    Posts
    1,296
    Quote Originally Posted by jptheripper View Post
    This is how i have it configured currently
    Sensor is the right one - you have it backwards. Power - BJT - resistor- GND.

    You need it Power - resistor BJT GND.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •