-
Thx for the idea with deepSleep - never looked at that. I will have a more detailed look at this later today, but what would happen if I have the HC-05 bluetooth module soldered on. Can I still connect to it while espruino is in deep sleep?
I am using bluetooth right now to read the counter values. What would also work is that BTN1 wakes espruino from deep sleep, then if connected over bluetooth serial, it would stay on.
-
Woah, so that means I could connect the CC3000 to BAT and the espruino itself is also powered via the battery, which is 12V. As I got just one CC3000 left, I'll not try it out now but it's great to know.
Just wondering: when the other CC3000 died, I really connected it to a 3.3V pin of espruino (and 3.3V pin on the CC3000) and the GND of course. Other pins are unchanged. Now, it might have just died as it was time for it to die, but would there be another reason I am just too blind to see? I would have expected the espruino to die if the max power I can get across all 3.3V pins is 150mA - wouldn't that somehow overheat the espruino, but not the CC3000?
-
-
The power supply used was for an Asus Nexus 7 - a USB charger. I think it's supposed to supply 1A at 5V - but the power saving mode you mentioned sounds like a interesting reason for the issue. It's gone now with a Samsung charger :-) But just for fun I am also reporting the getAnalogVRef to Xively, so when I swap the charger again I would see it in the logs.
-
-
Garduino is originally an Arduino beginner's project where you use a simple soil sensor to turn on a water pump to water your plants. It sounds trivial, but I had all kind of strange issues last year with this - and playing with water in your living rooms is also something I'd not recommend.
This year I decided to focus on sensor data - right now I transmit air temperature, air humidity (DHT11), soil humidity and a light reading to Xively, where everything gets added to nice charts.
The feeds are online here - if CC3000 has not crashed it should show some data, too :-)
-
I am not sure if it's worth sharing, but I recently ordered a few reed relays and could not resist finally using them. I attached them to the espruino and now count the times my front door is opened/closed. Bad pictures are here: https://plus.google.com/111621195174869691859/posts/QCkhyHBH92B
I might add a little sound system to that in the future, e.g. activated after BTN1 is pressed (30 secs later) as a simple door alarm.
-
-
-
-
Thx @Gordon. I took that tutorial as a base. I added a LDR to track the light intensity and also a super simple soil sensor (could be done with two nails). After experimenting with Solar-powered, I burnt a CC3000 or it was just time for that one to die... and I am still fighting the stability. It runs a few hours sometimes, but then I am unlucky and it will stop just after I left (like today). A nicely resetting CC3000 without removing all timers in case of an error would be awesome. It is still great now, I just have to hit the reset button from time to time.
-
-
OK, although I've been super careful and really never connected BAT (which was 12V during the time the solar panel was connected), it seems my CC3000 is burnt. I've had troubles connecting and finally switched the CC3000 against a second one that I have. In the old setup, with 5V connected to the micro USB, CC3000 again on BAT/GND, it now works again.
During the solar panel testing, I really unplugged espruino from power, then connected CC3000 to GND and 3.3V - as BAT would now be 12V - and started up. After that did not want towork, I began investigating.
Is 3.3V on Espruino guaranteed to be 3.3 - even if a 12V battery is connected to BAT and GND?
-
-
I try to power the espruino incl. a CC3000 WiFi module via a solar panel - the panel is charging a 12V battery and the 12V battery is connected to VBAT and GND of the espruino.
Now, the CC3000 was connected to VBAT, but I assume 12V would kill it. So I use the 3.3V pin on the espruino to connect the 3.3V pin on the adafruit CC3000 breakout.
It does not seem to work - maybe the CC3000 does not have enough power. But I think 5V is max for the CC3000. How would I connect the Espruino to 12V, but still supply enough power to the CC3000 - is VBAT with 12V an option?
-
-
I have a few pics online, in case this helps to figure out the project:
https://plus.google.com/111621195174869691859/posts/jV83MpZTzDh -
Hi Chris, many thx for your comments. Meanwhile, I added a LDR for sensing the light intesity and I worked a bit on the WiFi stability - e.g. I disconnect from CC3000 and reconnect every 60 sec. It is not perfect, but runs a few hours at some point.
I uploaded my code here for everybody to see:
http://snipt.org/LgFh0The readSoilSync() function is doing this:
- choose randomly which pin is in/output - this is done to reduce corrosion which was an issue in my last years project
- turn on the out pin, read from the in pin - 20 times
- average the values
- turn off the out pin
Changing the direction of in/out is mainly due to my last years experiences. I also sent a constant current through the soil last year, which I fixed in this project.
Now, is your idea with resistors and capacitor still valid with this setup? I admit I've not tried it out yet, as I first would like to understand why it makes a differnce if I power it via the power supply compared to the battery. I am planning to do this tonight and before I'll try a few other 5V power supplies (from different phones).
Thx!
Sven - choose randomly which pin is in/output - this is done to reduce corrosion which was an issue in my last years project
-
I am just trying to make my plant/soil/light sensor setup more reliable. I pretty much use the CC3000 example code from the code reference page, e.g. I connect every 60 sec, wait to be connected, get some data, then send it to Xively (thx @Gordon).
The problem is I seem to be getting this from time to time:
Complete, disconnecting... ERROR: Timeout in CC3000 driver (1) at line 73 col 6 }); ^ in function called from system Execution Interrupted during event processing - clearing all timers and watches. >
The problem is not the error itself, it is that all timers and watches get cleared. That means the espruino stands still. I can live well with that code failing from time to time.
I think we had that discussion before - is there a way to keep the system running somehow?
-
I've done a garduino project last year, not connected to the internet, and @Gordon posted in one of the forums that he created a Xively DHT11 (temp/air humidity) tutorial.
So I extended that idea with another sensor, a soil humidity sensor. It is just two pins connected to teh soil - one is put HIGH to send 5V and the other reads the analog value - between 0,1 on the espruino.
It works pretty well - unless I connect it to a 5V/1A power supply via the socket. That really means: if the espruino is connected to my battery-powered Google Pixel, or powered via a USB battery, it works very well - I read always around the same value (which is already averaged over 20 samples).
But once I connect it to the power supply - a phone charger / USB, connected to teh wall socket, it gives me crazy values - each measurement differs wildly from the last one.
I am really scratching my head what causes that? Any ideas are welcome :-)
-
First let me say the outlook to get websocket support on the espruino is excellent. Also I recently got in touch with SSE - Server Sent Events, which looks like a cool and easy implementation if you just need to send events from the server.
http://en.wikipedia.org/wiki/Server-sent_events
Essentially the client, e.g. espruino connects to a socket and the server keeps the connection open. A new message is simply seperated via \n and carriage return (or so, details in the spec, but really easy).
SSE or WebSockets - I see the espruino being the initiating "client" in these scenarios. It just seems to be the easier option to connect out than trying to expose the local IP/server to the outside. Is this common thinking or is there a better option that I am missing?
Also, unfortunately WS/SSE sometimes fail - so an onError handler with the option to recreate the connection could make the connection really stable. Can this be done? I know there is no exception handling, is this required for a onError callback for a websocket? Or is this handled in your integration code and thus no JS Exception handling would be required?
-
-
-
trying this out as I write pretty much. One maybe silly question: I added vref to the data as I thought it might show me the battery level. nonsense, right? but what is the correct way to figure out the charge level of a battery - and kick of a trigger once the level is too low?