-
@DrAzzy I have searched I promise. How do I relate the 48kb memory to jsvars. For example I have 1461 in the 'free' property. It dips every now and then to '1381' but always recovers to 1461. So no leaks(?) but I no idea how much free memory I have in kb based on that number?
Edit: I guess a ratio 1461/1800 * 48?
-
-
@Gordon The log was getting bigger yes, and I was using E.openFile for the image, but was using readFile for reading the log back into the page since I had issues trying to continue res.write output (to close the page html) after I'd piped the openFile output. Is this possible? If I did it again I'd pipe the logs and include them in the main page via iframe - I imagine that would work fine?
@DrAzzy I can't see that process.memory() in the Reference section. Do you include that in a setInterval function and log to console to monitor over time? How do I interpret the returned info?
-
Problems about 2 hours into it. Updating wirelessly became hit and miss and device was restarting with 'out of memory' warnings.
Now I have the image on a CDN, I'm not reading back the logs, and I'm back on USB power, (though I'm not sure the battery is at fault yet).
Image of 23kb was served chunked as per the docs, but was there a better way to read the log data back into the page? I used var logs = fs.readFile(..) and output directly to the page using res.write(logs). The page then got served.
Any best practices for using as a webserver?
-
I swapped out the battery for another brand new 9v battery tonight. Works fine, though for how long I woudn't know.
I have a webserver I can program wirelessly over BT, it sits wirelessly on my network, and runs off a battery!?!
It's serving a single image, and logging visits, and reading them back from SD card. LED1 also provides an indication it's being 'hit'.
Espruino is very cool indeed! !
-
Thanks both. I have the CC3000 connected to VBAT. But from what you are both saying the battery is probably not up to it. I shall swap out for the Nimh cells mentioned.
BTW it's terrific for a newbie to this stuff to receive two really detailed and educational replies. Thanks very much for taking the time guys.
I'll report back.
-
I've got the Bluetooth HC-05 module soldered on, and the CC3000 connected. When I try and power the espruino board with a 9v battery, things appear to be fine initially but after about 5 seconds all the lights go off. The espruino shows a very dim light.
I can power this off USB via mains. And push code over BT to the board. The battery I'm trying to connect is 9V and fairly new. Without the CC3000 connected I can connect and send code over BT with using the battery alone.
Do I need more power than the battery can offer for BT and CC3000?
-
Ok thanks for confirming @DrAzzy.
@Gordon, one observation is that supporting other options can't hurt, with WPA2 as default. I know not everyone has a crappy old router they want to use, but not everyone can be on WPA2 either I imagine. I suspect I can upgrade my router firmware, but it's more 'friction' when perhaps it could just be an another argument in wlan.connect(
Just a thought, and thanks again for clearing up the current position both.
-
There's no need to add WEP on my account. But is it just WPA2? I can't use WPA2 since it's a very old router I'm setting up - I've got WPA and WEP. I suspect looking at the code that @DrAzzy posted it is just later standard.
-
-
Well if you can replicate at least I'm not going mad. I think we shelve it for now. We got the IDE going on a Linux Netnook, so we're not missing out. At least it's on you Radar. Would you like me to add something to the issue tracker on Git?
Really appreciate the time you spent on this with me.
Best
Ollie
-
-
-
This is the Dev tools console output (attached console.txt). I went through the connection process, trying to type in the terminal pane, and then trying to push the default script. There quite a few errors and one warning.
This line represents the bulk of the errors:
Error: Invalid value for attribute transform="translate(Infinity,7.0625)"
Edit: Additionally I get can an error which relates to terminal.js when clicking the clear screen button
3
Uncaught TypeError: Cannot read property '0' of undefined terminal.js:230
updateTerminal terminal.js:230
clearTerminal terminal.js:160
Espruino.Core.App.addIcon.click terminal.js:44
jQuery.event.dispatch jquery-1.11.0.js:4624
elemData.handle jquery-1.11.0.js:4292 -
-
Enjoying our new Espruino board - opens up a world of possibilites for me and the kids - but am having some issues with the Web IDE on my Mac (10.6.8)
I have no issues using 'screen', that connects lovely, but I'm trying to set the Web IDE up for my kids and the GUI scratch style interface.
First I downloaded it via Chrome, and could not key anything to the left pane 'terminal', nor push the default LED script up. Tried both the TTY and CU interfaces which appear.
Tried to flash the firmware via the IDE that also failed - with error referencing not being able to find STM Loader. Same with the advanced flashing option, when I pointed it at a file on your website.
Managed to flash the device using Python thinking the firmware may be too old, but still the same issues in the IDE.
Uninstalled the IDE and then cloned your Github repo but unfortunately the issues persist.
Can anyone help me on this one? If I can offer up any more info about my system please let me know.
I'm experiencing issues with the CC3000 dropping off the network after a period of time. I see this sort of thing has been mentioned on the forum before.
I'm trying wlan.reconnect in setInterval which returns the wlan.connects callback 'My IP is...' line to the console, so I can keep the CC3000 alive this way by not giving CC3000 the opportunity to timeout/disconnect?
I'm testing it as I write but thought I'd ask here, am I right here, or will the issues with the CC3000 dropping off the network mean it eventually won't respond to these reconnect requests?
Best
Ollie