-
-
I am also trying to make my pico work with the esp8266 right now. I get the errors above and after looking at the tutorial again I discovered CH_PD was not connected. I s this really not required for the pico ? The table cell is empty when using the pico, so many here would try not connecting CH_PD to 3.3V. Does it need to be connected?
BTW it does not fix it. ... Still cannot make the code example work.
-
I just arrived in newcastle, staying in the thistle county hotel (oh well...) right next to the life science center. I am wondering if there are a few others around, maybe up for a coffee later today or a beer in the evening. Tweet me at @hansamann - Cheers!
-
Hi all,
just received my first LCDs - same as in this tutorial: http://www.espruino.com/Onboard+LCD
I tried to set A3 for the light to 1, but it does not light up. What's the trick?
@Gordon first time I see the new IDE, it looks terrific!
-
Just ran the master/slave next to each other again with a 250ms interval. I experienced this before but reduced the interval as I did not want to wait that long/
From around 1600 calls, I get a permanent TX not received 30 - any ideas why?
1671 ==1672 ==1673 ==1674 ==1675 ==1676 ==1677 TX not received 30 TX not received 30 TX not received 30 ==1678 == ==1678 ==1678 TX not received 30 TX not received 30 TX not received 30 TX not received 30 TX not received 30 TX not received 30 TX not received 30 TX not received 30 TX not received 30 TX not received 30 TX not received 30
-
I am starting to use the NRF24... modules I got with the espruino and the master/slave example that I found in the code examples worked really great initially. I then modified the example of the master slightly:
SPI1.setup({sck:A5, miso:A6, mosi:A7}); var nrf = require("NRF24L01P").connect( SPI1, B0, B1 ); var counter = 0; function onInit() { //transmit, receive nrf.init([0,0,0,0,2], [0,0,0,0,1]); setInterval(function() { nrf.sendCommand("" + counter++, function(r) { print("=="+r); }); }, 1000); } onInit(); setInterval(function() { nrf.masterHandler(); }, 50);
It sends the counter variable to the slave, then prints the response. So ideally it will print the increasing numbers.
Two observations:
when starting up, and once also just in the middle of runing the master code, I see
TX not received 30 TX not received 30 ==@ == ==!B ==A ==8 ==9 == ==15
I sometimes get an empty response - the output from teh print is just == in this case. That seems simple to check against, just wondering what the issue is and if it could be fixed.
after running this counter till around 600, I disconnected. then connected again and got a massive out of memory error. is this because of the print statement which might queue the output?
All output is below:
ERROR: Out of Memory! WARNING: Out of memory while appending to array INTERNAL ERROR: Timeout on SPI TX ERROR: Out of Memory! WARNING: Out of memory while appending to array INTERNAL ERROR: Timeout on SPI TX ERROR: Out of Memory! WARNING: Out of memory while appending to array INTERNAL ERROR: Timeout on SPI TX ERROR: Out of Memory! WARNING: Out of memory while appending to array INTERNAL ERROR: Timeout on SPI TX INTERNAL ERROR: Timeout on SPI RX ERROR: Out of Memory! WARNING: Out of memory while appending to array INTERNAL ERROR: Timeout on SPI TX INTERNAL ERROR: Timeout on SPI RX ERROR: Out of Memory! WARNING: Out of memory while appending to array at line 1 col 144 {this.setReg(7,48);digitalWrite(this.CE,0);this.setReg(0,10);this.spi.send(225,this.CSN);a=a.clone();a.splice(0,0,160);this.spi.send(a,this.CSN);digitalWrite(this.CE,1);for(a=1E3;a--&&!(this.getReg(7)&48););0>=a&&print("TX timeout");a=!0;this.getReg(7)&16&&(print("TX not received "+this.getReg(7)),a=!1);digitalWrite(this.CE,0);this.setReg(0,11);digitalWrite(this.CE,1);this.setReg(7,48);return a} ^ in function "send" called from line 2 col 124 in function "sendString" called from line 1 col 42 in function "sendCommand" called from line 2 col 67 in function called from system ERROR: Error processing interval - removing it. Execution Interrupted during event processing. ERROR: Out of Memory! ERROR: Out of Me
-
-
-
Hi Gordon, feel free to take the code and massage it in any way you feel it makes sense. I can also send you the xively api key if that helps .All I connected is DHT11, LDR and the soil sensor- I think you could just mock LDR and soil sensor, simple analog reading, but the DHT11 might be interesting to really connect as it might be the reason for the issue. (e.g. it also uses a callback etc and it's a sensor that's a bit more complicated compared to the analog reading).
Thx
Sven -
All right, it seems the watchdog does not really work for me. I've got the final code up here:
https://gist.github.com/anonymous/9706137
I had to reset the device manually twice this morning and it just stopped again.
Here is the procedure so we can rule out all other issues:
- transfer the code
- save() -> init is called and it all starts
- it is then in debug=true mode - I watch it a few times and then do
- debug=false and save() again
- I then disconnect from the mac/pixel and reconnect to the USB power supply. It works nicely for sometimes a few hours, but the secodn time it just stopped just after half an hour...
How could I get more info and data if it's connected to a power source?
- transfer the code
-
-
Wanted to post this a few days ago but was too busy with the mobile tech conference in Munich - which btw I gave a presentation about IOT and mentioned Espruino, too - prezi is here in case someone is interested: http://prezi.com/-35jarymj-4t/?utm_campaign=share&utm_medium=copy
But here's the real comment - if this is roughly about asking what would you improve on an espruino v2: add female/male headers. It took me quite a while to get 20x or 10x female headers here from Germany (you don't order a few cents worth for 5 EUR shipping) and it makes getting started really way easier.
My main point about Espruino at the conference was that it runs Javascript so all Web Devs out there have no excuse to not try it out. For them it's a showstopper if they have to solder and get the headers... to some. Also: a starter kit that includes some easy to use sensors would probably get a lot more people really started.
-
-
Hi Gordon - I have tried the enableWatchdog method out - but it does not quite work. I also don't quite understand: a reset does not load the saved program, right?
Reset the interpreter - clear program memory, and do not load a saved program from flash. This does NOT reset the underlying hardware (which allows you to reset the device without it disconnecting from USB).
Right now I am calling the watchdog timer in onInit with 10 seconds.
-
Thx for the great comments. Especially for the tipps on how to read the soil values. Will change my code soon - right now I randomly choose a directly for each reading session and then stick with it.
My main problem though is still the connectivity. Today I was lucky to reset in the morning and according to xively it was running till 14:00 - but that was real luck. It still seems to hang at some point and then I need to manually reset.
-
HI @Gordon, might have found the issue. I was just refactoring the code a but, throwing out the useless vref value, etc. and then noticed that it was running really nicely when connected to my mac, debugging to the web ide.
When I prepared the espruino for running off the usb power supply, I would typically do
debug=false to turn off all debug statements and then
save()Now, I cannot understand why, but when I keep the debug statements (console.log) turned on, it works. It not running for hours how, but it seems to fix something.
I've uploaded the latest code - I have only a few console.log in there. Could it be that one has to "consume" or touch the data variables, e.g. response data at least once so it is freeing memory or not blocking? That's happening when debugging in my code is on for example.
https://gist.github.com/anonymous/9572141
If you have time, please take another look - I am now trying to understand why it works if console.log turned on :-)
-
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?
-
K, that means the bluetooth module that I soldered onto espruino is always on - it does not count as "peripheral" then.
I looked at the waveform pages, this is pretty sick (=cool). I'd love to try that out, but it does not really mention how to connect a microphone and loudspeaker - and especially which. Could you post links to ebay for the perfect choice that's guaranteed to work?
Also one quick question: doing something like a "change on clap" - e.g. clap or shout in front of the mic and take that as a trigger to run a js function should be trivial, right? It seems it's very similar to the audio in example.
If that's the case, I'd have some ideas for changing some NeoPixel / RGB123 8x8 board animation with the clap of hands. Audio input/output is one of the things I've not really explored, so I am very interested. Ha - also reporting the sound level continously to Xively would be nice.
-
First thought it is way, better, and I think it is, but after waiting after the 4/5th request, I got this:
Running onInit()...
Connected.
{"temperature":22,"air_humidity":35,"soil_humidity":99,"light":2,"vref":3.292113194909577877922}
-->
==> Closed.
Complete, disconnecting...
Connected.
{"temperature":22,"air_humidity":35,"soil_humidity":100,"light":2,"vref":3.289909638554216808614}
-->
==> Closed.
Complete, disconnecting...
Connected.
{"temperature":22,"air_humidity":35,"soil_humidity":100,"light":3,"vref":3.289909638554216808614}
light value set to average, was: 3
-->
==> Closed.
Complete, disconnecting...
Connected.
{"temperature":22,"air_humidity":35,"soil_humidity":100,"light":3,"vref":3.287709030100334661739}
light value set to average, was: 3
Timed out, disconnecting...
Connected.
{"temperature":22,"air_humidity":35,"soil_humidity":100,"light":3,"vref":3.289909638554216808614}
light value set to average, was: 3
Timed out, disconnecting...
Connected.
{"temperature":22,"air_humidity":35,"soil_humidity":99,"light":2,"vref":3.289909638554216808614}
Timed out, disconnecting...
Connected.
{"temperature":22,"air_humidity":35,"soil_humidity":100,"light":2,"vref":3.292113194909577877922}
ERROR: Unable to locate host
Timed out, disconnecting...
Connected.
{"temperature":22,"air_humidity":35,"soil_humidity":99,"light":2,"vref":3.289909638554216808614}
-->
==> Closed.
Complete, disconnecting...I am leaving this up for the night, conecting it to a power supply and will monitor it.
Thx!
-
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:
save()
=undefined
Erasing Flash.....................
Programming 36000 Bytes.......................................
Checking...
Done!
Running onInit()...
Connected.
{"temperature":21,"air_humidity":34,"soil_humidity":45,"light":64,"vref":3.289909638554216808614}
-->
INTERNAL ERROR: Timeout on SPI RX
Looks like CC3000 has died again. Power cycling...
==> Closed.
Timed out, disconnecting...
ERROR: Unknown Timeout
Complete, disconnecting...
Connected.
{"temperature":21,"air_humidity":34,"soil_humidity":25,"light":64,"vref":3.289909638554216808614}
soil_humidity value set to average, was: 25
-->
==> Closed.
Complete, disconnecting...
Connected.
{"temperature":21,"air_humidity":34,"soil_humidity":25,"light":64,"vref":3.292113194909577877922}
soil_humidity value set to average, was: 25
-->
==> Closed.
Complete, disconnecting...
Connected.
{"temperature":21,"air_humidity":34,"soil_humidity":48,"light":63,"vref":3.292113194909577877922}
INTERNAL ERROR: Timeout on SPI RX
Looks like CC3000 has died again. Power cycling...
Timed out, disconnecting...
Connected.
{"temperature":21,"air_humidity":34,"soil_humidity":53,"light":63,"vref":3.292113194909577877922}
INTERNAL ERROR: Timeout on SPI RX
Looks like CC3000 has died again. Power cycling...
Timed out, disconnecting...
Connected.
{"temperature":21,"air_humidity":34,"soil_humidity":67,"light":64,"vref":3.292113194909577877922}
soil_humidity value set to average, was: 67
-->
==> Closed.
Complete, disconnecting...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.
-
Just for reference, here is the full code. I wrapped the connect in a setTimeout.
https://gist.github.com/hansamann/9490825 -
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()...
Connected.
{"temperature":24,"air_humidity":34,"soil_humidity":44,"light":70,"vref":3.292113194909577877922}
-->
==> Closed.
Complete, disconnecting...
Connected.
{"temperature":21,"air_humidity":34,"soil_humidity":47,"light":70,"vref":3.292113194909577877922}
INTERNAL ERROR: Timeout on SPI RX
Looks like CC3000 has died again. Power cycling...
Connected.
{"temperature":21,"air_humidity":34,"soil_humidity":48,"light":70,"vref":3.292113194909577877922}
INTERNAL ERROR: Timeout on SPI RX
Looks like CC3000 has died again. Power cycling...
Timed out, disconnecting...
Timed out, disconnecting...
Timed out, disconnecting...Does that help?
-
I seem to be in a bigger issue since the last firmware upgrade. I connected the board initially on my Mac, got the new firmware message and then wrote the new firmware. Looked good, but then the connects failed with the strange 'yyyyyyy' writing to the console.
So I took the Google Pixel out, hoping it would connect correctly - but it does not. I then thought I could do a firmware upgrade from the Pixel which also seems to fail. Any idea?
-
Hi @tve, I am currently exploring scripting languages on my adafruit huzzah feather and the 1v84 you've posted above flashes nicely and a first test with screen worked as expected. It is pretty close to the latest 1v85, which would run on an espruino pico for example. So does this mean there are no major issues to expect?
For the espruino WebIDE, it seemded to connect but then no keyboard input was possible. I had to use screen. Is this a known error or are there other reasons the web ide does not work with a esp8266?
Thx!
Sven