Avatar for noofny

noofny

Member since May 2016 • Last active Mar 2017
  • 2 conversations
  • 8 comments

Most recent activity

  • in ESP8266
    Avatar for noofny

    @Ollie mate you nailed it - using flasher now and works perfectly, no need to screw around with python scripts and outdated args/syntax, just a nice simple UI that works.

    I cannot thank you enough for the quick response!

    @MaBe Thanks also - so I took a stab and used the following args, but it didn't work because there's a bunch of other stuff probably wrong (such as an old image, etc)...

    /Volumes/Data/Development/github/esptool­/esptool.py --port /dev/tty.usbserial-AH03ILNP --baud 115200 write_flash --flash_freq 80m --flash_mode qio --flash_size 4MB 0x0000 "boot_v1.5.bin" 0x1000 espruino_esp8266_user1.bin 0x3FC000 esp_init_data_default.bin 0x3FE000 blank.bin
    

    For now I'll stick with flasher.js - at least this gets your board flashed and running so you can focus on the dozens of other more interesting problems to solve ;-)

    Many thanks guys.

  • in ESP8266
    Avatar for noofny

    I have the ESP8266 Breakout (HUZZAH) board from Adafruit. Been reading on how to get Espruino flashed onto the board. I'm on OSX so just running through the *nix instructions and got the latest esptool.py repo cloned and installed, according to the guide at;

    espruino.com/ESP8266_Flashing­

    So the command I'm running is follows;

    /Volumes/Data/Development/github/esptool­/esptool.py --port /dev/tty.usbserial-AH03ILNP --baud 115200 write_flash --flash_freq 80m --flash_mode qio --flash_size 32Mbits 0x0000 "boot_v1.6.bin" 0x1000 espruino_esp8266_user1.bin 0x3FC000 esp_init_data_default.bin 0x3FE000 blank.bin
    

    ...but the error I'm getting is;

    WARNING: Flash size arguments in megabits like '32m' are deprecated.
    Please use the equivalent size '4MB'.
    

    Sorry guys, I'm a bit lost, can anyone please shed some light? Also is there a better way to do this than the guide shows on espurino.com, from reading around quite a few forums I'm finding it hard to see the forest through all the trees (so many different ways to do this) ?

    Most thankful to any help :-)

    • 8 comments
    • 232 views
  • in General
    Avatar for noofny

    @allObjects - wow thanks for taking the time to spell that out, really appreciate your insights here. After reading and experimenting more I was starting to "feel" the right way to do things was as you have just explained, so your explanations help cement this in confidence, cheers.

    Yeah I was beginning to see just how much @Gordon has done to abstract all the "messy" stuff away and make it easy for us to get our code on-chip and running, I agree this does come at the cost of allowing n00bs to do n00b things! Understanding how to do it properly however, removes the frustration entirely and brings back the fun, thanks guys, happy to understand some basics now and have my code working as expected.

    Good forum too - code blocks work well.

  • in General
    Avatar for noofny

    Cheers Gordon - good explanation, does make it clearer.

    Being a n00b is fun ;-)

  • in General
    Avatar for noofny

    Still doesn't explain why previous code I have sent to the PICO's without being inside OnInit were running okay at startup. Obviously I have to look more into how Espruino works.

  • in General
    Avatar for noofny

    Well dang, I hang my head in shame for not checking the troubleshooting guide first.

    This answered my problem;
    espruino.com/Troubleshooting
    "If you want to execute certain commands at power-on, add one or more event handlers for the init event on E:"

    E.on('init', function() {
      // ...
    });
    

    "This will then be loaded every time Espruino starts up. If you create a function called onInit, that will be executed too:"

    function onInit() {
     // ...
    }
    

    So what is misleading is that if you click the "Send to Espruino" button in the WebIDE and DON'T have your startup code inside OnInit(), it runs fine, but if you DO then it doesn't run until you call save(). I'm sure there's an explanation to this somewhere.

  • in General
    Avatar for noofny

    Is there a way I can just reset it to factory state, like by flashing a custom firmware or some such thing? Both PICO's were working fine up to a couple of days ago, when I noticed this and initially thought my code must be broken, so I simplified it down the example above to eliminate that.

    Clearly there's something fundamentally wrong with the code flashing process and/or the way the WebIDE is sending code to the PICO...

  • in General
    Avatar for noofny

    When I send my code to the PICO by calling save() in the WebIDE, everything appears to work. I then unplug the USB cable, then when I either plug the USB cable back in or connect a power source/battery, it is obvious that the PIC is not running the code I just sent it. In some cases it seems to run a previous version that I sent to it via this method, in other cases it just seems to do nothing.

    No errors are reported via the WebIDE console, everything appears to be working, but it clearly is not. This happens on 2 different PICO's and both with the previous and latest firmware. Also tried on both Windows and OSX, same results.

    Seriously WTF is going on here, what am I missing? So frustrating...

    As an example, this is how simple the code is that I'm testing it with right now.

    function blah(){
      setTimeout(function(){
        digitalWrite(LED1, 1);
        setTimeout(function(){
          digitalWrite(LED2, 1);
          setTimeout(function(){
            digitalWrite(LED1, 0);
            digitalWrite(LED2, 0);
          }, 1000);
        }, 1000);
      }, 1000);
    }
    
    blah();
    
Actions