Espruino Garduino v2 #1979
Replies: 16 comments
-
Posted at 2014-03-10 by BogdanG I agree it's not trivial project. I used to try many solutions based on water sensors, pumps, etc. It is difficult for many reasons: quality sensors, water distribution systems (especially challanging when you have 30+ plants scattered all over the house), individual requiremets for water of each plants. Finally I gave up and bought electronic-less solution: It has been working for over 5 years supplying water for over 30 plants. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-10 by hansamann Thx for the link. If it was not about having fun with electronics, I'd do the same. And still might once the vacation time comes closer and I need a really reliable solution. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-10 by BogdanG Yes, I had the same dilema: have a fun with electronics OR have really reliable solution for plants. My wife made me choose the 2nd option just before vacation time:) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-11 by @gfwilliams Great! Well, it still seems to be working at the moment! Although it looks like you may have had to restart it? :) I did some more work on CC3000, so you might find that the latest version is a bit more reliable as well. It'll only remove the single interval when there is an error - so if you do the following then it should always keep working:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-11 by hansamann 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? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-11 by hansamann Ups, trying this on my mac - it does not upload correctly: Connected |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-11 by @gfwilliams See the other post you made about the problem - it'll be fixed now, you just have to update the firmware again. Reading vref works fine if you've removed the voltage regulator, but normally it'll just return 3.3v (ish) unless your battery gets really low. Best idea is to take 2x 1M Ohm resistors and connect them in series across the battery to create a potential divider. Then, just connect the middle to one of the analog inputs and the value you get will be 1/2 the battery voltage. If your battery is >6.6v you'll need to change the resistor values accordingly though :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-11 by hansamann ok, thx. was able to flash the firmware, connected now on my Pixel. Mac strangely does not want to connect. I've update the code, but now I get this: Running onInit()... Does that help? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-11 by hansamann Just for reference, here is the full code. I wrapped the connect in a setTimeout. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-11 by hansamann ok, have to correct myself. for above code snipped I set the interval to 20 sec, but the fail timeout was still at 30 seconds. I changed that to a put reqwuest every 30 secs and fail timeout to 20 secs. It makes sense I guess and works nicely now:
It still runs into a cc3000 issue quite often, but it keeps running :-) Will put the sensors back and will let it run over night. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-11 by @gfwilliams I'll look into it. I've just tried it here and it does seem to come up with SPI RX timeouts much more often now. My guess is that the recent changes to the SysTick IRQ handler just pushed it over the edge, and now SPI is more likely to lose characters. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-11 by @gfwilliams Copy this into the Web IDE flasher's URL box and give it a try: http://www.espruino.com/binaries/git/commits/cb1101a1855f3b37bdeb2b7a91af12d4aa45dc99/espruino_1v57_espruino_1r3.bin I tweaked the IRQ priorities and at least for me, it's a mile better now. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-11 by hansamann First thought it is way, better, and I think it is, but after waiting after the 4/5th request, I got this: Running onInit()... I am leaving this up for the night, conecting it to a power supply and will monitor it. Thx! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-11 by @gfwilliams You probably have quite a bad WiFi signal strength? Mine is very temperamental when that happens. At the end of the day, I can't stop the CC3000 from crashing. That's TI's problem. All I can do is try and make Espruino detect the crash, deal with it and restart it - which hopefully it'll be better at now. It still might not be perfect but hopefully it's getting nearer now. I wonder if someone might be able to add a firmware updater to Espruino. At least then it might be possible to update the CC3000 itself with slightly less broken software. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-12 by hansamann Hi Gordon, thx a lot. I had it running with a 30sec/20sec timout over night, which was not running through - but I'll experiment with the durations a bit. the signal strength shoudl be very good - it's not next to the wifi router directly, but 5 meters from it. At least my laptopn or mobile devices show full strength. The cc3000 seems to have a lot of issues. I am active in the Spark Core forums, too, and they were lucky to have TI work on a better CC3000 firmware. According to them, some improvments were made and more are to come. They have the possibility to flash that as part of a normal update process. That idea with a complete reset if nothign happened a few seconds - is that realistic? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-12 by @gfwilliams I don't see there's any way around doing a reset. I've had zero response from TI about the issues, even on their own forums. I was talking to the guy who designed the CC3000 shield from Adafruit, and he's had similar problems. It's a disgrace really - I'll be avoiding TI's stuff like the plague in the future. I left the WiFi humidity sensor (www.espruino.com/wifi_humidity) running overnight and it is still going and reporting back data, and has been for 14 hours straight (although it looks like there's something iffy with the DHT11 module now!). |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-03-10 by hansamann
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 :-)
https://xively.com/feeds/1848857974
Beta Was this translation helpful? Give feedback.
All reactions