These are chat archives for esp8266/Arduino

21st
Oct 2015
Me No Dev
@me-no-dev
Oct 21 2015 01:38
@igrr I have a verry interesting problem uploading larger files to the SPIFFS
if the file is larger than 226KB, I get at very particular points wrong bytes
those are exactly the next byte after 226KB, 364KB, 728KB and I imagine every 364KB after that
offsets correctpond to 0x38801, 0x5B001, 0xB6001, ... so on
Me No Dev
@me-no-dev
Oct 21 2015 01:47
and the wrong byte is usually only missing the first bit (if it's set)
$ cmp -l map.png ~/Downloads/map.png 
 231425 145 144
 372737 265 264
 745473 135 134
kathir51
@kathir51
Oct 21 2015 02:23
h i to all Developers. As acadamic interest I want to debug some information from ARDUINO-ESP package Since from version 1.6.4 Board manager only controls package installation . So i installed previous version 1.63 and put Arduino-espcore in the hardware folder created in the arduino folder as per insrtruction below Create a folder named hardware in your Sketchbook folder, usually:
Linux: ~/Sketchbook
OS X: ~/Documents/Arduino
Windows: ~/My Document/Arduino
Download a release
Extract release
Place esp8266com folder in hardware folder created in step 1.
Start or restart the Arduino IDE I followed the above steps. When i compile ESPWIFI.SERVER it gives error " ESP8266Wifi.h" not found No such file or directory . But it is available in lib folder of esp8266 core Can any one help me?
Me No Dev
@me-no-dev
Oct 21 2015 12:01
so you put the esp arduino files in your sketchbook/hardware folder?
sticilface
@sticilface
Oct 21 2015 12:17
@me-no-dev that looks great cheers. Will give it a go. Thanks.
sticilface
@sticilface
Oct 21 2015 15:28
Got it kind of working, but or some reason files ending in .html don't load when clicked on. if i try to create a .htm file, it fails saying file exists, and then loads the html file.
sticilface
@sticilface
Oct 21 2015 16:34
I'm liking the editor.. v smooth
Michael Miller
@Makuna
Oct 21 2015 16:52
@igrr Another person (@patjazz) found that calling ESP.getCpuFreqMHz() in the setup section returning 80mhz and calling it in the loop section returns 160mhz when he has it set it 160mhz. Is there a reason for this?
Me No Dev
@me-no-dev
Oct 21 2015 18:16
@sticilface files should end on htm. if you want to support the html extension (left it out because of FAT16 limitation) then you can add it to the supported types in the sketch
oh... maybe support needs to be added to the editor as well
will look where I have the source of it
sticilface
@sticilface
Oct 21 2015 18:18
i just changed things once i realised why the original files were editable.. and mine weren't.. not a biggy
Me No Dev
@me-no-dev
Oct 21 2015 18:32
@Makuna here is the answer
static void loop_wrapper() {
    static bool setup_done = false;
    if(!setup_done) {
        setup();
        setup_done = true;
    }
    preloop_update_frequency();
    loop();
    esp_schedule();
}
MrZANE42
@MrZANE42
Oct 21 2015 18:42
@Makuna Doesn't this mean that the frequency is set before every turn in the loop. If so it's not only costly in time but also prevents the main application from changing the frequency. Shouldn't it be after setup_done = true; ?
Me No Dev
@me-no-dev
Oct 21 2015 18:47
I imagine (and @igrr can maybe confirm) that the reason the "preloop_update_frequency" method is named as such is because the frequency resets back to 80MHz t the end of the loop_wrapper
what will make you change the freq in the app and not while uploading?
and also, the preloop_update_frequency method is empty when F_CPU is 80MHz so no time is wasted
and you can control it in your app as long as you do it every loop (unfortuantelly)
MrZANE42
@MrZANE42
Oct 21 2015 19:03
Ok. I see.So it is the esp_schedule code that changes the speed back to 80MHz? And i guess that is needed for the esp code to work properly, otherwise what is the point of setting it all the time? Just sounds a bit risky changing the divisor for the clock all the time, luckily it's only the core clock and not the peripheral clock :-)
kathir1951
@kathir1951
Oct 21 2015 19:13
@me-no-dev yes i am unable to compile their own esp libray
Me No Dev
@me-no-dev
Oct 21 2015 19:19
@kathir1951 try puting it in the Arduino IDE hardware folder
i think the sketchbook hardware folder is not supported from a long time
kathir1951
@kathir1951
Oct 21 2015 20:00
@me-no-dev But documentation and instrcution says create hardware folder in Arduino folder and put espcom folder in it
@me-no-dev location is /MyDocument/Arduino/hardware/ espcom
@me-no-dev I am able to browse from Arduino ide sketchbook
kathir1951
@kathir1951
Oct 21 2015 20:06
@me-no-dev Can you please tell where Arduino ide hardware existes ?
@me-no-dev From version 1.6.4 only they statred installation of packages through Boards manager url
kathir1951
@kathir1951
Oct 21 2015 20:14
@me-no-dev the following steps they indicated " Create a folder named hardware in your Sketchbook folder, usually:
Linux: ~/Sketchbook
OS X: ~/Documents/Arduino
Windows: ~/My Document/Arduino
Download a release
Extract release
Place esp8266com folder in hardware folder created in step 1.
Start or restart the Arduino IDE I followed the above steps
Victor Aprea
@vicatcu
Oct 21 2015 20:42
hey @igrr are you around?
Me No Dev
@me-no-dev
Oct 21 2015 21:01
@kathir1951 on windows the arduino ide folder should be in /Program Files x86/Arduino/hardware I think (I'm a Mac user), in all cases it's where you installed it
in that hardware folder you should see the AVR files for the regular arduino
Victor Aprea
@vicatcu
Oct 21 2015 21:01
the sketchbook folder is different from the installation folder typically
Me No Dev
@me-no-dev
Oct 21 2015 21:01
put them there and if it works then the sketchbook/hardware folder is no longer supported
Victor Aprea
@vicatcu
Oct 21 2015 21:02
you can find your sketchbook folder by looking at File => Preferences
Me No Dev
@me-no-dev
Oct 21 2015 21:02
he needs the installatoin folder
Victor Aprea
@vicatcu
Oct 21 2015 21:03
oh for where boards manager stuff ends up?
Me No Dev
@me-no-dev
Oct 21 2015 21:03
no, where the included stuff is
he wants to use a version before board manager
Victor Aprea
@vicatcu
Oct 21 2015 21:04
you can definitely put 3rd party board definitions in the sketchbook/hardware folder (still)
Me No Dev
@me-no-dev
Oct 21 2015 21:04
how about code?
Victor Aprea
@vicatcu
Oct 21 2015 21:04
sketchbook/libraries
Me No Dev
@me-no-dev
Oct 21 2015 21:05
no, like the ESP core
it's not a library
Victor Aprea
@vicatcu
Oct 21 2015 21:07
right i understand that... maybe it only works for AVR based stuff
this video shows how to install stm32 stuff in arduino 1.5.8: https://www.youtube.com/watch?v=-zwGnytGT8M
well before boards manager existed
i would have thought it was fundamentally the same process for adding this project's core without boards manager
but i could be totally wrong
Me No Dev
@me-no-dev
Oct 21 2015 21:10
but it's not working for him, even though that is exactly what is on the video
he has 1.6.3, maybe not in 1.6.X anymore
Victor Aprea
@vicatcu
Oct 21 2015 21:11
yea i was just trying to be helpful, sorry if i'm coming across differently
Me No Dev
@me-no-dev
Oct 21 2015 21:11
nothing to be sorry about :) it should have worked but it does not
kathir1951
@kathir1951
Oct 21 2015 22:59
@me-no-dev @vicatcu Thanks a lot