Avatar for Austin

Austin

Member since Oct 2013 • Last active Feb 2014
  • 2 conversations
  • 9 comments

Most recent activity

    • 4 comments
    • 3,133 views
  • in General
    Avatar for Austin

    So I've checked my PC, the reset pin is indeed being grounded from 3v3... And was able to test the Espruino board (just got the "official" one last night), that the C8 pin when trigger will "short" the pin to ground. So that'll work out perfectly! Thanks again for the hlep

    Cheers,
    Austin

  • in JavaScript
    Avatar for Austin

    Update for Espruino board since it only has 3 lights... Also added ability to stop and restart it. Change the value of i to control how fast the lights change (in milliseconds), by default run=true, setting to false will stop it. You can now resume by setting run=true again. Enjoy!

    var i = 1000, run = true;
    function flashLights() {
        LED3.write(false);
        LED1.write(true);
        setTimeout(function () {
            LED1.write(false);
            LED2.write(true);
            setTimeout(function () {
                LED2.write(false);
                LED3.write(true);
                setTimeout(function () {
    				if (run) {
    					flashLights();
                    } else {
                      var checkForRestart = setInterval(function () {
                        if (run) {
                          clearInterval(checkForRestart);
                          flashLights();
                        }
                      }, 500);
                    }
                }, i);
            }, i);
        }, i);
    }
    flashLights();
    
  • in General
    Avatar for Austin

    Awesome, thanks for the very thorough response! I haven't received my Espruino (starter kit) yet, but I had bought an STM32F4Discovery a few months ago that I've been playing with in the mean time. I had written a small program to cycle the state (0 to 1 and back) of the A2 pin every 3 seconds on my board last night, and was checking it with a digital multi-meter to see if it was pulled to ground, but didn't realize that reading the pin value would cause it to float as the voltage never changed much. Guess I should've used an analog meter to see it "bounce" from being pulled to ground. I was doing console.log(A2.read()) immediately after setting the pin, so it was probably too fast for the digital meter to pick up that it gained or lost voltage before floating.

    Hopefully I can wire it directly like you have mentioned above that would be preferable (and what I was attempting last night), if not then I'll go the relay route. I'm pretty sure the 2nd wire on reset is chassis ground, I'll check tonight after work...

  • in General
    Avatar for Austin

    What's the easiest way to "connect" 2 pins? Should I use digitalWrite, pin.write with a timeout, analogWrite, or something else? Also should I use 2 pins, or can I use 1 pin with ground? I'm wanting to use Espruino to "press" the reset button on a PC by wiring the green/black wires to it...

    Thanks,
    Austin

  • in JavaScript
    Avatar for Austin

    haha yea, and my Saturday has been playing with the discovery board and Espruino and loving it so far! ok, if I see anything else I post over there... thanks!

  • in JavaScript
    Avatar for Austin

    an apostrophe & a double quotation mark seems to show up as a question mark

  • in JavaScript
    Avatar for Austin

    not exactly sure what I changed this time I didn't try before, but it seems to be working now! Thanks

  • in JavaScript
    Avatar for Austin

    It does have a blank line... I tried 2 blank lines (before and after) and that didn't seem to help either. Initially I had the tick marks on separate lines from the code, tried without whitespace didnt help either... It always fun to "work out the kinks" in new software :)

Actions