Martin

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Random wire? #8702
    Martin
    Participant

    Michael,
    You state that the wires can be fixed…”just change the assignment in the function countdown().
    Then you show DefuseWire=Wire_2;

    However when searching for “DefuseWire” in the program it can’t be found. Please clarify or let me know what to change in the following function:
    void countdown() {
    int ledCounter = 0;
    int ledCounterThreshold = 100000;
    byte ledCurrentState = HIGH;
    byte defusePin;
    byte detPin;
    boolean defused = false;
    countdownRunning = true;
    int fractionalSecond;

    // assign random pins
    defusePin = random(WIRE_1, (WIRE_4+1));
    detPin = defusePin;
    while (detPin == defusePin) {
    detPin = random(WIRE_1, (WIRE_4+1));
    }

    in reply to: Modifing code #8701
    Martin
    Participant

    Michael,
    Do we just stick this new code right before //assign random pins

    I did this and got all kinds of errors in my compiling and upload.

    Can you save me time and send me the code with this mod?

    Thanks

Viewing 2 posts - 1 through 2 (of 2 total)